Skip to content

multi agents deploy#477

Merged
MervinPraison merged 1 commit intomainfrom
develop
May 14, 2025
Merged

multi agents deploy#477
MervinPraison merged 1 commit intomainfrom
develop

Conversation

@MervinPraison
Copy link
Copy Markdown
Owner

@MervinPraison MervinPraison commented May 14, 2025

Summary by CodeRabbit

  • New Features

    • Added example scripts demonstrating how to deploy and orchestrate multiple agents and agent groups as API endpoints.
    • Introduced comprehensive documentation for deploying multi-agent systems as APIs, including scaling, security, and production best practices.
  • Bug Fixes

    • Improved agent API server logic to allow multiple FastAPI servers to run concurrently on different ports without conflicts.
  • Chores

    • Upgraded PraisonAI and praisonaiagents package versions.
    • Updated Dockerfiles and documentation to use the latest package versions.
    • Refreshed navigation to include new deployment documentation.

@netlify
Copy link
Copy Markdown

netlify bot commented May 14, 2025

Deploy Preview for praisonai ready!

Name Link
🔨 Latest commit c7eae10
🔍 Latest deploy log https://app.netlify.com/sites/praisonai/deploys/682487d58377ec00080ef46a
😎 Deploy Preview https://deploy-preview-477--praisonai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented May 14, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This update increments the praisonai and praisonaiagents package versions across configuration files, Dockerfiles, and documentation. It introduces new example scripts and a comprehensive guide for deploying multi-agent systems as APIs. The agent server logic is refactored to support concurrent FastAPI instances on different ports, enabling multiple agent groups to run simultaneously.

Changes

File(s) Change Summary
docker/Dockerfile, docker/Dockerfile.chat, docker/Dockerfile.dev, docker/Dockerfile.ui Updated the praisonai Python package version from 2.1.4 to 2.1.5 in the pip install commands. No other modifications.
pyproject.toml, src/praisonai-agents/pyproject.toml Incremented praisonai version to 2.1.5 and praisonaiagents minimum version to 0.0.81. No other dependency or metadata changes.
docs/api/praisonai/deploy.html, praisonai/deploy.py Updated Dockerfile creation logic to install praisonai version 2.1.5 instead of 2.1.4. No other logic changes.
docs/developers/local-development.mdx, docs/ui/chat.mdx, docs/ui/code.mdx Updated documentation snippets to reference praisonai version 2.1.5 in Dockerfile install instructions. No other documentation changes.
docs/deploy/multi-agents-deploy.mdx Added a new, detailed documentation page on deploying multi-agent systems as APIs, including setup, scaling, security, monitoring, and best practices.
docs/mint.json Added the new "multi-agents-deploy" documentation page to the navigation under the "Deploy" section.
examples/api/multi-agents-api.py Added a new example script demonstrating launching a multi-agent system as an API, with both research and summarization agents.
examples/api/multi-agents-group-api.py Added a new example script showing how to launch multiple agent groups as APIs on different endpoints on the same port.
src/praisonai-agents/praisonaiagents/agent/agent.py Refactored agent launch logic to support multiple FastAPI server instances on different ports, with per-port app and endpoint registry. Enables concurrent multi-agent API deployments.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Agents (API)
    participant ResearchAgent
    participant SummariseAgent

    User->>Agents (API): POST /agents with query
    Agents (API)->>ResearchAgent: Assign research task (e.g., search "AI 2024")
    ResearchAgent->>ResearchAgent: Perform internet search
    ResearchAgent-->>Agents (API): Return findings
    Agents (API)->>SummariseAgent: Assign summarization of findings
    SummariseAgent-->>Agents (API): Return summary points
    Agents (API)-->>User: Respond with summarized answer
Loading
sequenceDiagram
    participant User
    participant AgentsGroup1 (API)
    participant AgentsGroup2 (API)
    participant ResearchAgent
    participant SummariseAgent

    User->>AgentsGroup1 (API): POST /agents
    AgentsGroup1 (API)->>ResearchAgent: Research
    ResearchAgent-->>AgentsGroup1 (API): Findings
    AgentsGroup1 (API)->>SummariseAgent: Summarize
    SummariseAgent-->>AgentsGroup1 (API): Summary
    AgentsGroup1 (API)-->>User: Respond

    User->>AgentsGroup2 (API): POST /agents2
    AgentsGroup2 (API)->>ResearchAgent: Research
    ResearchAgent-->>AgentsGroup2 (API): Findings
    AgentsGroup2 (API)-->>User: Respond
