👥Multi Agents
multiple independent actors powered by language models connected in a specific way.
Last updated
multiple independent actors powered by language models connected in a specific way.
Last updated
Each agent can have its own prompt, LLM, tools, and other custom code to best collaborate with the other agents.
That means there are two main considerations when thinking about different multi-agent workflows:
What are the multiple independent agents?
How are those agents connected?
This thinking lends itself incredibly well to a graph representation, such as that provided by langgraph
. In this approach, each agent is a node in the graph, and their connections are represented as an edge. The control flow is managed by edges, and they communicate by adding to the graph's state.
Note: a very related concept here is the concept of state machines, which we explicitly called out as a category of cognitive architectures. When viewed in this way, the independent agent nodes become the states, and how those agents are connected is the transition matrices. Since a state machine can be viewed as a labeled, directed graph, we will think of these things in the same way.
"If one agent can't work well, then why is multi-agent useful?"
Grouping tools/responsibilities can give better results. An agent is more likely to succeed on a focused task than if it has to select from dozens of tools.
Separate prompts can give better results. Each prompt can have its own instructions and few-shot examples. Each agent could even be powered by a separate fine-tuned LLM!
Helpful conceptual model to develop. You can evaluate and improve each agent individually without breaking the larger application.
Multi-agent designs allow you to divide complicated problems into tractable units of work that can be targeted by specialized agents and LLM programs.
1)Supervisor
supervisor AI agent under which we can have multiple subordinate AI agents who will follow the orders of the supervisors. The subordinate AI agents act like tools that can be executed by the supervisor AI agent.
2) Worker
worker agent is a distinct AI program, trained to perform a particular task or function.
In Thub, Using of supervisor and workers sach a way: