Skip to content

Add multi-agent example #120

Closed
Closed
@Luca-Blight

Description

@Luca-Blight

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions