A catalogue of about fifty multi-agent patterns: it names failures well, and prescribes metrics without publishing any.
Why this book
You hand a task to an AI, then have another AI review its work. Or you launch several at once. While everything goes well, nobody asks who checks whom. Then one day the reviewer lets a sloppy fix through, or the bill climbs without warning.
The book by Ali Arsanjani and Juan Pablo Bustos, two Google executives, takes on these failures. Its thesis, as I read it: a system of agents becomes reliable through its structure. You decide who produces, who judges, who may act, and when everything stops.
To show it, the book lines up a catalogue of about fifty patterns (my count). All follow the same mold: context, problem, solution, example, code, benefits, drawbacks. Three words come up everywhere:
- Pattern: a named solution to a problem that keeps coming back, like a recipe you recognize by its name.
- Agent: an AI that does more than answer. It acts on its own: it calls tools, writes files, runs commands.
- Feedback loop: one agent writes, another reviews and grades, then you repeat.
I run these loops every day with Claude Code, a programming assistant that runs in the terminal. I also launch agents in parallel. So I was looking for a book more advanced than the introductory manuals on both subjects. This one, on ExpertEdge, Packt's subscription platform, looked like it covered them.
Yet the book's examples almost always come from banking, logistics or manufacturing. I kept only what helps steer code agents. The bridge to that job is mine: it is flagged as "My reading".
I keep eight ideas from it, in two families. Ideas 1 to 3 are about control: who judges an agent's work, and under what condition that judgment is worth anything. Ideas 4 to 7 set the frame: failing cleanly, coordinating, limiting rights, capping spending. The last one says where to start.
The ideas that stay
1An agent doesn't grade its own paper
First family: control, starting with who judges. Reread your essay at midnight: you read what you meant to write, not what is written. The book says the same of an agent. One that produces a solution and then judges it, like a human, "struggles to be an objective critic of its own work" (lesson 111). It finds excuses for its mistakes.
So the book separates the two roles. The pattern is called Hybrid Planner + Scorer. In the book's example, a planner agent writes three advertising slogans, then a scorer agent ranks them.
The scorer still has to judge on the right criterion. A generic metric such as BERTScore only measures how much two texts resemble each other. The book calls it "logic-blind". A plan that deletes the data before backing it up can thus get a good score (lesson 112). So you need a grid specific to the trade. You calibrate it on a golden dataset: a set of cases whose right answer you already know.
This pair runs in a loop, but not the one you would expect. The book calls it the Self-Improvement Flywheel, in four beats: generate, evaluate, learn, deploy. Evaluate is the key step, because "an agentic system can only improve what it can measure" (lesson 110).
Learn, here, does not mean fixing the text. It means retraining the planner, then the scorer, on the graded feedback. That is fine-tuning: resuming a model's training on chosen examples.
The book's loop changes the model itself. When I have agents review a text, no model is retrained: only the text changes. A reviewer agent grades it, a writer agent fixes it, and you repeat until the grade passes a threshold set in advance. The book does not show that loop: its example grades once, with no retry.
2An agent that learns from its grader ends up fooling it
In the previous idea, the planner and the scorer are retrained on what the other produces. The book calls this setup Coevolved Agent Training. It creates a risk: a pupil ends up guessing what pleases the marker, stops trying to do well, and learns the mark scheme.
The book's example shows this risk (lesson 115). The planner fixes code, and the scorer grades its fixes. The planner discovers a trick: wrapping the error in a try/except block. The block swallows the error: the program no longer crashes, but the bug is still there. The scorer, trained on standard metrics, applauds. The system stops improving.
The book names two failures of this setup (lesson 114):
- Collusion: the planner learns to "game" the system and produces mediocre outputs that the scorer lets through. The try/except above is one case.
- Runaway divergence: the system drifts away from what the business wants, to push up an internal number the loop measures.
To cut both failures, the book prescribes external anchoring: a reference point the loop never retrains, like an exam marked by an outsider whose mark scheme the pupil does not know. Without "periodic human review or validation against a golden dataset", the loop risks these failures (lesson 114).
To get out of the dead end in the example, the book retrains the scorer on pairs of "patch" versus "real fix". The old tricks stop paying, and the planner has to learn to debug.
For a code agent, external anchoring takes three forms:
- the test that really runs;
- a reviewer that changes every round;
- a human who rereads a few results at random.
Loosening the tests to make them pass is the same cheat as the try/except.
3Two opinions beat one, if they are independent
A lone scorer can be wrong, or be fooled. So the book also proposes crossing several opinions. Before a major operation, you ask for a second medical opinion. It only helps if the two doctors don't come from the same school.
The book has two patterns on this model. Both go through an orchestrator: the coordinating agent that hands out the work and gathers the results. The two patterns differ in the number of agents:
- Parallel Execution Consensus: two independent agents get the same task, for example a credit score. Model A returns 720, B returns 725. The gap fits within the 10-point tolerance, so the orchestrator validates the average, 722.5. With 720 and 780, a human decides.
- Majority Voting: three agents or more vote. Two "approve" out of three, and the file goes through.
To keep these opinions independent, the book sets three conditions:
- an odd number of agents, "to prevent ties";
- agents "ideally... powered by different foundation models", that is, large language models from different vendors;
- a planned path for disagreement.
This setup has a price, and the book owns it: it is "the most expensive redundancy pattern" (lesson 75).
For code, this pattern takes a simple form. Three reviewer agents are launched in parallel on the same diff, the list of changed lines. Each has a different model or different instructions. Three copies of the same instructions, on the other hand, make you pay three times for the same mistake.
You could go further with reviewers from different vendors, for example Claude and ChatGPT. Two models from the same family tend to fail in the same place, so another vendor catches mistakes the first ones miss. I do not do it: it takes one more account and one more bill, and the code goes to a third-party company. I settle for different instructions for each reviewer, then a last pass by another Claude model. I have not measured what I let through this way.
4When an agent fails: rephrase, save, call the human last
Second family: the frame around the agents, starting with failure. Control catches a bad answer, but an agent can also fail outright. A key won't turn in the lock: forcing it is pointless. You pull it out and change the angle.
The book applies this rule to agents with four complementary patterns. The first one touches the prompt, the instruction sent to the model:
- Adaptive Retry with Prompt Mutation: when the failure repeats identically, "simply resending the same request is futile" (lesson 72). So you rephrase the prompt. Example: invalid JSON is retried with "think step by step, then format as JSON".
- Watchdog Timeout Supervisor: a timer wraps the call to the model. Past 10 seconds, it cancels the call and hands over to a simpler fallback agent.
- Incremental Checkpointing: each finished step is saved. If the summary service goes down, the rerun therefore resumes at the third step.
- Delayed Escalation Strategy: the human arrives last, with a complete file. Example: the agent is 85% confident against a 95% threshold. It retries twice, then the file goes to a human.
Of the four, saving is the easiest to show. Here is an imagined pseudo-code, not from the book. Before each step, the script checks whether it is already saved:
for step in ["clean", "entities", "summarize"]:
if exists(save, step):
state = load(save, step)
else:
state = run(step, state)
write(save, step, state)
The book then chains these patterns on a loan request (lesson 68). The chain follows this order: retry, automatic agent restart, fallback model, then escalation to a human. Each step is written to a log.
To judge these defenses, the book prescribes one metric per pattern, such as the recovery rate for retry. The table in the same lesson lists eight. The reason: "In a production-grade system, robustness cannot be a matter of opinion".
Saving step by step also works when several agents run at the same time. This is called a fan-out: a script launches, say, ten agents, one per document. Each agent writes its result to its own file as soon as it finishes.
Imagined example: the outage hits after seven agents. On the rerun, the script sees seven files already written and hands out only the other three. Without those files, it would redo all ten.
5One agent coordinates, the others execute, and code decides what's next
After one agent's failure, the next task is to organize the work of several. On a building site, the foreman decides who comes when. The mason lays the bricks, the electrician pulls the cables. If the foreman does everything himself, the site stops with him.
The book draws the Supervisor pattern from this. A central orchestrator breaks the work down and hands it to sub-agents, specialized agents. Then it decides what comes next.
This pattern comes with two rules:
- Do not build a God agent, an agent that does everything: it coordinates and it executes. The orchestrator only coordinates: it stays "solely responsible for coordination" (lesson 45). The work itself goes to the subagents.
- Start centralized: a single orchestrator at the center, which hands out the tasks and receives all the results. The book sees "a good starting point" in it (lesson 46).
The book illustrates this pattern with a loan request. An orchestrator agent chains three specialists: document verification, credit check, risk assessment. Under a score of 600, it rejects the file early.
Between these agents, no free prose. The book calls natural-language handoffs "a recipe for instability" (lesson 45). So it imposes strict output schemas: a response format fixed in advance, for example JSON with imposed fields.
The book is also wary of long chains: one agent hands a task to a second agent, which hands it to a third. Each link adds a full round trip with the model, so time and cost add up. Hence this warning: "be cautious with deep delegation chains" (lesson 137).
What remains is writing the sequence of steps, and the book wants it in code. Lessons 147 and 148 compare two agent-programming tools on the same case:
- CrewAI organizes agents into a team of roles. There, the intermediate agents "continued to operate despite the initial validation error" (lesson 148).
- LangGraph describes the flow as a graph of steps that read a shared state. A branch tested in code, called a conditional edge, looks at an
errorkey. As soon as a field is missing, it sends the file to rejection.
For code agents, I keep two rules. First, a single level: one orchestrator and specialists, with no middle manager. Second, a stopping rule that fits in one line is written in code, for example "stop after three tries". You do not ask an AI to decide when to stop: the book calls that an "LLM manager".
6An agent's rights are set in code, not in the prompt
Coordinating the agents is not enough: you also have to bound what each one may do. An intern prepares a transfer, but doesn't hold the bank's key.
The book applies this rule to an agent that drafts a suspicious-activity report (lesson 152). The agent gets the draft_report tool to write, not the submit_report tool to send. The workflow, the chain of steps, then waits for the green light of a human, the compliance officer. Code bounds the agent here: the sending tool is never given to it.
The prompt, the text of instructions given to the model, bounds nothing on the other hand, and the book admits it. The example in lesson 131 puts numeric success criteria in the prompt. It adds a verification loop to repeat three times. The book warns: "N=3 is not a Python parameter" (lesson 131). In other words, nothing in the code counts the three passes.
The book calls these instructions semantic guardrails: rules given to the model, which nothing in the code enforces. In production, it recommends evaluation tests outside the prompt, written with tools such as DeepEval or Ragas.
In Claude Code, the same boundary exists:
- a CLAUDE.md, the instruction file Claude Code reads at startup, is a semantic guardrail;
- a hook, a script run before or after an agent action, is a code guardrail, like a permission.
Only the code guardrail really stops an agent.
7A spending cap cuts the agent off before the bill
Bounding an agent's rights doesn't bound its spending. A mobile plan that cuts off at 100% spares you the 900-euro bill. The book applies this idea to agents under the name tokenomics.
This tokenomics counts in tokens. A token is a piece of a word: the unit the model counts and bills. Tokens become an internal currency here, with a quota per agent. The stakes are real: a learning loop can consume "10×–100×" the tokens of standard use of the model (lesson 117). The book doesn't source that figure.
The book's example shows the cap at work. An analyst agent finds 5,000 PDFs to summarize and gets a 50-dollar budget. Around the 50th PDF, 45 dollars out of 50 are already spent, which is 90% of the budget. A circuit breaker, like the one in an electrical panel, then cuts the collection and forces the report step with what the agent already has.
A minimal circuit breaker is a simple test in the script that launches the agent:
# imagined pseudo-code
if spent >= 0.9 * job_budget:
stop_collection()
produce_report(current_data)
Ten agents launched together spend roughly ten times faster. So the cap must be set before launching them, not after the first bad bill.
8Choose the patterns before the code, grow only when needed
One question remains: where to start, faced with about fifty patterns? The book answers with a method, pattern-first: patterns come first. You draw the plan before raising the walls. Likewise, you choose the patterns before the framework, the code library that runs the agents.
For the book, "Patterns generate architectures" (lesson 155). The framework is only an accelerator (lesson 153). The book immediately adds a brake: "Implementing every pattern at once is not only impractical but often unnecessary" (lesson 121).
So you start small, with a monolithic application: a single program, launched as one block. The orchestrator calls its specialists one after the other. It keeps its guardrails: a maximum delay, an escalation to a human.
This small application grows in stages. You move to separate services, small independent programs that talk to each other, when "driven by necessity" (lesson 122). The course frames it as two questions to ask: do you need more than three or four specialized agents, or long processing that runs in the background (lesson 125)?
My take, honestly
My verdict, 5.6 out of 10: a good dictionary of agent failures, inside a catalogue that measures none of what it prescribes. The catalogue is its list of patterns: it recommends remedies without ever showing, with numbers, that they work. I read it with two agent-pilot questions. How do you get an agent's work reviewed, then fixed, in a loop? And can several agents work at the same time? It half answers. It names the reviewer separate from the author and the conductor that splits the work. It says neither after how many review rounds to stop, nor from what point parallel work pays more than it costs. It mostly gave me words.
Its strength: names for failures I used to fix by instinct. Collusion, divergence, external anchoring: with these words, a failure takes one sentence to explain instead of a paragraph. The regular format also makes the catalogue easy to consult.
Its weaknesses, with what they cost you:
- Nothing is measured. The book prescribes metrics, but publishes no result. Its few figures are examples or targets. Take the 80% cut in drafting time at an anonymous bank, with no method or source. Cost: no way to know whether a pattern is worth its price.
- Many code examples fake the model. Instead of calling an AI, the code pretends. Only the loan case (lessons 128 to 141) and the framework comparison really run. Cost: the code can't be copied as is.
- On my two questions, it falls short. Its review example grades once, with no threshold or retry. On parallelism, a single code example runs agents at the same time (lesson 50). It has no cap on simultaneous tasks, and the final writer runs even if a collector failed. Cost: for steering code agents, I already knew more than the book.
- The course repeats itself. Each lesson restates the previous one and announces the next. About a third of the course is enterprise framing, on Google's tools. Cost: without sorting, you read three times too much.
My advice: read it selectively. Lessons 110 to 112, 114 and 115 cover the loops and their failures. Lessons 45 and 152 cover the orchestrator and bounded rights. For parallelism, four lessons ask the right questions:
- who gets the scarce resource (lesson 55);
- who settles a conflict (lesson 56);
- how to bound a debate with a maximum number of rounds (lesson 53);
- how to have agents pick from a task board (lesson 46).
The rest can be skimmed with no regrets.
Odilon
Still relevant in 2026?
The principles, yes: separate who produces from who judges, anchor control externally, cap costs, bound rights. The tools, much less. The book often runs on Vertex AI and Gemini, Google's platform and models, and on ADK, their agent kit. These model names and APIs move fast. So do the A2A and MCP protocols: two standards for connecting agents to each other and to tools. Hence a 5 out of 10 on the radar's "Aged well" axis.
On the code side, check before copying. Many code examples replace the model with a fake:
- the slogan scorer grades by
len(solution), that is, by the length of the text; - the "parallel" consensus of lesson 69 calls its two agents one after the other, on randomly drawn scores.
The book also contradicts itself on its maturity levels, its scale for ranking a system of agents. The loan case's single agent is level 3 in lesson 131. In lesson 140, it becomes a "quintessential Level 5 system".
Who is it for?
Read it if
- You already steer agents and want words for your loop failures: collusion, divergence, external anchoring
- You orchestrate several agents and want a shared vocabulary for architecture review (supervisor, consensus, vote, escalation)
- You have already read Chip Huyen's AI Engineering and want the multi-agent side
- You want to understand why an evaluator ends up fooled by what it grades, and how the book proposes to retrain it
Skip it if
- You have never written an agent: read AI Engineering first (the review, 8.2/10), stronger on the foundations and on measuring quality
- You are looking for benchmarks or code that runs everywhere: a good share of the code examples fake the model
- You expect recipes for Claude Code or code agents: the book gives none (no Claude Code, no git, no executed tests)
If you only read one of the two, it will be Huyen. This one comes next, as targeted reading.
This book is part of ExpertEdge, Packt's subscription for technical books. The code ODILON50 takes 50% off the yearly plan: the book on ExpertEdge. Affiliate link: I earn a commission if you subscribe with this code, and my ratings don't depend on it.
For going further
- The Spec-driven development with BMAD review: the other way to frame agents, through the specification.
- The The Claude Code Operating Model review: hooks, permissions and budget caps, on the tool side.
- The AI Engineering review: the book to read before this one.
Notes based on the 2026 ExpertEdge course version: 16 sections, 9 h 34. The "My reading" passages and the pseudo-code are mine, not the book's.
Comments (0)