-
Notifications
You must be signed in to change notification settings - Fork 112
Add PraisonAI integration for multi-agent workflows #383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
MervinPraison
wants to merge
1
commit into
deepset-ai:main
Choose a base branch
from
MervinPraison:add-praisonai-integration
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| --- | ||
| layout: integration | ||
| name: PraisonAI | ||
| description: Integrate PraisonAI multi-agent workflows into your Haystack pipelines | ||
| authors: | ||
| - name: Mervin Praison | ||
| socials: | ||
| github: MervinPraison | ||
| twitter: MervinPraison | ||
| pypi: https://pypi.org/project/haystack-praisonai | ||
| repo: https://github.com/MervinPraison/haystack-praisonai | ||
| type: Custom Component | ||
| report_issue: https://github.com/MervinPraison/haystack-praisonai/issues | ||
| version: Haystack 2.0 | ||
| toc: true | ||
| --- | ||
|
|
||
| ### **Table of Contents** | ||
| - [Overview](#overview) | ||
| - [Installation](#installation) | ||
| - [Usage](#usage) | ||
| - [License](#license) | ||
|
|
||
| ## Overview | ||
|
|
||
| This integration provides a Haystack 2.0 component for PraisonAI, enabling you to run multi-agent AI workflows within your Haystack pipelines. PraisonAI orchestrates multiple AI agents to collaboratively solve complex tasks. | ||
|
|
||
| ## Installation | ||
|
|
||
| ```bash | ||
| pip install haystack-praisonai | ||
| ``` | ||
|
|
||
| ## Usage | ||
|
|
||
| ### Components | ||
|
|
||
| This integration introduces the `PraisonAIComponent`: | ||
|
|
||
| - **PraisonAIComponent**: Sends queries to a PraisonAI server and returns agent responses. | ||
|
|
||
| ### Basic Usage | ||
|
|
||
| ```python | ||
| from haystack import Pipeline | ||
| from haystack_praisonai import PraisonAIComponent | ||
|
|
||
| # Create the component | ||
| praisonai = PraisonAIComponent(api_url="http://localhost:8080") | ||
|
|
||
| # Use in a pipeline | ||
| pipeline = Pipeline() | ||
| pipeline.add_component("praisonai", praisonai) | ||
|
|
||
| # Run | ||
| result = pipeline.run({"praisonai": {"query": "Research the latest AI trends"}}) | ||
| print(result["praisonai"]["response"]) | ||
| ``` | ||
|
|
||
| ### Using a Specific Agent | ||
|
|
||
| ```python | ||
| from haystack_praisonai import PraisonAIComponent | ||
|
|
||
| component = PraisonAIComponent(api_url="http://localhost:8080") | ||
| result = component.run(query="Write an article about AI", agent="writer") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you list the other agent types as well? |
||
| print(result["response"]) | ||
| ``` | ||
|
|
||
| ### Configuration | ||
|
|
||
| | Parameter | Type | Default | Description | | ||
| |-----------|------|---------|-------------| | ||
| | `api_url` | str | `http://localhost:8080` | PraisonAI server URL | | ||
| | `timeout` | int | `300` | Request timeout in seconds | | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| Start a PraisonAI server: | ||
|
|
||
| ```bash | ||
| pip install praisonai | ||
| praisonai serve agents.yaml --port 8080 | ||
| ``` | ||
|
|
||
| ## License | ||
|
|
||
| MIT License | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, any links you can share for PraisonAI?