-
Notifications
You must be signed in to change notification settings - Fork 261
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
Add multi-agent example #120
Comments
@samuelcolvin is this the right way to do multi-agent orchestration?
It gets stuck here:
|
@jacobweiss2305 I would need to add the agent as a dependency: https://ai.pydantic.dev/dependencies/#agents-as-dependencies-of-other-agents |
Any progress on this by chance? |
Please provide an example. For example a storyteller agent and 3 character agents. The storyteller guides the plot and the character agents contribute/discuss/act dynamically according to the scene of the plot. |
I wrote this agent that uses two agents as tools. Not sure if this helps. happy to document this as an example if the project authors think it’s useful |
Hello,
I'd love to see an example of a multi-agent architecture. Ideally it would have a managing agent communicating with a particular set of specialized agents based on the nature of the question being asked by the user. Each specialized agent would have it's own collection of tools that It could reference, and may have its own model.
Perhaps even the tool itself could be tied to a specific model attached to it. For instance, the specialized agent decides to run a sql tool that generates sql, this tool generates sql using a specialized model, then after the query it goes back to its original model so that it can run a pandas/polars for data transformation.
Flow 1:
Managing agent calls an agent to run a task which is required for another specialized agent to run theirs.
May use "human in the loop"
Example:
User wants to pay for the cheapest flight to Alaska(brrr!), managing agent takes this information and decides to pull in a "data analyst" agent to run the task. The agent analyst queries the cheapest flights and associated information from a database and returns back the info to the managing agent.
The managing agent decides to returns this flight info to the user and ask if the user would like to pay for a ticket("human in the loop"). The user approves, then the prompt goes back to the managing agent who then decides to use the "payment" agent to buy the ticket.
Flow 2:
A managing calls multiple specialized agents to work in parallel.
Example:
A user want to investigate the current market activity of a stock. The managing agent takes that persons question and calls two agents. The first one investigates financial metrics, we'll call this agent the "stock market analyst".
The second agent will be the "sentiment analyst" agent, this agent is responsible for understanding the sentiment derived from social media channels. Once both agents are completed with the task, the information will be synthesized by the managing agent and returned back to the user.
You could even add a "human in the loop" aspect at the end asking the user if they would like to purchase more stock.
Similar to part of Flow 1's example.
Flow 3:
Not quite sure of a good example here, but it would interesting to have a channel of communication between two specialized agents. Perhaps the sentiment analyst or market analyst comes across information that they would like the other to investigate further.
The text was updated successfully, but these errors were encountered: