Skip to content

Chapter 4 · Multi-Agent Systems

4.1 Why do we need multi-agent systems? ★★

One-sentence answer

A multi-agent system is a set of LLM agents that work together on a task, each with its own system prompt, its own tools and its own context window; they are often instances of the same model, so the real difference lies in how information is organized. Its benefits come from specialization, parallelism, separate contexts and cross-checking, with separate contexts usually the most important; but much of the gain really comes from spending more tokens, so it must be compared with a single agent at the same budget.

I will answer in three parts: what a multi-agent system essentially is, its four motivations, and what to watch for when evaluating these benefits.

(1) What fundamentally distinguishes a multi-agent system is how information is organized, not how much compute it uses.

A multi-agent system (MAS) is one in which several LLM-driven agents work together on a task. Each agent has its own system prompt (which sets its role and behavior), its own tools and, most importantly, its own context window; they collaborate by sending each other messages or by reading and writing shared state (the basic loop of a single agent is covered in Chapter 0). One point needs clarifying up front: these agents are often instances of the same model, so in terms of compute, "several agents" is not fundamentally different from "one agent called several times". The real difference lies in what each agent sees and does not see, who is responsible for what, and how results are combined. Only once this is understood does it become clear where the benefits of multiple agents come from and where their costs lie.

(2) There are four main motivations for using multiple agents, and each comes with a corresponding cost.

  • Specialization: If every role and every tool is crammed into one agent, the prompt keeps growing and its instructions start to conflict (for example, "be creative" versus "follow the output format strictly"); with many tools, the chance of picking the wrong one also rises. Once the work is split across several agents, each agent does one job with only a few relevant tools, so its instructions are focused and its behavior more stable; different roles can also use different models, for example a cheap small model for simple retrieval sub-tasks. The cost is that the interfaces between agents must be clearly defined, or things go wrong at the handoffs.
  • Parallelism: If a task splits into independent sub-tasks, such as researching five companies, a single agent has to do them one after another, so the total time is the sum of all sub-tasks; multiple agents can work at the same time, so the total is roughly the planning time plus the slowest sub-task plus the synthesis time. This requires the sub-tasks to be truly independent; if a later step depends on an earlier result, there is nothing to parallelize.
  • Separate contexts: This is often the most important point. Each agent has its own context window, so the whole system can "read" far more than one window holds: five sub-agents each read tens of thousands of tokens and each returns only a short summary, so the main agent's context stays clean. Separate contexts also bring "fresh eyes": a reviewer who has not seen the author's reasoning is less likely to be led along by it and more likely to spot problems. The cost is that information is lost when it is passed between agents, and each agent sees only part of the picture.
  • Debate and verification: When a model checks its own answer, it tends to repeat the same mistakes, because its biases are consistent. Having several agents answer independently and then challenge each other, or adding a dedicated verifier, can catch some of the errors a single agent misses (see 4.4). The cost is more compute, and if all agents use the same model, their errors are still correlated.

(3) When evaluating these benefits, the explanation "it simply spent more tokens" must be ruled out.

A multi-agent system usually uses several times as many tokens as a single agent, and on many tasks simply adding tokens improves results by itself. So when a multi-agent system scores higher, one must always ask: if a single agent were given the same number of tokens, to sample more times or reason for longer, could it do just as well? Only if the system is still better at the same token budget can the gain be credited to the architecture itself (see 4.6).

In summary: the value of multiple agents lies in organizing information across several separate contexts, which breaks past the capacity of a single context and provides viewpoints that do not interfere with one another; it is not a free boost in intelligence.

Comparing the four motivations:

Motivation Where the gain comes from Precondition Cost
Specialization Focused instructions, few tools, a different model per role The interfaces between roles can be clearly defined Errors at handoffs
Parallelism Wall-clock time becomes a maximum instead of a sum Sub-tasks are independent Extra planning and synthesis overhead
Separate contexts The system reads more than one window holds; fresh eyes Sub-task results can be returned as short summaries Information is lost in transit; each agent sees only part
Debate and verification Catches errors a single agent misses Different agents' errors are not perfectly correlated More compute; errors from the same model are still correlated

Going deeper: the time budget of parallelism, context capacity and fresh eyes

(1) Parallelism turns wall-clock time from a sum into a maximum.

\[ T_{\text{single}} \approx \sum_{i=1}^{N} T_i \qquad \text{vs.} \qquad T_{\text{multi}} \approx T_{\text{plan}} + \max_{i} T_i + T_{\text{synth}} \]

Here \(N\) is the number of sub-tasks, \(T_i\) is the time for sub-task \(i\), and \(T_{\text{plan}}\) and \(T_{\text{synth}}\) are the planning and synthesis times. For example, with five sub-tasks of 10 minutes each, a single agent needs about 50 minutes, while multiple agents need about 10 minutes plus planning and synthesis. If the orchestrator waits synchronously for all workers, the slowest one determines the total time.

(2) Separate contexts make the system's total reading capacity grow with the number of agents.

With \(N\) sub-agents, each with a context window of \(W\) tokens, the system can process about \(N \cdot W\) worth of information, while the main agent only reads \(N\) summaries of typically one or two thousand tokens each, so its context is far smaller than what the sub-agents actually read (see 4.7).

(3) An industry example of "fresh eyes".

Yan (2026) of Cognition reports that having a review agent that shares no prior context with the coding agent review the code actually works better: the reviewer sees only the diff and reasons backward from the implementation to the intent, so it is more likely to question what the coder overlooked, and it is unaffected by the context bloat of a long session. However, if the two agents are the same model, the biases they acquired in training are still shared.

Follow-up questions

Follow-up 1: If all agents use the same model, what is the essential difference between "multiple agents" and "one agent called many times"?

The difference lies in context isolation and the division of responsibility, not in the model itself. When one agent is called many times, each call sees the whole accumulated history, so earlier reasoning influences later judgments and the context keeps growing; with multiple agents, each sees only the information assigned to it, their judgments do not interfere with one another, and the main agent only needs to read the results. A multi-agent system is therefore essentially a way of managing context and organizing work.

Follow-up 2: Why are separate contexts considered the most important benefit of multiple agents?

Because they address both capacity and bias at once. In terms of capacity, the large volume of search results and documents that one window cannot hold can be split among several sub-agents, each compressing its share into key points; in terms of bias, a reviewer who has not read the author's reasoning will not be led along by it. Specialization and parallelism are also useful, but they can often be partly achieved by one agent with better tool design, whereas breaking past the limit of a single context can only be done with multiple contexts.

Follow-up 3: When does running agents in parallel fail to speed things up?

When the sub-tasks depend on each other, or when the coordination overhead exceeds the time parallelism saves. If a later step needs an earlier result, the later agent can only wait, so parallel execution degrades into serial execution with the added overhead of planning, writing task briefs and synthesizing; and if the orchestrator waits synchronously for all workers, one slow worker holds up the whole system.

Common mistakes

  • Do not say multiple agents make the model "smarter": The agents are often the same model; the gain comes from how information is organized, not from any increase in model ability.
  • Do not say multiple agents are always faster: Parallelism only helps when sub-tasks are independent; tasks with dependencies can become slower because of coordination overhead.
  • Do not credit every multi-agent score gain to the architecture: The comparison with a single agent must be made at the same token budget.

4.2 What architectures do multi-agent systems use, and what are their trade-offs? ★★

One-sentence answer

Depending on who controls the flow and who talks to whom, multi-agent systems have three basic architectures: centralized orchestrator–workers, decentralized peer-to-peer collaboration, and hierarchical; a sequential pipeline is another common shape. Centralized systems have a clear control flow and are easy to verify, but the orchestrator is a bottleneck and a single point of failure; decentralized systems offer diverse viewpoints, but communication grows as \(O(N^2)\) and they are hard to terminate and debug; hierarchical systems scale to large tasks, but information is distorted level by level. Most practical systems are "one orchestrator plus one layer of workers".

I will answer in three parts: the centralized architecture, the decentralized architecture, and hierarchies and pipelines.

(1) In a centralized architecture, one orchestrator plans, dispatches and aggregates, and the workers generally do not talk to each other directly.

In a centralized architecture, the orchestrator (also called a manager or lead agent) understands the task, splits it into sub-tasks and writes a task brief for each worker; the workers execute with their own tools and return their results, and the orchestrator aggregates and checks them, then decides whether to finish or dispatch more work. From the orchestrator's point of view, calling a worker is much like calling a tool, except that inside this "tool" is a full agent loop (agent-as-tool; tool calling is covered in Chapter 2). Its benefits are a clear control flow, easy diagnosis when something goes wrong, and an orchestrator that serves as a natural checkpoint where the workers' results can be verified during aggregation. However, the orchestrator is both a bottleneck and a single point of failure: if it misunderstands the task, every worker's effort is wasted, and its context gradually fills up with the reports the workers send back. How this pattern is applied to research tasks is covered in 5.7.

(2) A decentralized architecture has no commander and agents talk to each other directly, at the cost of being hard to terminate and debug.

In a decentralized architecture, agents can take turns, broadcast to everyone, or message one another point to point; multi-agent debate (see 4.4) is a typical example. Its benefits are diverse viewpoints and no dependence on any single agent: when one agent errs, the others have a chance to correct it. But its problems are just as clear, and there are three main ones.

  • Communication grows quickly: \(N\) agents have \(O(N^2)\) pairwise channels, and every agent has to read everyone else's messages each round, so contexts balloon quickly.
  • Nobody is in charge of ending: The system can go round in circles of pleasantries or repeated arguments, so explicit stopping conditions are required, such as a maximum number of rounds or reaching consensus.
  • Blame and debugging are hard: When something goes wrong, it is hard to tell which agent was responsible.

In practice, many "decentralized" systems still keep a lightweight coordinator; for example, in AutoGen's group chat a manager decides who speaks next. So centralized and decentralized are better seen as two ends of a spectrum than as an either-or choice.

(3) A hierarchical architecture is the recursive version of centralization, and a pipeline is the simplest sequential structure; in both, errors pass from level to level.

  • Hierarchical: A top orchestrator manages several mid-level leads, and each lead manages its own workers, like a tree or a company's org chart. The motivation is span of control: an orchestrator can effectively manage only so many workers, so very large tasks need levels. The cost is that every extra level adds another round of paraphrasing and compression: the top-level intent may be distorted by the time it reaches the bottom, and bottom-level details may be lost by the time they reach the top, like a game of telephone, while latency and cost also add up level by level. So in today's LLM systems, hierarchies deeper than two levels are rare.
  • Sequential pipeline: A hands off to B when done, and B hands off to C, like an assembly line; ChatDev's waterfall process works this way (see 4.3). Its control is the simplest, but errors from earlier stages flow all the way downstream (see 4.6).

In summary: choosing an architecture is essentially a trade-off between clarity of control and diversity of viewpoints; most practical systems today choose "one orchestrator plus one layer of workers" because it is the easiest to verify and debug.

Comparing the three architectures:

Centralized (orchestrator–workers) Decentralized (peer-to-peer) Hierarchical
Structure One orchestrator plans, dispatches and aggregates; workers don't talk to each other Agents talk directly, by turns or by broadcast; no commander A tree: a top orchestrator, mid-level leads, leaf workers
Control flow Explicit and easy to trace Emergent; needs an explicit stopping rule Explicit at each level
Strengths Clear task decomposition; a natural verification point; easy to debug Diverse views; no single point of failure; suits debate and negotiation Scales to large tasks; each manager has only a few direct reports
Weaknesses The orchestrator is a bottleneck and single point of failure; its context fills with reports Communication grows as \(O(N^2)\); can loop or drift; hard to debug Information is distorted across levels; latency and cost add up
Typical use Research agents, Magentic-One Multi-agent debate, group discussion Very large projects, organization-style simulations

Going deeper: ways to decompose tasks, and Magentic-One

(1) Task decomposition can be static or dynamic.

Static decomposition has the developer write the flow in advance, such as "retrieve, then write, then review"; its behavior is predictable, but it only suits fixed types of tasks. Dynamic decomposition has the orchestrator decide on the spot how many pieces to split the task into and how many workers to send; it is more flexible but leans harder on the orchestrator's planning ability (task decomposition is covered in Chapter 1, 1.1).

(2) Magentic-One: a typical centralized system.

The orchestrator in Magentic-One (Fourney et al. 2024) keeps two "ledgers". The task ledger records known facts, educated guesses and the overall plan; the progress ledger checks at every step whether the task is done, whether progress is being made, and whom to assign next. If several steps pass with no progress, the orchestrator goes back to the task ledger and revises the plan. It directs four specialist agents: WebSurfer, which operates a browser; FileSurfer, which reads local files; Coder, which writes code; and ComputerTerminal, which runs the code. Magentic-One is built on AutoGen (see 4.3).

Follow-up questions

Follow-up 1: What are the main responsibilities of the orchestrator in a centralized architecture?

Understanding the task, splitting and dispatching it, aggregating and verifying the results, and deciding what to do next. The orchestrator has to break the user's goal into sub-tasks with clear boundaries, write a sufficiently detailed brief for each worker, check the collected results for consistency and completeness, and then decide whether to finish, revise the plan or dispatch more work. The most easily overlooked part is verification: if the orchestrator accepts a worker's conclusions without checking, that worker's error goes straight into the final result.

Follow-up 2: Is static or dynamic task decomposition better?

It depends on whether the type of task is fixed. Tasks with mature, fixed procedures (such as producing a report in a fixed format) suit static decomposition, because the behavior is predictable and easy to test; open-ended tasks (such as open research questions) cannot know in advance how many directions they need, so they suit dynamic decomposition, but the orchestrator must be kept from splitting too finely or sending too many workers (see 4.7).

Follow-up 3: What roles do Magentic-One's task ledger and progress ledger play?

The task ledger handles "the plan", and the progress ledger handles "checks during execution". The task ledger stores facts, guesses and the overall plan, acting as the orchestrator's long-term memory; the progress ledger answers at every step "is it done, is there progress, whom do we assign next". Together they form an outer reflection loop: as soon as a stall is detected, the orchestrator returns to the task ledger and replans, which keeps the whole system from spinning on a wrong plan.

Common mistakes

  • Do not say decentralized systems are more reliable because they have no single point of failure: Their communication, termination and debugging problems are often worse than a single point of failure.
  • Do not treat centralized and decentralized as an either-or choice: Many group-chat systems still have a coordinator that decides the speaking order.
  • Do not assume deeper hierarchies scale better: Every extra level adds another lossy round of paraphrasing, and practical systems rarely exceed two levels.

4.3 How do role-based, SOP-driven frameworks such as MetaGPT and ChatDev work? ★

One-sentence answer

These 2023 frameworks have LLMs play different roles, imitating the division of labor in a human team: MetaGPT writes standard operating procedures (SOPs) into the workflow and requires each role to produce structured documents; ChatDev uses a "chat chain" to break software development into a series of dialogues between two roles; CAMEL and AutoGen represent, respectively, two-agent role-play and a general framework of conversable agents. Their shared lessons are that structure is more reliable than free conversation and that real execution feedback matters more than role assignments, but their procedures are hand-designed and their gains over a strong single agent are often limited.

I will answer in three parts: the common idea behind these frameworks, how MetaGPT and ChatDev work in detail, and the lessons and limitations they leave.

(1) The common idea is to have LLMs play different roles and to organize collaboration the way a human team divides its work.

Completing a complex task with a chat model often requires a human to keep giving instructions and correcting course. The earliest wave of multi-agent frameworks, which appeared in 2023, tried to have the model "cooperate with itself": different agents are assigned roles such as product manager, architect, programmer and tester, each role handles only part of the work, and handoffs follow a pre-designed procedure. The motivation is that human teams in fields like software development have already built up mature divisions of labor and procedures, so the model can borrow these structures directly instead of working out how to collaborate on its own.

(2) MetaGPT constrains collaboration with SOPs and structured documents, while ChatDev advances the process through a chain of two-role dialogues.

  • MetaGPT (Hong et al. 2023): It targets a fundamental problem of free-form chat between agents: the longer the conversation, the more likely it is that one agent's small mistake is taken as fact by the next agent and built upon, so errors amplify layer by layer, which the paper calls cascading hallucination. Its solution borrows the standard operating procedures (SOPs) of human teams: each role works in a fixed order and must produce structured documents with a fixed format and complete content; for example, the product manager writes a requirements document (PRD), the architect writes the system design and interface definitions based on it, the project manager breaks down the tasks, the engineer writes the code, and the QA engineer writes the tests. Agents exchange information through a shared message pool, and each agent subscribes only to the message types relevant to it (publish–subscribe). In addition, the engineer actually runs the code and fixes it based on the errors (executable feedback), and the paper's ablations show this brings a clear improvement.
  • ChatDev (Qian et al. 2023): It simulates a software company run on the waterfall model, with roles such as CEO, CTO, programmer, code reviewer and tester, and phases for design, coding, testing and documentation. Its organizing scheme is the chat chain: each phase is split into small sub-tasks, each sub-task is completed by a dialogue between two roles (one instructs, one executes), and the result is passed to the next link. Dialogues are limited to two participants to keep discussions from getting out of hand. It also introduced communicative dehallucination: before answering, the executing role first asks for specifics (for example, "which buttons exactly does the interface need?") instead of guessing, which reduces fabrication.

Two other frameworks often mentioned alongside them are CAMEL and AutoGen: CAMEL (Li et al. 2023) has two agents, an AI user and an AI assistant, complete a task through role-play; AutoGen (Wu et al. 2023) is a general programming framework of "conversable agents" rather than a fixed workflow (details below in "Going deeper").

(3) These frameworks left three lessons and also exposed clear limitations.

  • Structure is more reliable than free conversation: Clear roles, fixed procedures and formatted outputs greatly reduce misunderstandings and the spread of errors.
  • Real feedback matters more than role assignments: Error messages from actually running code and tests are far more reliable than "review comments" from another agent.
  • The procedures are designed by people and hard to transfer: They work well in domains with mature procedures like software development, but the roles and procedures have to be redesigned for each new domain.

This also explains the later trend: less reliance on hand-designed role workflows, and more use of one strong agent with tools that spawns sub-agents dynamically when needed. Failure analyses of several mainstream frameworks (including MetaGPT and ChatDev) also show that such systems often gain little over a single agent on common benchmarks (Cemri et al. 2025; see 4.6).

In summary: the gains of role-based and SOP frameworks come mainly from structured procedures and real execution feedback, not from "role-play" itself.

Comparing four representative frameworks:

Framework Core idea Roles Coordination
CAMEL (Li et al. 2023) Two agents role-play to finish a task with minimal human input An AI user (gives instructions) and an AI assistant (carries them out), plus a task specifier Inception prompting; turn-by-turn dialogue
MetaGPT (Hong et al. 2023) Write human SOPs into the workflow; agents exchange structured documents Product manager, architect, project manager, engineer, QA engineer Assembly line plus a shared message pool (publish–subscribe)
ChatDev (Qian et al. 2023) A virtual software company run on the waterfall model CEO, CTO, programmer, reviewer, tester, etc. Chat chain: each sub-task is a dialogue between two roles
AutoGen (Wu et al. 2023) A general framework in which everything is a conversable agent Assistant agents; user proxy agents that run code or bring in a human Programmable conversation patterns; a manager picks the next speaker in group chat

Going deeper: the designs of CAMEL and AutoGen

(1) CAMEL: inception prompting is designed against specific failure modes.

CAMEL first has a task specifier turn the user's vague idea into a concrete task, then has the AI user give instructions step by step while the AI assistant carries them out and proposes solutions. The key technique is inception prompting: at the start of the conversation, system prompts set up both agents' roles and rules, such as "never flip roles", "give one instruction at a time" and "output an end marker when done". These rules target several failures the paper observed: role flipping (the assistant starts instructing the user), the assistant merely repeating the instruction, flaky non-answers, and the two agents getting stuck in an infinite loop of messages. CAMEL's larger impact turned out to be synthesizing conversation data: pairs of agents converse under many role combinations to generate instruction data at scale.

(2) AutoGen: organizing collaboration through "conversation programming".

AutoGen abstracts everything as a conversable agent: there are LLM-based assistant agents and user proxy agents that stand in for a person, and the latter can execute code, call tools or hand a question to a real human (human-in-the-loop). Developers can compose patterns such as two-agent chats, sequential chats and group chats; in a group chat, a manager picks the next speaker based on the context. Magentic-One from 4.2 is built on AutoGen.

Follow-up questions

Follow-up 1: What typical failures appear when two agents cooperate autonomously, and how does CAMEL address them?

The typical failures are role flipping, repeating instructions, flaky replies and infinite loops. CAMEL uses inception prompting to fix the roles and rules before the conversation begins, for example by forbidding role flips, allowing only one instruction at a time and requiring an end marker when done, which constrains these behaviors in a targeted way. This shows that autonomous collaboration needs an explicit protocol; one cannot expect models to cooperate well on their own.

Follow-up 2: Why does ChatDev restrict each sub-task to a dialogue between two roles?

So that every dialogue has a clear division of labor and a clear end. With two roles, one instructing and one executing, responsibility is clear and the discussion is unlikely to get out of hand; if many roles take part at once, the problems of growing communication and difficult termination appear (see 4.2). Communicative dehallucination further requires the executing role to ask first when information is missing, instead of guessing.

Follow-up 3: Why does MetaGPT use structured documents instead of letting agents chat freely?

Because structured documents block cascading hallucination. In free conversation, key information may be left out and one agent's error is taken as fact by the next; a document with a fixed format requires every field to be filled in, so the downstream agent receives a well-defined input with far less ambiguity, and when something goes wrong it is easier to locate which link caused it.

Follow-up 4: What does AutoGen's user proxy agent do?

It is the interface between the agents and the outside world. The user proxy agent takes part in the conversation on a person's behalf: it can execute the code the assistant writes and return the results, call tools, or hand a question to a real human when needed. In this way, real execution feedback and human judgment enter the multi-agent conversation naturally.

Common mistakes

  • Do not say role-play itself makes the model stronger: The gains come mainly from structured procedures and real execution feedback.
  • Do not say these frameworks transfer directly to any domain: Their procedures were hand-designed for software development.
  • Do not conflate AutoGen with MetaGPT: AutoGen is a general programming framework, whereas MetaGPT and ChatDev are fixed workflows.

4.4 Does multi-agent debate work? ★

One-sentence answer

Multi-agent debate has several agents answer independently, read and revise each other's answers, and finally vote; early experiments showed that it improves reasoning and factuality. But once compute is controlled, debate often fails to beat simple ensembling methods such as self-consistency, and later work found that the gain comes mainly from the final majority vote, with debate itself not raising expected accuracy. It is most likely to help when different agents make truly diverse errors, for example because they use different models or information sources.

I will answer in three parts: how debate works, why it might help, and why it often does not help once compute is controlled.

(1) The procedure is to answer independently, consult each other, revise over several rounds, and finally vote.

The multi-agent debate (MAD) procedure proposed by Du et al. (2023) is simple:

\[ a_i^{(0)} \sim \mathrm{LLM}(q), \qquad a_i^{(r)} \sim \mathrm{LLM}\big(q,\ a_i^{(r-1)},\ \{a_j^{(r-1)}\}_{j \ne i}\big), \qquad \hat{a} = \mathrm{MajorityVote}\big(a_1^{(R)}, \dots, a_N^{(R)}\big) \]

In round 0, \(N\) agents (usually several instances of the same model) each answer question \(q\) independently, giving answers \(a_i^{(0)}\). In every following round \(r\), each agent sees its own and the other agents' answers and reasoning from the previous round, with a prompt along the lines of "here are other agents' solutions to this problem; using their reasoning, give your updated answer", producing a new answer \(a_i^{(r)}\). After \(R\) rounds, a majority vote over all agents' final answers gives the final answer \(\hat{a}\). The method only needs to call the model, not access its weights, so it can be used directly with black-box APIs.

(2) There are three reasons debate might help.

  • An ensemble effect: Several agents answering independently amounts to sampling several reasoning paths from the model; as long as their errors are not perfectly correlated, voting cancels out some of the random errors. This is the same as self-consistency (see the Inference, Evaluation & Deployment direction, 4.2).
  • Cross-examination: Unlike plain voting, in a debate agents can see each other's reasoning, so an agent that made a mistake at some step may notice it after seeing someone else do that step differently. On factual questions, Du et al. observed that facts the model is confident about tend to be stated the same way by different agents, and agents are hard to talk out of them, while details the model is unsure about vary from agent to agent. Debate pushes agents to keep the consensus and drop the disagreements, so fewer made-up details survive into the final answer.
  • Breaking "degeneration of thought": Liang et al. (2023) pointed out that once a model is confident in its answer, it struggles to produce new ideas no matter how much it reflects, even if the original answer is wrong; they call this degeneration-of-thought. They have two agents argue the affirmative and negative sides to force different viewpoints, with a judge agent making the call. Opposition from outside gets a model out of its original line of thinking more easily than self-reflection does (self-reflection is covered in Chapter 1, 1.3).

(3) However, later work that controlled for compute found that most of debate's gain comes from voting.

Debates often converge together on a wrong answer: a wrong majority puts "conformity pressure" on a minority agent that was right, making it abandon the correct answer, and the models then confidently affirm the wrong consensus. A more fundamental problem is that if every agent is the same model, they share the same knowledge gaps, so a fact the model generally does not know will not be learned through any number of debate rounds. So when the comparison is redone at equal compute, several studies find that debate does not reliably beat ensembling methods such as self-consistency and is sensitive to hyperparameters (Smit et al. 2023; Zhang et al. 2025); a single agent given a strong enough prompt can also approach the best multi-agent discussion (Wang et al. 2024). Choi et al. (2025) went further and found that a majority vote over just the independent round-0 answers performs about as well as the full debate, and they gave a theoretical explanation: under their model, an agent's belief in the correct answer forms a martingale across rounds, meaning its expectation stays constant, so debate itself does not raise expected accuracy, and the real gain comes from the initial diversity plus the final vote. By contrast, Zhang et al. (2025) found that letting different agents use different base models (model heterogeneity) consistently improves every debate method, which shows precisely that diversity of errors is what matters.

In summary: debate is more like an expensive ensembling method; it can beat simple voting only when different agents make truly diverse errors (different models, information sources or tools), when answers can be cross-checked, and when compute is not the main constraint.

Comparing debate with related methods:

Method Do agents communicate? Source of gain Main problem
Self-consistency (majority vote) No; each samples independently Ensembling: cancels random errors Cannot correct systematic errors
Multi-agent debate (Du et al. 2023) Each round, agents read the others' answers Ensembling plus cross-examination Conformity, converging on wrong answers; input tokens grow as \(N^2\)
Affirmative vs. negative with a judge (Liang et al. 2023) Two sides argue; a judge decides Forces different viewpoints The judge's own biases
Heterogeneous-model debate (Zhang et al. 2025) Different base models read each other Less correlated errors Needs several models; higher cost

Going deeper: the original setup, the cost, and what the martingale means

(1) The setup and results of Du et al. (2023).

The default setting is 3 agents and 2 rounds of debate, chosen mainly for cost. The evaluation covers reasoning tasks (arithmetic, GSM8K, chess move prediction) and factuality tasks (biographies of computer scientists, MMLU, chess move validity). Debate beat a single agent, self-reflection, and majority voting over the same number of agents on these tasks; on arithmetic, for example, debate scored about 82% versus about 69% for majority voting. Adding more agents and more rounds both helped further, but the gains levelled off after about 4 rounds. With many agents, concatenating everyone's answers into the prompt becomes too long, so the paper summarized the other agents' answers first, which actually worked better.

(2) The cost grows as \(N^2\).

\[ \text{Generations} = N(R+1), \qquad \text{Input tokens} = O(N^2 R\, \bar{L}) \]

Here \(N\) is the number of agents, \(R\) is the number of debate rounds, and \(\bar{L}\) is the average length of one answer. In every round each agent reads the answers of the other \(N-1\) agents, so input tokens grow roughly as \(N^2 R\): doubling the number of agents roughly quadruples the reading.

(3) What the martingale means.

\[ \mathbb{E}\big[\,p^{(r+1)} \,\big|\, p^{(r)}\big] = p^{(r)} \]

Here \(p^{(r)}\) is an agent's belief (probability) in the correct answer after round \(r\). The formula says that, given the current belief, the expected belief in the next round equals the current belief: debate only makes answers converge across agents; it does not systematically push them toward the truth. Choi et al. (2025) also note that if belief updates are deliberately biased toward correction, debate can be improved.

(4) Judge bias.

