Part 05›
✎

05. Multi-Agent Systems II: The LLM Era#

Level: Practitioner · Reading time: 15 min · Exercise: 90 min Prerequisites: Multi-Agent Systems I: Games and Self-Play

In one sentence: After this chapter you can decide, with a measured reason, whether a second LLM agent earns its cost for a given task.

Why this matters#

Your team proposes a three-agent design for a coding task: a planner, a coder and a reviewer, each a full model call per step. Early runs look better. The bill is about three times higher, each step takes about three times as long, and nobody can say whether the gain comes from the extra agents or from the better prompts that came with them.

The question of this chapter: when do several agents beat one?

The core idea#

Three different things are called "multi-agent". They have different costs and different evidence.

Meaning What happens What you ship
Training-time A population trains or selects one agent: self-play, a league of exploiters One agent
Test-time sampling Several answers are sampled in parallel and one is kept: best-of-N, consensus One agent, run N times
Run-time collaboration Role-specialized agents exchange messages while doing the task A system of agents

Oriol Vinyals's lecture is about the first kind. Noam Brown's is about the first two, with a short look at the third. Product teams spend most of their money on the third, and the two lectures say least about it. Keep the three apart: evidence for one does not transfer to the others.

What run-time collaboration buys, in engineering terms, is separate contexts. Each agent has its own context window (the text a model can consider in one call) and its own instructions. That gives you:

  1. Smaller, cleaner prompts. The coder does not carry the rubric the reviewer needs.
  2. Different tools and permissions for each role.
  3. A second look with different information. The reviewer can run the tests.
  4. Parallelism. Workers read separate documents at once.

What it costs: tokens and latency grow with agents times turns. Information is lost at each handoff. Errors compound along a chain. Every hop is another place for an injection attack. Evaluation gets harder.

How it works, step by step: a decision procedure#

  1. Build the single-agent baseline with the best tools and prompt you can write.
  2. Measure it on at least 20 cases: success, tokens, latency.
  3. Check the four reasons. Several agents can beat one when at least one holds: - The work splits into independent parts. - The contexts do not fit together, or the roles need different tools and permissions. - One agent can check another's output with information the other lacked. - A known, measurable failure mode can be attacked by an adversary you control.
  4. Pick the smallest pattern that fits (table below).
  5. Cap it: number of agents, number of turns, tokens.
  6. Run the 20 cases again. Adopt the design only if the gain passes a rule you set beforehand.
Pattern Use it when Avoid it when
Generator and critic The critic brings new information: tests, a rubric, retrieval The critic is the same model rereading the same context
Router with specialists Tasks fall into a few types that need different tools; one path runs per task Every task needs all the skills at once
Parallel workers and a synthesizer The input splits: many files, many papers The parts depend on each other
Handoffs Skills or permissions differ, and one agent is active at a time The handoff loses state the next agent needs
Debate with a judge The answer can be checked, and disagreement surfaces reasons The judge has no ground truth
Best-of-N with a checker Correctness is cheap to check, as with code that passes tests Judging is as hard as solving

Neither lecture covers debate. From general engineering experience it helps where the judge can verify; the judge's weaknesses are the subject of LLM as a judge. The router is Liu's constrained flow from chapter 03, and the roles are the conversational peers of chapter 02.

Worked example#

Before any quality question, count. The harness below sends the same 50 tasks through one agent and through a planner-coder-reviewer trio. The model is a stub that counts calls and words.

# bakeoff.py — what do a second and third agent cost? Count calls and time.
import time

class Meter:
    def __init__(self):
        self.calls, self.words, self.seconds = 0, 0, 0.0
    def llm(self, prompt):                       # stand-in for a real model call
        started = time.perf_counter()
        time.sleep(0.01)
        self.calls += 1
        self.words += len(prompt.split())
        self.seconds += time.perf_counter() - started
        return "answer"

def single(task, m):
    return m.llm(f"Solve: {task}")

def trio(task, m):                               # planner, coder, reviewer
    plan = m.llm(f"Plan: {task}")
    draft = m.llm(f"Code from plan: {plan}")
    return m.llm(f"Review and finalize: {draft}")

tasks = ["sort a list in Rust", "parse a date string"] * 25
for name, design in [("single", single), ("trio", trio)]:
    m = Meter()
    for task in tasks:
        design(task, m)
    print(f"{name:6} calls {m.calls:4}  words {m.words:5}  "
          f"{m.seconds / len(tasks):.2f} s per task")

Output on one machine (the seconds vary; the stand-in sleeps 10 ms per call):

single calls   50  words   275  0.01 s per task
trio   calls  150  words   675  0.04 s per task

Observe:

The scaling is the same outside the toy. In a June 2025 engineering report on its multi-agent research system, Anthropic wrote that agentic search used about four times the tokens of a chat, and the multi-agent system about fifteen times. Cognition, the company behind Devin, published an engineering note the same month arguing against splitting a task across agents, because each agent makes decisions the others cannot see. Brown recommends both notes as worth reading (52:00). Those are practitioners' reports on their own systems, not measurements you can copy. They bracket the trade: separate contexts buy focus and parallelism, and they cost tokens and shared understanding.

What the practitioners say#

Vinyals: why a population helps, at training time#

Figure 1. The exploiter loop in the AlphaStar League: the exploiter trains in secret, then joins the population.

flowchart LR
    M["Main agent settles on one tactic"] --> E["Exploiter trains against a frozen copy"]
    E --> H["Exploiter win rate"]
    H -->|"Still low"| E
    H -->|"High"| S["Exploiter joins the population"]
    S --> L["Main agent learns an answer"]
    L --> R["Exploiter starts over"]
    R --> M

Each round leaves the main agent with an answer to one more tactic, which is how the league builds robustness.

Brown: what parallel sampling buys#

Brown: on run-time collaboration#

From the Cognition note he reads a comparison he agrees with: when two engineers' changes conflict, they talk the differences out. Agents today, the quoted passage says, are not quite able to hold such long, proactive discourse with much more reliability than a single agent gives. He relays its closing view: the technology is moving fast, agents are close to it, and now is the right time to work on multi-agent systems (52:00, 54:00). His own assessment of LLM cooperation is that it is less impressive than it could be: many scaffolds, the hand-written code around the models, are heavily engineered and brittle (50:00).

So, when do several agents beat one?#

The lecturers show two things with evidence: a population of opponents builds a robust policy during training, and parallel sampling cuts latency when answers can be checked. They show nothing measured for agents that collaborate at run time, and Brown is skeptical about it (50:00).

The engineering judgment that follows. Several agents beat one when they add information or parallelism: a critic with tests, workers on separate documents, a specialist with its own tools. They lose when they only add opinions in sequence.

Pitfalls#

  1. No single-agent baseline. Fix: build it first, with good tools. One agent with the right tools beats a committee without them.
  2. A critic that knows what the generator knows. Fix: give it new information (tests, retrieval, a rubric) or remove it.
  3. Long chains. Each handoff loses state and compounds error. Fix: two hops is a warning sign; three is a redesign.
  4. Agents "negotiating" in a strictly opposed framing. Brown's cheap-talk result applies: talk gains nothing (chapter 04). Fix: change the reward so both gain, or remove the talk.
  5. Importing training-time lessons without a reward. Exploiters need a signal for who won. Fix: build the checker before the adversary.
  6. Unbounded turns. Fix: cap agents, turns and tokens.
  7. Forgetting the extra attack surface. Every message between agents can carry injected text. See jailbreaks and prompt injection.
  8. Judging multi-agent output as a whole. Fix: evaluate each handoff and the final result, in the harness of part 03.

Try it#

Take one task from your work and at least 20 real cases.

  1. Build the single-agent version and the smallest multi-agent pattern that fits one of the four reasons.
  2. Record success, tokens and median latency for both.
  3. Write your adoption rule before you look at the results, for example: adopt if success rises by at least 10 points and cost stays under three times the baseline.

You are done when you have a table with measured numbers for both designs and a one-paragraph decision that names the reason (parallelism, context, checking, adversary) or states that none applies.

Cost: 20 cases, two designs, a few thousand tokens each, on a small model: well under one dollar at 2025 prices.

Stretch goal: keep the multi-agent design but replace the critic's model with a deterministic checker (tests, a schema). Compare again.

Key takeaways#

Self-check#

  1. Which of these is a training-time multi-agent method? A. A planner and a coder exchanging messages B. A league of exploiter agents C. A router that picks a specialist D. Best-of-N with a checker
  2. What did Brown say about best-of-N? A. It is the most compute-efficient technique B. It often beats consensus but needs easy verification C. It has higher latency than chain of thought D. It requires several different models
  3. In Vinyals's league, what does a main exploiter do? A. Plays randomly to add noise B. Trains against frozen main agents and shows itself only once it wins often C. Judges the other agents D. Chooses which agent to deploy
  4. What is non-transitivity? A. Ratings that drift over time B. Agents of equal strength that beat each other in cycles C. Agents that refuse to cooperate D. Two agents that always tie
  5. A reviewer agent uses the same model and the same context as the writer. What is the likely result? A. Lower cost B. A second opinion without new information C. Faster responses D. Automatic correctness
  6. In Vinyals's comparison, what differs most between LLM use and StarCraft? A. The number of available actions B. Rewards cannot be fully specified for LLM tasks C. LLMs have smaller contexts D. LLM users are always adversarial
Show answers 1. B. The league trains one policy; the others are run-time or test-time designs. 2. B. Verification has to be cheap for the pick to be trustworthy. 3. B. It reveals itself only after its win rate is high, then restarts. 4. B. At equal strength, A beats B, B beats C, and C beats A. 5. B. Without new information the critic adds tokens, not accuracy. 6. B. StarCraft has win and loss; open-ended LLM tasks do not.

Sources#

Next#

→ Agent Infrastructure: Sandboxes, Browser Use and Protocols, about what sits between an agent and the systems it acts on.