Skip to content
AIMODELRACE

Module 11 of 11 · Expert · 10 min read

Multi-agent patterns

Orchestrator-worker, pipelines, debate and reviewers: when several agents beat one, and when they don't.

Key takeaways
  • 1Multiple agents help when work splits into independent parts or benefits from independent review.
  • 2Orchestrator-worker is the workhorse pattern: one agent plans and delegates, workers execute.
  • 3Debate between model instances can improve reasoning and factuality (Du et al., 2023).
  • 4Every hand-off loses context, so use as few agents as the job needs.

01Why more than one agent

A multi-agent system is several model instances, each with its own prompt, context and often tools, working on parts of a task. The benefits are parallelism (research five topics at once), focus (each agent sees only what it needs) and independence (a reviewer that didn't write the draft spots different problems). The costs are more calls, more latency and information lost at every hand-off.

02Common patterns

Du et al. (2023) found that letting several model instances debate over a few rounds improved mathematical reasoning and factual accuracy compared with a single model answering alone.

  • Orchestrator-worker: a lead agent breaks the task down, delegates sub-tasks to workers with focused briefs, and assembles the results.
  • Pipeline: specialists in sequence (researcher, writer, editor), each handing structured output to the next.
  • Parallel specialists and merge: several agents tackle the same problem from different angles, and a merge step combines them.
  • Reviewer or critic: one agent produces, another checks against criteria, in a loop.
  • Debate: agents propose answers, read each other's reasoning and revise over rounds, then converge or a judge decides.

03Writing the orchestrator prompt

The orchestrator's main job is writing good briefs. Each brief must stand alone, because workers can't see the orchestrator's context.

Example
You coordinate a research task. Break the question in <question> into 2 to 5 independent sub-questions. For each, write a self-contained brief for a worker who has never seen this conversation: the sub-question, why it matters to the overall goal, which sources to prefer, what to return (findings with source URLs and quotes), and when to stop. After the workers report, merge their findings, resolve or flag conflicts, and write the final answer. List any sub-question a worker couldn't answer.

04When a single agent is better

Many apparent multi-agent problems are solved by one good agent with good tools.

  • The task is tightly coupled, like editing one file where every change affects the others.
  • The context needed is large and shared, so splitting it leaves every agent seeing too little.
  • Speed and cost matter more than thoroughness.
  • You can't yet evaluate the single-agent version. Add agents only once you can measure the gain.

05Pitfalls

Treat agents like a small team: clear roles, clear briefs, clear hand-offs, and someone accountable for the final result.

  • Telephone game: details lost or distorted between agents. Pass structured outputs and sources.
  • Duplicate work: workers with overlapping briefs research the same thing. Make scopes distinct.
  • Runaway costs: agents spawning agents. Cap the number of workers and the total budget.
  • Echo chambers: debaters built on the same model may agree on the same mistake. Mix models or ground them in sources.

Finished reading?

Mark it complete to track your progress, then test yourself with the Loops, Graphs & Agents quiz.