Liang et al. (2023) also found that the judge agent favors the side that uses the same base model as the judge, which is the same kind of problem as self-preference in LLM-as-a-judge (see the Inference, Evaluation & Deployment direction, 5.3).

Follow-up questions

Follow-up 1: At equal compute, which is better, multi-agent debate or self-consistency?

Most studies find that debate is not reliably better. A fair comparison has both use the same number of tokens: if the \(N(R+1)\) generations that debate uses were all spent on independent samples followed by a vote, they would often reach similar or even better accuracy. The result of Choi et al. (2025) is more direct: voting over just the independent round-0 answers achieves most of the effect of the full debate.

Follow-up 2: What goes wrong when every agent in a debate uses the same model?

Their errors are highly correlated. The same model has the same knowledge gaps and biases, so the probability that "several agents are wrong together" is far higher than an independence assumption would suggest, and debate may even drown out the minority that is right. The remedy is to add diversity: use different base models, give agents different information sources or tools, or force them to take different positions.

Follow-up 3: What is degeneration-of-thought, and how does debate mitigate it?

It means that once a model is confident in an answer, self-reflection struggles to produce new ideas. During self-reflection, the model reads its own reasoning and easily ends up merely reconfirming it. Liang et al. have two sides argue against each other with a judge deciding, so external opposition forces the model to consider other possibilities and break out of its original line of thinking.

Follow-up 4: When is multi-agent debate most likely to help?

When errors are diverse, answers can be checked, and compute is plentiful. Examples are agents that use different models or retrieve different material, factual questions where hallucinations vary between samples, or tasks valuable enough to justify several times the tokens. Conversely, if the model has a systematic error on a question, or a strong model with a good prompt is already enough, debate is unlikely to add much.

Common mistakes

  • Do not say debate always beats majority voting: At equal compute it often merely ties with voting.
  • Do not say more debate rounds are always better: The gains level off after a few rounds while the cost keeps growing.
  • Do not equate consensus with correctness: Agents can converge together, and confidently, on a wrong answer.

4.5 How do agents communicate with each other? ★

One-sentence answer

Agents communicate in two main ways: message passing (point to point or broadcast) and shared state (jointly reading and writing a "blackboard", a file system or a message pool). Message passing has clear causality and lean contexts, and its difficulty is what to put in the message; shared state is loosely coupled and has one source of truth, and its difficulty is concurrency and consistency. At the protocol level, MCP standardizes the interface between agents and tools, while A2A aims to standardize communication between agents.

I will answer in three parts: message passing, shared state, and how the two are combined and standardized at the protocol level.

(1) Message passing is the most direct approach, and the key question is what goes into the message.

Message passing means one agent sends a message to another (point to point) or posts it to a group where everyone sees it (broadcast). An orchestrator assigning work to a worker, a worker returning results, and agents reading each other's answers in a debate are all message passing. Its benefit is clear causality: who told whom what, and when, is plain to see, which makes tracing and debugging easy; each agent also sees only the messages sent to it, so its context stays lean. In a group chat, one also has to decide who speaks next: by turns (round-robin), by rules, or chosen by a manager LLM based on the conversation.

The central problem in message passing is the content of the message. The recipient cannot see the sender's full context and can only understand the task from the message itself, so if the message is too brief, the recipient misunderstands: if the orchestrator writes only "research the semiconductor shortage", three workers may well produce heavily overlapping results. Yet if the message is too detailed, the point of isolating information in separate contexts is lost. That is why many systems use structured messages: fixed fields (goal, inputs, output format, constraints, boundaries), or, as in MetaGPT, formatted documents passed directly.

(2) Shared state lets agents collaborate indirectly through a common place, and the key question is concurrency and consistency.

The idea of shared state comes from the classic AI blackboard architecture: several expert modules watch the same "blackboard", whichever module can contribute based on what is currently on the board writes to it, and the modules do not need to know about each other. In LLM multi-agent systems it takes several common forms.

  • A shared message pool: For example, MetaGPT's publish–subscribe mechanism, in which each agent subscribes only to the message types relevant to it.
  • The code repository itself: In coding, every agent works on the same repo, and the code is the shared state.
  • A shared file system: In research, sub-agents write detailed findings to files and pass only references back to the main agent, so information is not distorted as it is relayed (see 4.7).
  • A shared memory store: Several agents read and write the same long-term memory (memory is covered in Chapter 3).

The benefit of shared state is loose coupling: adding an agent does not require changing the others, and everyone sees the same "facts". The cost is having to handle concurrency and consistency: two agents editing the same file at once may overwrite each other, or make decisions based on an old version the other has already changed; and as the board accumulates content, it needs structure and cleanup, or every agent ends up reading a pile of noise.

(3) The two approaches are often combined, and the protocol level is gradually being standardized.

Real systems are usually mixed: the orchestrator dispatches tasks by message, and workers write large results to shared storage and send back only references and summaries. At the protocol level, MCP (Model Context Protocol) standardizes the interface between agents and tools or data sources (see Chapter 2, 2.2); the A2A (Agent2Agent) protocol, introduced by Google in 2025, aims to standardize how different agents discover each other, delegate tasks and exchange results.

In summary: the core of communication design is to give the recipient accurate, unambiguous information in as few tokens as possible: messages should be structured, and large content should go into shared storage and be passed by reference.

Comparing the two ways of communicating:

Message passing Shared state / blackboard
How it works Sent to specific agents or broadcast to a group All agents read and write one store (board, file system, database)
Who sees what Only the recipients Every agent with access, optionally filtered by subscription
Strengths Clear causality, easy to trace; each agent's context stays lean Loosely coupled, easy to add agents; one shared source of truth
Weaknesses Information silos; relaying loses detail; \(O(N^2)\) channels when everyone talks to everyone Conflicting writes; the board grows noisy; needs a schema and cleanup
Examples Debate, CAMEL dialogues, orchestrator–worker calls MetaGPT's shared message pool, a shared code repo or notes directory

Going deeper: the origin of the blackboard architecture, the A2A protocol, and the fields of a task message

(1) The origin of the blackboard architecture.

The blackboard architecture first appeared in the Hearsay-II speech-recognition system of the 1970s: several knowledge sources, such as acoustic, lexical and syntactic ones, jointly read and wrote one blackboard, gradually assembling partial hypotheses into a complete recognition result. The shared message pools and shared file systems in today's LLM systems follow essentially the same idea.

(2) The basic design of the A2A protocol.

A2A was released by Google in April 2025 and handed over to the Linux Foundation in June of the same year. Each agent publishes its capabilities and connection details in an agent card, which other agents use to discover it and send it tasks; communication uses JSON-RPC over HTTP, and long-running tasks can report progress through a server-pushed event stream. The division of labor with MCP is this: MCP lets an agent call a tool, while A2A lets an agent delegate a task to another agent that may have been built by a different vendor and whose internals are opaque.

(3) The fields a structured task message usually contains.

Field Purpose
Goal What question this sub-task must answer
Inputs and sources What is already known, and which tools and sources to use
Output format What to return, how long, in what structure
Boundaries What to leave alone, to avoid duplicating other agents
Completion criteria When the agent can stop

Follow-up questions

Follow-up 1: When passing a task between agents, what goes wrong if the message is too brief or too detailed?