Loading

Possibly related PRs

Suggested labels

Review effort 1/5

Poem

🐇
A hop, a skip, a version bump—
Agents now can run in a clump!
Docs and Docker all aligned,
Multi-agent APIs combined.
On many ports, the servers play,
PraisonAI hops a brighter way!
🚀

Tip

⚡️ Faster reviews with caching
  • CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.

Enjoy the performance boost—your workflow just got faster.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between eb94124 and c7eae10.

⛔ Files ignored due to path filters (2)
  • src/praisonai-agents/uv.lock is excluded by !**/*.lock
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (16)
  • docker/Dockerfile (1 hunks)
  • docker/Dockerfile.chat (1 hunks)
  • docker/Dockerfile.dev (1 hunks)
  • docker/Dockerfile.ui (1 hunks)
  • docs/api/praisonai/deploy.html (1 hunks)
  • docs/deploy/multi-agents-deploy.mdx (1 hunks)
  • docs/developers/local-development.mdx (1 hunks)
  • docs/mint.json (1 hunks)
  • docs/ui/chat.mdx (1 hunks)
  • docs/ui/code.mdx (1 hunks)
  • examples/api/multi-agents-api.py (1 hunks)
  • examples/api/multi-agents-group-api.py (1 hunks)
  • praisonai/deploy.py (1 hunks)
  • pyproject.toml (4 hunks)
  • src/praisonai-agents/praisonaiagents/agent/agent.py (6 hunks)
  • src/praisonai-agents/pyproject.toml (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@MervinPraison MervinPraison merged commit d18c647 into main May 14, 2025
6 of 11 checks passed
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @MervinPraison, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

Summary of Changes

This pull request focuses on enabling the deployment of multi-agent systems as APIs within the PraisonAI framework. It includes updates to Dockerfiles, documentation, and core agent logic to facilitate this functionality. The primary goal is to allow users to easily expose their multi-agent systems as RESTful APIs for integration with other applications and services. The changes involve updating the praisonai dependency to version 2.1.5, adding a new documentation page for multi-agent deployment, and modifying the agent launching mechanism to support multiple agents and ports.

Highlights

  • Multi-Agent API Deployment: Introduces the ability to deploy PraisonAI multi-agent systems as RESTful APIs, allowing for seamless integration with various applications and services.
  • Documentation for Multi-Agent Deployment: Adds a new documentation page (docs/deploy/multi-agents-deploy.mdx) that provides a comprehensive guide on deploying multi-agent systems as APIs, including quick start instructions, API request examples, and production deployment options.
  • Agent Launching Mechanism: Modifies the agent launching mechanism to support multiple agents and ports, enabling the deployment of multiple agent groups or independent agents on the same server.
  • Dependency Update: Updates the praisonai dependency to version 2.1.5 in various Dockerfiles, documentation, and the core pyproject.toml file.

Changelog

Click here to see the changelog
  • docker/Dockerfile
    • Updated praisonai dependency to version 2.1.5.
  • docker/Dockerfile.chat
    • Updated praisonai dependency to version 2.1.5.
  • docker/Dockerfile.dev
    • Updated praisonai dependency to version 2.1.5.
  • docker/Dockerfile.ui
    • Updated praisonai dependency to version 2.1.5.
  • docs/api/praisonai/deploy.html
    • Updated praisonai dependency to version 2.1.5 in the Dockerfile example.
  • docs/deploy/multi-agents-deploy.mdx
    • Added a new documentation page providing a guide on deploying multi-agent systems as APIs.
  • docs/developers/local-development.mdx
    • Updated praisonai dependency to version 2.1.5.
  • docs/mint.json
    • Added deploy/multi-agents-deploy to the deploy group.
  • docs/ui/chat.mdx
    • Updated praisonai dependency to version 2.1.5.
  • docs/ui/code.mdx
    • Updated praisonai dependency to version 2.1.5.
  • examples/api/multi-agents-api.py
    • Added an example script demonstrating how to deploy a multi-agent system as an API.
  • examples/api/multi-agents-group-api.py
    • Added an example script demonstrating how to deploy multiple agent groups on the same server.
  • praisonai/deploy.py
    • Updated praisonai dependency to version 2.1.5 in the Dockerfile creation function.
  • pyproject.toml
    • Updated PraisonAI version to 2.1.5.
    • Updated praisonaiagents dependency to version 0.0.81.
  • src/praisonai-agents/praisonaiagents/agent/agent.py
    • Modified global variables for API server to support multiple ports.
    • Modified agent launching mechanism to support multiple agents and ports.
    • Updated the FastAPI app initialization to be port-specific.
    • Added healthcheck endpoint
    • Added root endpoint with welcome message
  • src/praisonai-agents/pyproject.toml
    • Updated praisonaiagents version to 0.0.81.
  • src/praisonai-agents/uv.lock
    • Updated praisonaiagents version to 0.0.81.
  • uv.lock
    • Updated praisonai version to 2.1.5.
    • Updated praisonaiagents version to 0.0.81.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.


A line of agents,
Ready to serve through the wire,
Intelligence blooms.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The pull request updates the praisonai version across multiple Dockerfiles and documentation files, and introduces a new documentation file for deploying multi-agent systems as APIs. The changes seem straightforward, but I have a few comments regarding the version update and the new documentation file.

Summary of Findings

  • PraisonAI Version Update: The praisonai version has been updated across multiple files. It would be helpful to provide a reason for this update in the comments.
  • API Key Configuration: In the multi-agent deployment documentation, clarify where the API key should be configured and that it is optional.

Merge Readiness

The pull request updates the praisonai version and adds new documentation. While the changes seem straightforward, adding comments to explain the reason for the version update and clarifying the API key configuration in the documentation would improve the pull request. I am unable to directly approve this pull request, and recommend that others review and approve this code before merging.

WORKDIR /app
COPY . .
RUN pip install flask praisonai==2.1.4 gunicorn markdown
RUN pip install flask praisonai==2.1.5 gunicorn markdown
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

It's good to update the praisonai version. Is there a specific reason for upgrading to 2.1.5? It would be helpful to add a comment explaining the reason for the update, especially if it addresses a bug or introduces a new feature. This helps with future maintenance and understanding the context of the change.

RUN pip install flask praisonai==2.1.5 # Updated to address [bug/feature] in 2.1.5 gunicorn markdown

praisonaiagents>=0.0.4 \
praisonai_tools \
"praisonai==2.1.4" \
"praisonai==2.1.5" \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Same comment here regarding the praisonai version update. Adding a comment explaining the reason would be beneficial.

    "praisonai==2.1.5" # Updated to address [bug/feature] in 2.1.5

praisonaiagents>=0.0.4 \
praisonai_tools \
"praisonai==2.1.4" \
"praisonai==2.1.5" \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Same comment here regarding the praisonai version update. Adding a comment explaining the reason would be beneficial.

    "praisonai==2.1.5" # Updated to address [bug/feature] in 2.1.5

praisonaiagents>=0.0.4 \
praisonai_tools \
"praisonai==2.1.4" \
"praisonai==2.1.5" \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Same comment here regarding the praisonai version update. Adding a comment explaining the reason would be beneficial.

    "praisonai==2.1.5" # Updated to address [bug/feature] in 2.1.5

file.write(&#34;WORKDIR /app\n&#34;)
file.write(&#34;COPY . .\n&#34;)
file.write(&#34;RUN pip install flask praisonai==2.1.4 gunicorn markdown\n&#34;)
file.write(&#34;RUN pip install flask praisonai==2.1.5 gunicorn markdown\n&#34;)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Same comment here regarding the praisonai version update. Adding a comment explaining the reason would be beneficial.

Suggested change
file.write(&#34;RUN pip install flask praisonai==2.1.5 gunicorn markdown\n&#34;)
file.write(&#34;RUN pip install flask praisonai==2.1.5 # Updated to address [bug/feature] in 2.1.5 gunicorn markdown\n&#34;)

COPY . .

RUN pip install flask praisonai==2.1.4 watchdog
RUN pip install flask praisonai==2.1.5 watchdog
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Same comment here regarding the praisonai version update. Adding a comment explaining the reason would be beneficial.

RUN pip install flask praisonai==2.1.5 # Updated to address [bug/feature] in 2.1.5 watchdog

file.write("WORKDIR /app\n")
file.write("COPY . .\n")
file.write("RUN pip install flask praisonai==2.1.4 gunicorn markdown\n")
file.write("RUN pip install flask praisonai==2.1.5 gunicorn markdown\n")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Same comment here regarding the praisonai version update. Adding a comment explaining the reason would be beneficial.

Suggested change
file.write("RUN pip install flask praisonai==2.1.5 gunicorn markdown\n")
file.write("RUN pip install flask praisonai==2.1.5 # Updated to address [bug/feature] in 2.1.5 gunicorn markdown\n")

shaneholloman pushed a commit to shaneholloman/praisonai that referenced this pull request Feb 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant