More agents help when a task is broad, splits into independent parts, and holds more information than one context window can carry. They hurt when the parts depend on each other, because coordination adds cost and new ways to fail. Start with one agent and split only when you can name the specific limit you have hit.
Key takeaways
- A multi-agent system gives each agent its own instructions, tools and context. The two main patterns are orchestrator with subagents, and handoffs.
- The main benefit is context isolation and parallel work, not "more intelligence".
- Anthropic reported in 2025 that its multi-agent systems used about 15 times the tokens of a chat interaction.
- Tasks with shared context or many dependencies between parts, including most coding work, suit a single agent better.
- A subagent only knows what its brief says. Vague briefs cause duplicated work and gaps.
This article is part of the guide to AI agents, which explains the single-agent loop that everything here builds on.
What is a multi-agent system?
An agent is a model calling tools in a loop. A multi-agent system runs several such loops, each with its own system prompt, tool set and conversation history, and passes work between them.
The important word is own. Two prompts sharing one conversation are still one agent. What makes a system multi-agent is that each agent has a separate context: what one agent read, the others have not seen unless it is passed on.
What are the main multi-agent patterns?
| Pattern | How control moves | Who talks to the user | Fits |
|---|---|---|---|
| Orchestrator and subagents | A lead agent delegates tasks and gets results back | The lead agent | Broad research, parallel investigation |
| Handoff | One agent transfers the conversation to another | Whichever agent currently holds it | Support desks with distinct specialisms |
| Fixed pipeline | Your code passes output from one agent to the next | Usually none until the end | Stages that are always the same |
Orchestrator and subagents. Anthropic describes its research system this way: a lead agent analyses the query, develops a strategy and spawns subagents that explore different aspects in parallel. Each subagent returns its findings to the lead, which combines them and decides whether more work is needed. Control always returns to the lead.
Handoffs. Here control moves and does not come back automatically. The OpenAI Agents SDK documentation defines it in one line: handoffs allow an agent to delegate tasks to another agent. In that SDK a handoff is presented to the model as a tool, named transfer_to_<agent_name> by default, and the receiving agent takes over the conversation and sees the previous history unless you filter it. A triage agent that passes a refund question to a refund agent is the standard example.
Fixed pipeline. If the sequence never changes, you have a workflow whose steps happen to be agents. See agent or workflow.
Why would more agents help?
Three reasons hold up, and they are all about context, not cleverness.
- Context isolation. A subagent can read twenty pages and return a ten-line summary. The lead agent's context receives only the summary. One agent doing the same work would carry all twenty pages for the rest of the task. If context windows are new to you, see tokens and context windows.
- Parallelism. Independent subtasks can run at the same time, so wall-clock time drops even though total work rises.
- Separation of tools and permissions. A subagent that only searches needs no write access. Narrow tool sets are easier for a model to use and safer to grant.
Anthropic's write-up summarises where its multi-agent systems did well: tasks with heavy parallelisation, information that exceeds a single context window, and many complex tools. On its internal research evaluation, a lead agent with subagents outperformed a single agent by 90.2%. That is one company's internal test on breadth-first research questions, so treat it as evidence about that kind of task, not a general result.
What does a multi-agent system cost?
Tokens. Anthropic reported that, in its data, agents typically use about 4 times more tokens than chat interactions, and multi-agent systems about 15 times more. Each subagent runs its own loop with its own system prompt and tool definitions, and the lead spends tokens writing briefs and reading summaries. That only makes sense when a completed task is worth the extra spend.
Coordination. The failures Anthropic describes from early versions are instructive:
- Spawning far too many subagents for a simple question (it mentions 50).
- Subagents duplicating each other's work because briefs were vague.
- Agents distracting each other with excessive updates.
- A lead agent that waits for subagents to finish cannot steer them mid-task, and one slow subagent can hold up the whole run.
Information loss. Every boundary between agents is a summary. If a subagent leaves out a detail the lead needed, the lead cannot know it is missing.
Debugging. A wrong answer may come from the plan, a brief, one subagent's search, a summary or the final synthesis. You need traces that link every agent's steps into one tree. See LLM observability.
Security. Each agent's output becomes another's input, and OWASP's Top 10 for Agentic Applications lists Insecure Inter-Agent Communication (ASI07) and Cascading Failures (ASI08). See guardrails for AI agents.
When is a single agent better?
A single agent is the better default when any of these is true:
- The parts depend on each other. If step three needs the full detail of step two, splitting them forces a lossy summary in between. Anthropic's write-up says domains that require all agents to share the same context, or that involve many dependencies between agents, were not a good fit for multi-agent systems, and gives most coding tasks as an example.
- The task fits comfortably in one context. Isolation solves a problem you do not have.
- The task is low in value per run. Fifteen times the tokens needs a matching payoff.
- You have not yet made one agent work well. Multiple agents multiply a weak design; they do not fix it.
How do you build the orchestrator pattern?
The simplest form needs no framework: a subagent is a function that runs its own loop and returns text, and the lead agent sees that function as a tool.
import anthropic
client = anthropic.Anthropic() # reads ANTHROPIC_API_KEY from the environment
MODEL = "claude-opus-5-5" # use any current model ID from the models page
def run_subagent(brief: str, max_steps: int = 8) -> str:
"""Run a research subagent in a fresh context and return only its summary."""
messages = [{"role": "user", "content": brief}]
for _ in range(max_steps):
response = client.messages.create(
model=MODEL,
max_tokens=2048,
system="You are a research subagent. Do the task in the brief, "
"then reply with a summary in the requested format.",
tools=SEARCH_TOOLS,
messages=messages,
)
if response.stop_reason != "tool_use":
return "".join(b.text for b in response.content if b.type == "text")
results = [
{"type": "tool_result", "tool_use_id": b.id,
"content": run_search_tool(b.name, b.input)}
for b in response.content if b.type == "tool_use"
]
messages.append({"role": "assistant", "content": response.content})
messages.append({"role": "user", "content": results})
return "Subagent stopped: step limit reached before finishing."
# The lead agent's only tool. Its loop is the same as any agent loop.
DELEGATE_TOOL = {
"name": "delegate",
"description": (
"Hand one self-contained research task to a subagent that starts with "
"no knowledge of this conversation. The brief must state the objective, "
"the output format, which sources to use, and what is out of scope. "
"Returns the subagent's summary."
),
"input_schema": {
"type": "object",
"properties": {"brief": {"type": "string"}},
"required": ["brief"],
},
}
SEARCH_TOOLS and run_search_tool stand for whatever read-only tools you give the subagent. The lead agent runs the standard loop from the agents guide with DELEGATE_TOOL in its tool list, and calls run_subagent(block.input["brief"]) when the model asks for it.
The subagent's searches and their results never enter the lead's messages; only the returned string does. The subagent also has its own step cap and reports when it hits it, so a stuck subagent cannot fail silently.
How should you brief a subagent?
A subagent starts with nothing but its brief. Anthropic found that each subagent needs four things:
- An objective. What question to answer, stated specifically.
- An output format. For example, "five bullet points, each with a source URL".
- Guidance on tools and sources. Which to use, which to avoid.
- Clear task boundaries. What is out of scope, so two subagents do not cover the same ground.
Compare two briefs for the same job:
| Weak brief | Better brief |
|---|---|
| "Research the MCP transports." | "List the standard transports in the current MCP specification. Use only modelcontextprotocol.io. For each, give one sentence on how messages are carried and the page URL. Do not cover authorisation; another agent has that." |
Also tell the lead how much effort a task deserves, so that a simple question does not trigger a large team of subagents, which is the first failure in the list above.
Common questions
Is an agent with many tools a multi-agent system?
No. One loop with twenty tools is one agent. It becomes multi-agent when there are separate contexts, each running its own loop.
What is the difference between a handoff and a subagent?
A subagent does a task and returns the result to the agent that called it. A handoff transfers the conversation, and the new agent carries on from there. Use subagents for delegation and handoffs for changing who is in charge.
How many subagents should I use?
As few as the task needs. Start with two or three for clearly separable work and measure whether quality improves enough to cover the added tokens.
Free download: AI agent guardrails checklist
A pre-launch checklist for any AI agent that can take actions: tool scope, approvals, stop conditions and budgets, prompt injection and logging. See what’s inside.