Too brief leads to misunderstanding and duplication; too detailed defeats the purpose of isolating contexts. The recipient cannot see the sender's context, so a one-line task brief leaves several workers each guessing the scope, and their results overlap while still leaving gaps; conversely, if the sender's entire context is stuffed into the message, the recipient's context balloons too, and the main benefit of multiple agents disappears. The right approach is to spell out the goal, format and boundaries in fixed fields.

Follow-up 2: What is the blackboard architecture, and what forms does it take in LLM multi-agent systems?

It is an architecture in which several modules collaborate indirectly by reading and writing one common store. In LLM systems it appears as MetaGPT's shared message pool, a code repository edited by several agents, a shared file system holding sub-agents' detailed findings, and a memory store shared by several agents.

Follow-up 3: What is the difference between MCP and A2A?

MCP connects agents to tools; A2A connects agents to agents. A tool called through MCP is usually a well-defined function or data source with an explicit schema for its inputs and outputs; the party a task is delegated to through A2A is another autonomous agent, which may run for a long time, need multi-turn interaction, and keep its internal state invisible to the caller.

Follow-up 4: How do you avoid conflicts when several agents modify shared state at the same time?

The most reliable approach is to keep writes single-threaded. One can allow only one agent to write while the others only read and make suggestions; one can also assign non-overlapping files or fields to different agents, or use version numbers and locks so that an agent checks at write time whether the version it read is already stale. This matches the lesson from 4.6 that "reads can run in parallel, but writes should stay single-threaded".

Common mistakes

  • Do not assume more detailed messages are always better: Passing the entire context defeats the purpose of separate contexts.
  • Do not ignore concurrency in shared state: Several agents writing the same file at once will overwrite each other.
  • Do not confuse MCP with A2A: The former standardizes how an agent calls tools; the latter standardizes how agents delegate tasks to each other.

4.6 When do multiple agents help, and when do they hurt? ★★

One-sentence answer

Multiple agents suit read-heavy, parallelizable tasks, such as breadth-first search and research, tasks that need more information than one context window holds, or tasks that need an independent check unaffected by the original author's reasoning; they do not suit sequential, write-heavy, tightly coupled tasks, such as several agents editing the same codebase at once. Their costs are several times the tokens, coordination overhead and error propagation, so the default should be a single agent, with multiple agents brought in only when a specific bottleneck appears, and their benefit confirmed at the same token budget.

I will answer in four parts: the costs of multiple agents, how errors propagate, the evidence from research and industry, and the principles for choosing.

(1) Multiple agents carry two direct costs: token overhead and coordination overhead.

  • Token overhead: Anthropic's published figures are that agents typically use about 4× the tokens of an ordinary chat, and multi-agent systems about 15× (Anthropic 2025). The reason is that every agent reads its own system prompt, task brief and tool definitions, the same content is read again by several agents as it is passed around, and structures like debate grow as \(N^2\).
  • Coordination overhead: Planning, splitting the task, writing a brief for each worker, aggregating results and resolving conflicts are all work a single agent never has to do. If sub-tasks depend on each other, later agents must wait for earlier ones, so the benefit of parallelism disappears and only the extra latency remains.

(2) Errors propagate and amplify along the handoffs between agents, and the key to controlling them is verification points.

