Multi-agent system

Updated November 24, 2026

A multi-agent system is a setup in which several AI agents, each with its own instructions, tools and context, work together on one task. It suits work that a single agent would handle poorly. A coordinating agent or a routing step splits the work, specialist agents handle the parts, and the results are combined into one answer or action.

In short: A multi-agent system splits a task across several specialized AI agents that coordinate through a supervisor, handoffs or a router, trading extra model calls for focused context and parallel work.

How a multi-agent system works

A single AI agent runs one loop with one prompt and one set of tools. A multi-agent system runs several. IBM describes it as multiple AI agents working collectively on behalf of a user or another system, where each agent has individual properties and all of them behave collaboratively 1.

LangChain lists the capabilities teams are usually after when they ask for multiple agents 2. The first is context management, giving each agent specialized knowledge without overwhelming the model's context window. The second is distributed development, so separate teams can build and maintain separate capabilities. The third is parallelization, running specialized workers on subtasks at the same time 2.

It also names the situations where the split pays off 2. One agent has too many tools and makes poor decisions about which to use, a task needs specialized knowledge with long prompts and domain-specific tools, or steps must stay locked until certain conditions are met 2.

Agents coordinate through one of two network structures. IBM separates centralized networks, where a central unit holds the global knowledge base and connects the agents, from decentralized networks, where agents share information with neighboring agents 1. A central unit makes communication easy, but if it fails, the whole system of agents fails 1.

IBM also describes how agents can be organized inside either network. In a hierarchical structure, one agent can hold decision-making authority, or responsibility can be spread across several agents 1. In a team, agents depend closely on one another and cooperate to improve the performance of the group 1.

An agent framework usually provides these patterns as building blocks. The OpenAI Agents SDK lets agents delegate to other agents for specific tasks through handoffs or by calling agents as tools 3. Its guardrails validate agent inputs and outputs, and its tracing lets developers visualize and debug the flow across agents 3.

Multi-agent patterns and what they cost

LangChain compares its patterns by model calls and tokens processed, since more calls mean higher latency and per-request cost, and more tokens mean higher processing cost 2.

Subagents. A main agent coordinates specialist agents as tools, and all routing passes through it 2. On a one-shot request it used 4 model calls, one more than the other patterns, because results flow back through the main agent 2.

Handoffs. Tool calls update a state variable that switches the active agent or changes its tools and prompt 2. When a user repeated the same request, handoffs needed 5 calls across both turns against 8 for subagents, because the active agent was still in place 2.

Skills. One agent stays in control and loads specialized prompts and knowledge on demand 2. In the multi-domain scenario it used the fewest calls but about 15K tokens, because every later call processed all the loaded documentation 2.

Router. A routing step classifies the input, sends it to one or more specialist agents and combines the results 2. It matched subagents in the multi-domain scenario at 5 calls and about 9K tokens 2.

These figures come from LangChain's own worked scenarios, so they show relative cost for those cases 2. Stateful patterns save calls on repeat requests, and patterns that run agents in parallel with isolated context save tokens on tasks that span several domains 2. A process whose steps never change needs none of these patterns, and plain workflow automation usually runs it with less overhead.

Example of a multi-agent system

An agency builds a two-agent crew in CrewAI for outbound research, following RichAPI's CrewAI guide 4. A sourcer agent runs people_search over an ICP filter, and a qualifier agent enriches each profile and drops anyone below director 4.

Each agent gets only the tools its role needs. The sourcer holds search and the qualifier holds enrichment, so neither model has to choose from the other's tool list or read its intermediate results.

Budget is the first problem. The guide warns that an autonomous crew with a research loop will call a tool more times than expected, and it says to set max_iter on any agent that holds an enrichment tool 4.

python
@agent
def qualifier(self) -> Agent:
    return Agent(config=self.agents_config["qualifier"],
                 tools=[EnrichProfile()], max_iter=6)

Misses are the second problem. The guide's tools return the statuses of the sources tried when nothing is found, so the agent can tell a bad input from data that is absent and decide whether to retry, try another identifier or move on 4. They also name the cost in the success message, which puts the spend into the agent's own context 4.

Billing rules also affect the design. Waterfall endpoints such as email_finder cost zero credits on a miss, while every other endpoint, including enrich_profile, bills on a successful 2xx response 4. The qualifier therefore enriches each profile once and passes the record forward with its result, instead of letting a later agent look the same person up again.

Multi-agent system vs single AI agent

LangChain's starting point is one agent, since a single agent with the right tools and prompt can often achieve similar results 2. The table shows what changes when a second agent joins.

Multi-agent systemAI agent
What it answersHow should specialists split the task?What should one agent do next?
InputA task plus agents with separate prompts and toolsA task, one prompt and one tool list
OutputCombined results from several agentsOne agent answer or action
Cost driverExtra model calls for routing and handoffsOne loop of model and tool calls
Main riskContext lost between agentsToo many tools for one model to choose well
Use it whenDomains, teams or parallel work need separationThe task fits one prompt and toolset
Read the reference →

Frequently asked questions

What is an example of a multi-agent system?

RichAPI's CrewAI guide describes a crew of two 4. A sourcer agent searches for people who match an ICP filter, and a qualifier agent enriches each profile and drops anyone below director. Each agent has its own role, tools and context, and the crew combines their work into one shortlist.

When should a team use a multi-agent system?

LangChain points to three situations 2. One agent has too many tools and chooses badly, a task needs specialized knowledge with long prompts, or steps must become available only after certain conditions are met. Parallel work across separate domains is another reason. Otherwise, one agent with good tools is often enough.

What are the main multi-agent patterns?

LangChain describes subagents, where a main agent calls others as tools, and handoffs, where control passes between agents 2. It also lists skills, where one agent loads specialist context on demand, and routers, which classify input and send it to specialist agents. Custom workflows can combine these patterns 2.

Are multi-agent systems more expensive than a single agent?

Usually, because coordination adds model calls. In LangChain's one-shot example, subagents needed 4 model calls against 3 for handoffs, skills and routers, since results flow back through the main agent 2. Isolated context can still save tokens on large multi-domain tasks 2.

The bottom line

A multi-agent system splits a task across specialized agents that coordinate through subagents, handoffs, skills or a router, and each pattern trades model calls, tokens and control differently 2. Start with one agent and good tools. Split only when tool lists, specialized context or parallel work demand it, and then cap each agent's iterations and have every tool report what it cost 4.

Sources

  1. What is a multi-agent system?, IBM
  2. Multi-agent, LangChain
  3. OpenAI Agents SDK, OpenAI
  4. CrewAI integration guide, RichAPI

More terms