Why more than one agent?
There are three honest reasons to use several agents instead of one:
- Parallel work. Ten searches at once finish sooner than ten in a row.
- Clean contexts. Each worker starts with an empty window and returns only a short report, so the lead agent’s context stays small and focused (the context-engineering lesson).
- Independent checks. A second agent that did not write the answer can test it, and several agents that answer separately can vote.
Anthropic’s research feature is the best-documented example (June 2025). A lead agent plans the research and saves the plan to memory, in case its context fills up. It starts several subagents that search in parallel, each with its own task, and combines what they bring back. A separate agent then checks which source supports each claim.
- Lead agentplans, saves the plan
- Subagentssearch in parallel
- Lead agentcombines, may send more
- Citation agentlinks claims to sources
- Answerwith sources
On Anthropic’s own research test, this team, led by its strongest Claude model with a smaller Claude model as workers, did 90.2 % better than the strongest model working alone, and running tool calls in parallel cut the time for complex questions by up to 90 %. But Anthropic is also clear about the price:
Approximate figures from Anthropic’s engineering post. On BrowseComp, the number of tokens used explained 80 % of the differences in results; together with the number of tool calls and the choice of model, 95 %.
That last finding is the key to the whole topic. A team often wins mainly because it lets the system spend more tokens on the problem, in parallel and in separate windows. That is worth it for a valuable, wide question. It is waste for a simple one.
Quick check
Ways to organise a team
| How control moves | Example | |
|---|---|---|
| Lead and workers | A lead agent splits the task, workers do the parts, the lead combines them | Anthropic’s research system, Kimi’s agent swarm |
| Agents as tools | A manager calls specialist agents like tools and keeps the conversation | OpenAI Agents SDK: Agent.as_tool() |
| Handoffs | A first agent sorts the request and hands the whole conversation to a specialist | A help desk that routes to billing or technical support |
| Pipeline of roles | Fixed roles pass work along a fixed route, like a company department | MetaGPT, ChatDev |
| Debate | Agents answer, read each other’s answers and revise over several rounds | Multiagent debate (2023) |
| Voting | Many agents answer separately; the most common answer wins | Self-consistency, “More Agents Is All You Need” |
Two early Chinese projects made the pipeline famous. ChatDev (2023) from Tsinghua University ran a pretend software company in which agents playing a CEO, a programmer, a reviewer and a tester talked their way through design, coding, testing and documentation. On 70 small programs it took about seven minutes and cost about 30 US cents each, with a GPT-3.5 model. MetaGPT (2023) wrote a team’s standard operating procedures into the prompts, so that each role produced a fixed kind of document that the next role could check. Its authors’ point still holds: chaining models naively lets one model’s invented detail pass down the line and grow, and structure is what stops it.
Who decides the route matters as much as the pattern. OpenAI’s guide to its Agents SDK separates orchestration by a model, which is flexible but less predictable, from orchestration by your own code, which it calls more deterministic and predictable in speed, cost and results. A good rule: let code fix the parts you already know, and let a model decide only what you cannot know in advance.
import asyncio
from agent import run_agent # the loop from the agent-loop lesson, given a search tool
async def ask(prompt):
# run_agent blocks while it works, so run each one in its own thread
return await asyncio.to_thread(run_agent, prompt)
async def research(question, parts):
briefs = [
f"Question: {question}\n"
f"Research only this part: {part}. Do not cover the other parts: {', '.join(p for p in parts if p != part)}.\n"
"Answer in at most 150 words, and list the sources you used."
for part in parts
]
reports = await asyncio.gather(*(ask(b) for b in briefs)) # all workers at the same time
joined = "\n\n".join(f"## {part}\n{report}" for part, report in zip(parts, reports))
return await ask(
f"Question: {question}\n"
"Combine these reports into one answer. Point out where they disagree.\n\n" + joined
)
question = "How have literacy rates in Pakistan and Bangladesh changed since 2000?"
parts = ["Pakistan", "Bangladesh", "how each country measures literacy"]
print(asyncio.run(research(question, parts)))
- Each worker gets a brief: the question, its own part, what not to cover, a length limit and a format. Anthropic found that vague briefs made subagents repeat each other’s searches.
asyncio.gatherruns the three workers at the same time. Tested with a stand-in agent that takes one second per call, the run took two seconds instead of four.- The lead reads three short reports, not three long histories. It is also asked to point out disagreements instead of hiding them.
- The workers need a search tool to do real research; the agent-loop lesson shows how to add tools to
run_agent.
Quick check
When a team helps, and when it hurts
In December 2025 researchers from Google Research, Google DeepMind and MIT ran the largest controlled comparison so far: 260 configurations across six agent benchmarks, five ways of organising agents and three families of models, with the same tools, prompts and budgets for all. The result depended almost entirely on the task. A team did 80.8 % better than one agent on a financial-analysis task that splits into independent parts, and 70 % worse on a planning task where each step depends on the one before. Gains shrank when a single agent was already strong, and designs without a central check let errors spread further. Their simple model of these effects picked the best design for 87 % of the cases it had not seen.
Cognition, the company behind the Devin coding agent, made the same point from experience in June 2025 in a post titled “Don’t Build Multi-Agents”. Its example: asked to build a Flappy Bird game, one subagent drew a background in the style of Super Mario while another drew a bird that matched neither the game nor the background, and the final agent was left to fit two incompatible pieces together. Its two principles: share the full context, not just a summary of the task, and remember that every action carries decisions the other agents cannot see.
Good fit for a team
- The work splits into parts that do not depend on each other
- Each part needs a lot of reading, more than one window holds
- The answer is worth many times the cost
- A separate agent can check the result with a real test
Poor fit
- Each step depends on the last, as in most coding
- All parts must share many small decisions, such as one style or one design
- A single strong agent already does it well
- The task is cheap and simple
Quick check
Voting and debate
The simplest team asks the same question several times and takes the most common answer. You met this as self-consistency in the probability lesson. Tencent researchers showed in 2024, in a paper called “More Agents Is All You Need”, that this sampling and voting alone improves results as the number of agents grows, and more so on harder tasks, up to a point. The mathematics behind it is more than 200 years old.
P(majority right) = Σ C(n, k) pᵏ (1 − p)ⁿ⁻ᵏ, for k > n ÷ 2n agents, each right with chance p, independently: add the chances of every outcome in which more than half are right.
p = 0.7: n = 1 → 70 %, n = 5 → 83.7 %, n = 15 → 95 %Good agents become a better team.
p = 0.4: n = 1 → 40 %, n = 5 → 31.7 %, n = 15 → 21.3 %Agents that are usually wrong become a worse team: the majority gets more surely wrong.
Start with agents that are right 70 % of the time and move the number of voters from 1 to 25: the majority climbs towards certainty. Now set “Questions where all share one blind spot” to 30 %: the curve flattens and can never pass 91 %, however many agents you add. Finally, drop each agent to 40 %: every extra voter makes the group worse. Voting multiplies the quality you already have; it cannot create it, and it costs one full answer per voter.
This interactive part needs JavaScript.
Debate goes a step further: agents read each other’s answers and revise them over several rounds. A 2023 paper from MIT and Google Brain found that this improved maths and factual accuracy. A 2025 study (“Debate or Vote”, NeurIPS 2025) then asked where the gain comes from, across seven benchmarks, and found that majority voting alone accounts for most of it. Their analysis shows that debate on its own does not raise the expected accuracy: on average, the changes of mind in both directions cancel out. Try the cheap vote first; add debate only if it measurably helps.
Quick check
How multi-agent systems fail
A team of researchers at the University of California, Berkeley read more than 1,600 traces from seven popular multi-agent frameworks, including MetaGPT, ChatDev and Magentic-One, and sorted what went wrong (2025). Independent annotators labelling the same traces agreed closely, with a kappa score of 0.88. They found 14 kinds of failure in three groups:
| Share of failures | Examples | |
|---|---|---|
| System design | about 44 % | Ignoring the task or role description; repeating steps; losing the conversation history; not knowing when to stop |
| Misalignment between agents | about 32 % | Not asking for clarification; drifting off the task; keeping back information another agent needed; ignoring another agent’s input; saying one thing and doing another |
| Checking the result | about 24 % | Stopping too early; checking nothing or too little; checking the wrong thing |
Shares are the sums of the individual failure modes reported in the paper (version 3, October 2025).
Fixes helped, but only partly. Clearer role descriptions in ChatDev raised its success rate by about 9 %, and adding a final check of the whole task’s goal raised it by about 16 %, yet many failures remained. Most come down to the same few habits:
- Brief every worker fully: goal, boundaries, tools, output format, and when to stop.
- Share what must be shared: one written plan or one shared file that all agents read, instead of each guessing the others’ decisions.
- Let one agent own the final answer, and make it read the workers’ results critically.
- Check with something real: tests, totals, a second source. An agent saying “looks good” is not a check.
- Limit the team: the number of agents, steps and tokens. Anthropic scales effort to the question: one agent with a few tool calls for a simple fact, more than ten subagents only for complex research.
- Trace everything, so you can see which agent did what and why.
Does each choice make a team more reliable, or less?
-
A brief that says exactly which part each worker covers and which it must not
Answer: More reliable
-
Workers that each choose their own coding style for the same program
Answer: Less reliable
-
A final step that runs the tests on the combined result
Answer: More reliable
-
No limit on how many subagents the lead may start
Answer: Less reliable
-
One shared plan file that every agent reads before it acts
Answer: More reliable
-
A reviewer agent that only ever replies “looks good”
Answer: Less reliable
-
Asking workers to report disagreements instead of hiding them
Answer: More reliable
-
Using five agents for a one-line factual question
Answer: Less reliable
Training a model to lead a swarm
Most multi-agent systems are prompts and code wrapped around ordinary models. Moonshot AI, the Beijing company behind Kimi, went further with Kimi K2.5 (February 2026): it trained the model itself to act as an orchestrator that splits a task, starts sub-agents that are copies of itself, and combines their work. It calls this Agent Swarm, and the training method PARL, parallel-agent reinforcement learning.
- Only the leader learns. During training the sub-agents are frozen, and their own steps are left out of the training signal, so the model learns how to split and delegate.
- Three rewards. One for starting sub-agents, one for sub-agents that finish their work, and one for solving the task. The first two are turned down to zero during training, leaving only the result.
- Two traps. In serial collapse the leader falls back to doing everything alone; in spurious parallelism it starts many useless sub-agents just to collect the reward. The extra rewards and their gradual removal are aimed at both.
critical steps = Σ over stages (leader’s steps + longest sub-agent’s steps)In each stage, the parallel work takes as long as its slowest sub-agent, as on a project schedule.
stage: leader 2 steps, sub-agents 5, 9 and 3 steps → 2 + 9 = 11Not 2 + 5 + 9 + 3 = 19: the three sub-agents work at the same time.
| One agent | Agent Swarm | |
|---|---|---|
| BrowseComp (finding hard facts on the web) | 60. | 78. |
| WideSearch (collecting many facts, item F1) | 72. | 79. |
| Moonshot’s own swarm test | 41. | 58. |
From the Kimi K2.5 report, table 6. On WideSearch the swarm reached the single agent’s target score in a third to under a quarter of the time (3 to 4.5 times faster).
Quick check
Agents from different teams: A2A
Inside one system you control every agent. Between companies you do not: a travel company’s agent may need to ask an airline’s agent for seats. Google introduced the Agent2Agent protocol, A2A, for this in April 2025, and in June 2025 it became a Linux Foundation project, backed by Amazon Web Services, Cisco, Google, Microsoft, Salesforce, SAP and ServiceNow, among others.
MCP (the previous lesson)
- Connects an agent to tools and data
- The agent sees each tool’s name, description and inputs
- The agent decides every call
A2A
- Connects an agent to another agent, often run by someone else
- The other agent describes what it can do in an Agent Card but keeps its own tools, memory and reasoning private
- You hand over a task and follow its progress until it is done
The safety rule from the tool-calling lesson applies to every message between agents: what another agent sends is data, not orders. Check it as you would check any tool result, and keep approval for actions that spend money, send messages or change records.
Above all, start with one agent. Add a second only when you can name the reason: work that runs in parallel, a context that would overflow, or a check that must be independent. Then measure whether the team actually does better, because the evidence says that often it does not.
Quick check
Remember
- Use several agents for parallel work, clean separate contexts or independent checks, and for nothing else.
- Teams cost far more: about 15 times the tokens of a chat, against about 4 times for one agent.
- A team helps on wide tasks that split into independent parts and hurts on sequential ones; in one study, from 80.8 % better to 70 % worse.
- A majority vote helps only if each agent is right more often than not, and shared blind spots cap the gain. Voting explains most of what debate achieves.
- Most failures come from poor design, misaligned agents and missing checks: brief fully, share the plan, let one agent own the answer, and test for real.
- Kimi K2.5 trained one model to lead a swarm of its own copies, with the biggest gains on wide search tasks.
- A2A connects agents from different organisations; their messages are data to check, never orders.
Words to know
- Multi-agent system
- Several model-driven agents that share a task, each with its own context and often its own role.
- Orchestrator
- The lead agent that splits a task, gives out the parts and combines the results.
- Subagent
- A worker agent started by another agent for one part of a task, with a fresh context.
- Brief
- The instructions a lead gives a worker: goal, boundaries, tools, output format and when to stop.
- Handoff
- Passing the whole conversation from one agent to a specialist agent, which then carries on.
- Majority voting
- Asking several agents separately and keeping the answer most of them give.
- Multi-agent debate
- Agents reading each other’s answers and revising their own over several rounds.
- Condorcet’s jury theorem
- If voters are independent and each is right more often than not, a larger majority is more likely to be right.
- Correlated errors
- Mistakes that several agents make together because they share a model, training or information.
- Serial collapse
- An orchestrator falling back to doing all the work itself instead of in parallel.
- Critical steps
- A measure of time for parallel work: each stage counts only as long as its slowest worker.
- A2A
- The Agent2Agent protocol for agents built by different teams to hand each other tasks.
- Agent Card
- A2A’s public description of what an agent can do and how to reach it.
Go to the source
This lesson is built on these papers and documents. Paper links open arxiv.org, a separate site.
-
How we built our multi-agent research system
Lead and subagents, the 90.2 % gain, 15 times the tokens, and lessons on briefs and evaluation.
-
Don’t Build Multi-Agents
The case against: shared context, hidden decisions and the Flappy Bird example.
-
Towards a Science of Scaling Agent Systems
260 controlled configurations: when teams help, when they hurt, and a model that predicts which.
-
Why Do Multi-Agent LLM Systems Fail?
MAST: 14 failure modes in three groups, from more than 1,600 traces.
-
Kimi K2.5: Visual Agentic Intelligence
Agent Swarm and PARL: training an orchestrator, its traps, and critical steps.
-
ChatDev: Communicative Agents for Software Development
A pretend software company of agents and a chain of chats through its phases.
-
MetaGPT: Meta Programming for A Multi-Agent Collaborative Framework
Standard operating procedures as prompts, and why structure stops errors from cascading.
-
More Agents Is All You Need
Sampling and voting: results scale with the number of agents, more on harder tasks.
-
Improving Factuality and Reasoning in Language Models through Multiagent Debate
The original multi-agent debate method.
-
Debate or Vote: Which Yields Better Decisions in Multi-Agent Large Language Models?
Majority voting explains most of the gains credited to debate.
-
OpenAI Agents SDK: Orchestrating multiple agents
Agents as tools versus handoffs, and orchestration by a model versus by code.
-
Linux Foundation launches the Agent2Agent protocol project
A2A’s move to open governance, and its founding supporters.
Check yourself
5 questions. Tap the answer you think is right.
0 of 5 answered
Lesson complete
Answer every question above to complete this lesson.
Your progress is saved on this device only.
Next lessonBuild an agent: a study helper, from start to finish