In a multi-agent system, one agent's output is the next agent's input. If a process passes through \(K\) stages, stage \(k\) succeeds with probability \(p_k\), and nothing downstream checks the work, then the overall success rate is the product of the stage success rates, \(\prod_{k=1}^{K} p_k\); with 5 stages at 95% each, for example, the overall rate is only about 77%. Worse, downstream agents usually trust upstream output: once a fact made up by one worker enters another agent's context, it is treated as "evidence" for further reasoning, so the error is not corrected but amplified, which is exactly what MetaGPT calls cascading hallucination. In addition, every handoff is a lossy compression, since only a small part of the upstream agent's full reasoning makes it into the handoff message. Accordingly, controlled experiments by Kim et al. (2025) found that architectures without centralized verification propagate errors more severely. In practice, one adds checks at key handoffs (the orchestrator cross-checks the workers' results, or a separate verifier agent does), uses structured outputs to reduce ambiguity, and passes references to the original sources so that downstream agents can verify for themselves.

(3) Evidence from both research and industry shows that the effect of multiple agents depends heavily on the structure of the task.

Kim et al. (2025) ran a controlled study across several architectures, three model families and several agentic benchmarks: on a financial-analysis task that decomposes into independent parts, multiple agents improved on a single agent by up to about 81%; but on a planning task where each step depends on the last, every multi-agent variant did worse than the single agent, by up to about 70%. They also found that once the single-agent baseline is already strong, adding coordination yields diminishing or even negative returns, and that tool-heavy tasks suffer more from coordination overhead. Cemri et al. (2025) analyzed a large number of execution traces from several popular frameworks, found that their gains over a single agent are often small, and distilled 14 failure modes (see "Going deeper" below). Industry reflection agrees: in "Don't Build Multi-Agents", Yan (2025) of Cognition argued that agents must share full context (full agent traces, not just individual messages) and that every action carries implicit decisions, and conflicting decisions carry bad results, so the default should be a single-threaded agent; Anthropic (2025) likewise acknowledged that most coding tasks have fewer truly parallelizable parts than research, and that tasks requiring all agents to share the same context, or with many dependencies between agents, are a poor fit for multiple agents today. In 2026, Yan (2026) revised this position in a follow-up post: a narrower class of multi-agent designs now works, provided that writes stay single-threaded and the additional agents contribute judgment rather than actions, for example a review agent that shares no context and reviews the code.

(4) The principle for choosing is to start with a single agent and bring in multiple agents only when a specific bottleneck appears.

This evidence points to one conclusion: read-heavy, parallelizable tasks (search, research, code review) suit multiple agents; for write-heavy, tightly coupled tasks (editing one codebase, writing one document), writes should stay single-threaded, and extra agents should at most contribute information and suggestions. Concretely, multiple agents are worth bringing in only when the information needed exceeds one context window, when the task has many independent branches that can run in parallel, or when an independent check is needed; once they are brought in, they should still be compared with a single agent at the same token budget, to confirm that the gain comes from the architecture and not merely from more compute.

In summary: a multi-agent system is a design that trades tokens and coordination cost for context capacity and parallelism, and it pays off only when the structure of the task matches.

When to choose multiple agents:

Favors multiple agents Favors a single agent
Sub-tasks are independent and can run in parallel Steps are sequential and depend on each other
Mostly reading and gathering (search, review, analysis) Mostly writing to shared state (one codebase, one document)
The information needed exceeds one context window Everything fits in one context
High value per task, so extra tokens are worth it Cost- or latency-sensitive
An independent check or diverse viewpoints help The task needs one consistent set of decisions

Going deeper: the MAST taxonomy, more findings from the controlled study, the Flappy Bird example and the 2026 revision

(1) MAST: 14 failure modes of multi-agent systems.

Cemri et al. (2025) analyzed execution traces from several popular frameworks, including MetaGPT and ChatDev, on coding, math and general tasks, and distilled the MAST taxonomy: 14 failure modes in three categories:

Category Failure modes
System design issues Disobey task specification; disobey role specification; step repetition; loss of conversation history; unaware of termination conditions
Inter-agent misalignment Conversation reset; fail to ask for clarification; task derailment; information withholding; ignored other agent's input; reasoning–action mismatch
Task verification Premature termination; no or incomplete verification; incorrect verification

Among the more common are step repetition, reasoning–action mismatch, being unaware of termination conditions, and disobeying the task specification. The simple fixes they tried (such as improving role specifications in ChatDev, or adding a high-level check against the task objective) helped somewhat but were far from solving every problem. The authors conclude that many failures stem from organizational and system design and will not be fixed by stronger base models alone, just as a team of capable people can still fail.

(2) Two further findings from Kim et al. (2025).

One concerns how much errors are amplified: independent multi-agent architectures, whose agents work in parallel without communicating, amplified errors about 17×, whereas architectures with a centralized orchestrator doing verification contained the amplification to about 4×. The other concerns predictability: the model they fitted could, from features of the task and the model, pick the best-performing architecture for about 87% of held-out configurations, which suggests that "when to use multiple agents" is predictable to some extent.

(3) The Flappy Bird example.

Yan (2025) illustrates the problem with building a Flappy Bird game: the main agent splits the task into "a scrolling background with pipes" and "a bird that moves up and down" and hands them to two sub-agents. The sub-agents cannot see the full context and misread the task: one builds a Super Mario-style background, and the other builds a bird that does not look like a game asset at all. Even if they are also given the original task, the two sub-agents cannot see each other's work, so their style choices are incompatible, and the agent that has to combine them struggles to fit them together. He therefore recommends a single-threaded, linear agent by default, with a model that compresses the history of actions and decisions into key points once the task grows too long for the context. He also cites Claude Code: it spawns sub-agents but never works in parallel with them, and a sub-agent usually just answers a well-defined question rather than writing code.

(4) The 2026 revision: which multi-agent patterns now work.

Yan (2026) describes three patterns that now work. Separating generator and verifier: a review agent reviews the code without sharing context, and the coding agent then filters the review comments against the user's original request, which avoids endless back-and-forth edits. The "smart friend": a fast, cheap primary model hands hard problems to a stronger model, the difficulty being whether the weaker model can tell when to ask for help. Structured splitting, parallel execution and synthesis: a manager splits the task, spawns sub-agents and aggregates their results. He also holds that unstructured swarms of agents negotiating with each other basically do not work, and that agents writing in parallel still cannot make consistent decisions.

Follow-up questions

Follow-up 1: What makes a comparison between single-agent and multi-agent systems fair?

The comparison must be made at the same token budget. Multi-agent systems often use several times as many tokens, and tokens by themselves improve results. The fair approach is to give the single agent the tokens the multi-agent system used, for more samples, longer reasoning or best-of-N, and then compare accuracy; ideally one plots the cost–accuracy curve rather than comparing a single point (see Chapter 6).

Follow-up 2: Why are coding agents mostly single-agent, while deep research often uses multiple agents?

Because the two kinds of task have different read–write structures. Deep research is read-heavy, searches in different directions can run in parallel, and sub-agents only need to return short conclusions that do not conflict with each other; coding is write-heavy, every change lands in the same codebase, and every change carries implicit decisions about style, interfaces and edge cases, so several agents writing in parallel easily conflict. That is why the common multi-agent uses in coding are read-only search sub-agents or an independent review agent.

Follow-up 3: What is the core argument of Cognition's "Don't Build Multi-Agents", and do you agree?

The core argument is to share context and avoid conflicting implicit decisions. I agree with its judgment on parallel writes: the decisions several agents make separately cannot automatically stay consistent, which is a structural problem. But it does not say multiple agents can never work, and the author himself acknowledged in 2026 that, as long as writes stay single-threaded, extra agents for read-only search, independent review or advice are effective. So my view is: reads can run in parallel, but writes should stay single-threaded.

Follow-up 4: Why can't stronger base models alone fix all multi-agent failures?

Because many failures come from system design, not from the ability of any single agent. In MAST, unclear role definitions, missing termination conditions, failing to ask for clarification and missing verification steps are all organizational problems; just as with a team of capable people, poorly designed division of labor and procedures lead to failure regardless.

Common mistakes

  • Do not assume multiple agents are better than one by default: On tasks where each step depends on the last, multiple agents can be clearly worse.
  • Do not compare single-agent and multi-agent systems at different token budgets: The extra tokens improve results by themselves.
  • Do not say Cognition believes multiple agents can never work: It argues against parallel writes, and later acknowledged that read-only and review-style multi-agent setups work.
  • Do not let downstream agents trust upstream output unconditionally: Without verification points, errors are amplified rather than corrected.

4.7 What is the orchestrator–worker pattern? ★★

One-sentence answer

In the orchestrator–worker pattern, a lead agent analyzes the question, makes a plan and dynamically spawns several sub-agents; each sub-agent searches and reads in parallel in its own context and returns only condensed conclusions, and the lead agent then judges whether more dispatching is needed. It is especially suited to breadth-first, read-heavy research tasks whose path cannot be fixed in advance; in essence, each sub-agent is a compressor, letting the system effectively spend far more tokens than one context window holds.

I will answer in four parts: why research tasks suit this pattern, its workflow, its key design points, and its limitations.

(1) Research tasks have three traits that match the strengths of the orchestrator–worker pattern.

  • Breadth-first: Something like "find the board members of every listed company in a given industry" requires dozens of independent lookups, and a single agent searching one after another is slow and prone to giving up halfway.
  • Heavy reading: Search results, web pages and papers quickly fill a context window, while only a small part of them is actually useful.
  • A path that cannot be fixed in advance: The research direction has to keep adjusting to intermediate findings, so fixed workflows do not apply.

The orchestrator–worker pattern addresses exactly these problems: the lead agent splits the question into several aspects and sends multiple sub-agents to explore them in parallel; each sub-agent searches and reads in its own context and finally returns only one or two thousand tokens of key points. As a result, the amount of information the whole system can process grows with the number of sub-agents, while the lead agent's context stays far smaller than what the sub-agents actually read.

(2) The workflow has five stages: plan, dispatch, parallel search, synthesize and iterate, and cite and write.

  • Plan: The lead agent analyzes the question, makes a research plan and writes it to external memory, so the plan is not lost even if a long context gets truncated.
  • Dispatch: Based on the plan, it creates several sub-agents and writes a detailed task brief for each.
  • Parallel search: Each sub-agent runs its own "search, read, judge, refine the query" loop in a separate context, and can call several tools at once.
  • Synthesize and iterate: Sub-agents return condensed findings, and the lead agent judges whether the information is sufficient; if not, it revises the plan and dispatches new sub-agents.
  • Cite and write: Finally, a dedicated step matches every claim in the report to its source, producing a final report with citations.

The wall-clock time of the whole process is roughly the planning time plus the slowest sub-agent plus the synthesis time, not the sum of all the searching (see 4.1).

(3) The key design points are the task brief, the allocation of effort, and how information is passed back.

  • The quality of the task brief decides success or failure: A sub-agent cannot see the lead agent's context, so its entire understanding of the task comes from the brief. A good brief spells out the objective, the output format, the suggested tools and sources, and the boundaries of the task (what to leave alone, to avoid duplicating other sub-agents); when briefs are vague, the usual result is that several sub-agents duplicate work while some aspects are covered by no one.
  • Scale effort to difficulty: An unconstrained orchestrator will spawn too many sub-agents for simple questions, or search endlessly for information that does not exist, so allocation rules need to be written into the prompt: a simple fact lookup uses only one agent, and only complex research sends many sub-agents.
  • Start wide, then narrow: Sub-agents tend to open with long, very specific queries that return nothing; a better strategy is to do what human researchers do and start with short, broad queries to get the lay of the land, then gradually focus.
  • Reduce "telephone game" losses: Sub-agents can write their full findings directly to files or shared storage and return only lightweight references and summaries to the lead agent, which avoids distortion when the lead agent relays the information and also saves the lead agent's context.

(4) The limitations of this pattern come mainly from cost, the isolation of sub-agents from each other, and the engineering problems of long runs.

  • High cost: A multi-agent research system uses about 15× the tokens of an ordinary chat, so it only makes sense for tasks of high enough value.
  • Sub-agents are isolated from each other: Sub-agents usually do not talk to each other, so they may search the same things twice and cannot promptly share a finding that should change direction.
  • Conclusions go unverified: The lead agent easily accepts sub-agents' conclusions without checking, so one sub-agent's error goes straight into the final report; verification and citation checks are needed.
  • Synchronous execution is a bottleneck: If the lead agent waits for all sub-agents, the slowest one holds up the whole system, and the lead agent cannot redirect sub-agents while it waits; asynchronous execution is more efficient but brings new problems in coordinating results, keeping state consistent and containing error propagation.
  • Recovery and debugging are hard: Such systems are long-running and stateful, so after a failure midway they need to resume from a checkpoint rather than start over; and since every run takes a different path, debugging is difficult.

In addition, the pattern only suits tasks that are truly parallelizable and read-heavy; for tightly coupled tasks, the problems discussed in 4.6 remain.

In summary: the core of the orchestrator–worker pattern is to use several separate contexts for parallel reading and compression, with one lead agent responsible for planning, verification and writing; its effectiveness comes largely from letting the system spend more tokens effectively.

Responsibilities of each component:

Component Responsibility Information it sees
Lead agent (orchestrator) Plans, dispatches, synthesizes, decides whether to continue The user's question, the research plan, summaries returned by sub-agents
Sub-agent (worker) Searches, reads and compresses one aspect Its own task brief and search results
Citation agent Matches claims in the report to sources The draft report and the collected sources
External memory / file system Stores the plan and detailed findings Read by every agent as needed

Going deeper: Anthropic's multi-agent research system

(1) Composition and effectiveness.

The multi-agent research system that Anthropic (2025) described publicly is a textbook case of this pattern: the lead agent uses Claude Opus 4, the sub-agents use Claude Sonnet 4, and a citation agent attaches citations to claims. On an internal research evaluation, it outperformed a single Claude Opus 4 agent by 90.2%, with the biggest gains on breadth-first questions that require pursuing several directions at once. For example, on a task to find the board members of every company in the S&P 500 Information Technology sector, the multi-agent system split the work into separate lookups, while the single agent, searching serially, was too slow and failed to find them all.

(2) Tokens are the main driver.

Their analysis on BrowseComp found that three factors, token usage, the number of tool calls and the choice of model, explain about 95% of the variance in performance, with token usage alone explaining about 80%. This shows that much of what the multi-agent architecture does is let the system spend more tokens effectively: several separate contexts work in parallel, breaking past the limit of a single context.

\[ \text{Reading capacity} \approx N \cdot W, \qquad \text{Lead context} \approx \sum_{i=1}^{N} \ell_i \ll N \cdot W \]

Here \(N\) is the number of sub-agents, \(W\) is the size of each context window, and \(\ell_i\) is the length of the summary returned by sub-agent \(i\) (typically one or two thousand tokens).

(3) Rules for scaling effort to difficulty, and the benefit of parallelism.

Question type Number of sub-agents Tool calls per sub-agent
Simple fact lookup 1 agent 3–10
Comparison 2–4 10–15 each
Complex research More than 10, with clearly divided responsibilities Depends on the task

Early versions would spawn 50 sub-agents for a simple question, or search endlessly for information that did not exist; this was brought under control only after these rules were written in. With the lead agent spawning several sub-agents at once and the sub-agents calling several tools at once, research time on complex questions was cut by up to about 90%.

(4) Evaluation.

Since every run takes a different search path, they focus on the end result rather than checking each step against a prescribed process, with an LLM judge scoring factual accuracy, citation accuracy, completeness, source quality and tool efficiency (agent evaluation is covered in Chapter 6).

(5) Not every deep research system uses multiple agents.

Some systems use a single agent trained end to end with reinforcement learning to carry out long searches and reasoning (see Chapter 5; training search agents with RL is covered in the RAG direction, Chapter 5).

Follow-up questions

Follow-up 1: If you had to design a deep research system, how would you design its multi-agent architecture?

I would use one lead agent plus a layer of parallel, read-only sub-agents, together with citation and verification steps. The lead agent analyzes the question, makes a plan and writes it to external memory, decides how many sub-agents to send according to the difficulty of the question, and writes each sub-agent a brief with a clear goal, format and boundaries; the sub-agents search wide and then narrow in separate contexts, write detailed findings to files, and return only summaries and references; the lead agent synthesizes, judges whether another round is needed, and finally a citation step checks the source of every claim. For evaluation, I would focus on the quality of the final report and compare against a single agent at the same token budget.

Follow-up 2: How do you stop the orchestrator from spawning too many sub-agents for simple questions?

Write rules for scaling effort to difficulty into the prompt, and set budget caps. For example, a simple fact lookup uses only one agent and a few tool calls, a comparison uses a few sub-agents, and only complex research sends many; at the same time, cap the total number of sub-agents, tool calls and tokens, and check in evaluation whether the effort matches the difficulty of the question.

Follow-up 3: What should a sub-agent return to the lead agent, and why?

Condensed conclusions, key evidence and references to the original material, not the raw material itself. The lead agent's context is the most precious resource in the whole system, so raw material should go into files or shared storage; the returned summary must be enough for the lead agent to make decisions, and the references let the lead agent or the citation step go back to the original text when needed, which keeps information from being distorted in relay.

Follow-up 4: A multi-agent research system takes a different path on every run, so how should it be evaluated?

Focus on the end result, score it along several dimensions with an LLM judge, and add human checks. Since there are many reasonable search paths, comparing the process step by step is meaningless; a better approach is to score the final report on factual accuracy, citation accuracy, completeness, source quality and efficiency, run it several times to estimate variance, and have humans spot-check trajectories to find problems the scores miss, such as a preference for low-quality sources.

Follow-up 5: What is the main reason a multi-agent research system beats a single agent?

The main reason is that it can spend more tokens effectively. Anthropic's analysis shows that token usage alone explains about 80% of the variance in performance; several separate contexts working in parallel let the system read far more material than a single window can hold. That is why cost must be reported alongside accuracy when evaluating such systems.

Common mistakes

  • Do not say sub-agents can see the lead agent's context: A sub-agent's entire understanding of the task comes from its brief.
  • Do not credit all of the gain to "smarter division of labor": Token usage itself is the single biggest driver.
  • Do not apply this pattern to tightly coupled writing tasks: Several agents editing the same code or document in parallel produce conflicting decisions.
  • Do not let the lead agent accept sub-agents' conclusions without checking: One sub-agent's error goes straight into the final report.