Six agent patterns as a ladder: single agent, sequential workflow, parallel workflow, evaluator-optimizer, supervisor and collaborative. Each step up gives more autonomy but costs more tokens and is harder to debug.A staircase of six boxes rising from left to right. The lowest box is the single agent, marked as an agent. The next three are sequential, parallel and evaluator-optimizer, marked as workflows. The top two are supervisor and collaborative, marked as multi-agent. An arrow along the bottom runs from more control and lower cost on the left to more autonomy, more tokens and harder debugging on the right. Six patterns, one ladder Climb a step only when the step below fails a measured test agent Single agent one loop, tools workflow Sequential fixed steps workflow Parallel fan-out, fan-in workflow Evaluator- optimizer draft, check, retry multi-agent Supervisor agents as tools multi-agent Collaborative peer to peer more control, lower cost, easier audit more autonomy, more tokens, harder to debug

Anthropic published a 30-page guide called Building Effective AI Agents: Architecture Patterns and Implementation Frameworks. It describes six patterns, from one agent in a loop to agents that talk peer to peer. It also gives a framework to choose between them. This post reads the guide as a production engineer. For each pattern, it asks what breaks, why it breaks and what fixes it.

The guide is a good map. It is also a sales document, and some of its numbers lose their conditions on the way from the original research to the PDF. Part 4 puts those conditions back.

Part 1The mapWhat the guide says, in one table

Agent or workflow

The guide uses one definition from Anthropic's earlier post, Building effective agents (December 2024). A workflow is a system where "LLMs and tools are orchestrated through predefined code paths". An agent is a system where the LLM decides its own steps and its own tool calls. Your code owns the control flow in a workflow. The model owns it in an agent.

This one difference decides most of what follows. When your code owns the control flow, you can estimate the cost, write a test for each step and explain a decision to an auditor. When the model owns it, you get flexibility, and you pay for it in tokens and in debugging time.

The six patterns

PatternHow it worksUse it whenAvoid it when
Single agentOne model in a loop: plan, call tools, read results, adjust, stop.The path is open-ended and you cannot know the number of steps in advance.You need the right answer on the first try, every time.
Sequential workflowFixed stages. Each stage gets the output of the stage before it.The task splits cleanly into fixed subtasks. You trade latency for accuracy.A single agent can do the few stages, or the work needs backtracking.
Parallel workflowFan-out to several agents on independent subtasks, then fan-in.Subtasks are independent, or several views (votes) raise confidence.Agents must build on each other's work or change shared state.
Evaluator-optimizerOne model generates. Another model scores against criteria. Repeat.Clear criteria exist and each round gives a measurable gain.Criteria are vague, the first draft is good enough or the task is real-time.
Supervisor (hierarchical)A lead agent calls subagents as tools and merges their results.The task needs several specialties or more context than one window holds.A simple query would trigger the whole team.
Collaborative (swarm)Peer agents talk directly, through a shared thread, events or a blackboard.Open research or brainstorming, where surprise is useful.You need predictable behavior or an audit trail.

The guide also lists two "emerging" patterns. In dynamic agent generation, the system builds an agent at runtime from a library of prompts and tools, then removes it. The guide itself says that "no production systems currently implement true dynamic creation". In network (peer-to-peer) systems, any agent can call any other agent.

The decision framework

The guide asks four questions. They are the most useful two pages in the document:

QuestionAnswerStart with
How much control do you need?High (compliance, money, safety)Single agent or sequential workflow
Moderate (support, content, analysis)Supervisor
Low (research, brainstorming)Collaborative becomes possible
How complex is the domain?One domainSingle agent
Several domains, predictable stepsSequential or parallel workflow
Open-endedMulti-agent
What are your limits?Tight token budgetSingle agent or a careful parallel workflow
Time-to-market pressureSingle agent, with a plan to grow
Do you need deep domain expertise?One domain, known workflowsSingle agent with Agent Skills
Several domains that must coordinateMulti-agent, each agent with its own Skills

The fourth question is the newest idea in the guide. Before you add a second agent, try to add a Skill to the first one. A Skill is a package of instructions, scripts and tool integrations that the agent loads only when it needs it. It gives one agent a specialty without a second context window and without a handoff.

The guide's case studies are worth a look, with one caution. The numbers come from customers and Anthropic, and the guide gives no method for them. Examples: Intercom's Fin agent reports "up to 86%" resolution and 51% "out of the box". Inscribe reports fraud reviews that drop from 30 minutes to 90 seconds. Coinbase reports 99.99% availability for its support agents. Treat them as what a good deployment can reach, not as what your deployment will reach.

Part 2What breaks in productionEight problems, one or more per pattern

Each problem below is a composite. The shape is common, but the details are made up. Each one ends with public evidence of the same mechanism.

Problem 1: a "hello" that starts 50 subagents

What happens. A team ships a research assistant on the supervisor pattern. It works well on hard questions. Then the bill arrives. Most traffic is simple, such as "what is our refund window?", and the lead agent sends each one to a full team of subagents. A one-fact answer costs as much as a report.

Why. The lead agent decides how much work a query needs. Nothing in the prompt tells it what "enough" looks like, so it does too much. A model that is good at decomposition finds a way to decompose anything.

The fix. Put the effort rules in two places:

  1. In the prompt, as explicit scale rules. Anthropic's research system uses these: "Simple fact-finding requires just 1 agent with 3-10 tool calls". Direct comparisons get 2-4 subagents with 10-15 calls each. Complex research can use more than 10 subagents.
  2. In code, as hard limits. A prompt is a request. A counter is a guarantee. Part 3 shows a budget class that stops the run when a counter reaches its limit.

Also put a cheap router in front of the expensive pattern. The guide calls this hybrid "single agents with multi-agent escalation". Most queries never reach the team.

In the wild. Anthropic's post on its multi-agent research system lists the early failures it saw: "spawning 50 subagents for simple queries", "scouring the web endlessly for nonexistent sources" and "distracting each other with excessive updates". The effort-scaling rules above are the fix that the team describes.

Problem 2: the supervisor plays telephone

What happens. A support system uses a supervisor with a billing subagent. The billing agent finds the exact answer: "Refund of $42.10 issued to the card that ends in 4417 on 3 March." The supervisor rewrites it for the customer as "Your refund is on its way." The customer asks which card. The supervisor does not know, because it summarized the detail away.

Why. In the supervisor pattern, the guide says subagents "are treated as tools". The subagent's answer comes back as a tool result, and the supervisor writes the reply. Each rewrite is a chance to drop or change a fact. The supervisor also passes its own routing chatter into the subagent's context, which adds noise there.

The fix.

  1. Give the supervisor a forward_message tool. When a subagent's answer is already good, the supervisor sends it to the user unchanged.
  2. Remove the handoff messages from the subagent's context. The subagent needs the task, not the supervisor's thinking about who should do it.
  3. Ask subagents for structured results (amount, card suffix, date) and not prose. Structured fields survive a rewrite better than a sentence does.
In the wild. LangChain's multi-agent benchmark (June 2025) traced the supervisor's weak score to "the 'translation' the supervisor is doing", and compared it to the game of telephone. A forward_message tool and the removal of handoff messages were part of the changes that gave "a nearly 50% increase in performance on this benchmark".

Problem 3: parallel agents make different assumptions

What happens. A coding agent splits "add dark mode" into two parallel subtasks. One subagent adds CSS variables under a .dark class. The other reads the system setting with prefers-color-scheme and never sets a class. Each subagent passes its own review. Together, the result does not work.

Why. Every action carries decisions that nobody wrote down. The guide warns against parallel workflows "when agents can't reliably coordinate changes to shared state". Code, a shared document or a shared database is shared state. Each subagent saw the task, but not the other subagent's choices.

The fix.

  1. Run in parallel only the work that reads: search, analysis, review, votes. Keep one agent as the only writer to shared state.
  2. If writers must run in parallel, make the decisions first. Write a short plan that fixes the shared choices (the class name, the API shape), and give the full plan to every subagent.
  3. Give subagents the full trace of earlier steps, not a one-line summary of the task.
In the wild. Cognition's post Don't Build Multi-Agents (June 2025) shows the same failure with a Flappy Bird clone. One subagent built a background "that looks like Super Mario Bros". The other built a bird that did not match it. Its two rules are "Share context" and "Actions carry implicit decisions".

Problem 4: the orchestrator runs out of context

What happens. A supervisor agent runs well for 20 turns. Then one subagent calls a log-search tool that returns 180,000 tokens. The supervisor's answers get worse, then the API rejects the request because the context is too long.

Why. The guide names this as the key challenge of the hierarchical pattern: the context "grows too complex for one agent to manage effectively". There are two separate failures here. A hard failure happens when the window overflows. A soft failure happens earlier: Anthropic's context engineering post describes "context rot", where recall gets worse as the context grows, long before the limit.

The fix. The guide gives three tools, and they work at different layers:

  1. Cap tool output at the source. Add pagination, range selection, filters and truncation, with sensible defaults. The guide suggests a cap "something like 25,000 tokens".
  2. Clear old tool results. On the Claude API, context editing with the clear_tool_uses_20250919 strategy clears tool results when the context grows past a threshold that you set.
  3. Move state out of the window. The memory tool lets the agent write notes to files and read them back later. Your application runs the file operations, so you control where the data lives.

Fix 1 matters most. Fixes 2 and 3 clean up after a large result. Fix 1 stops the large result.

In the wild. Anthropic's Writing effective tools for agents says: "For Claude Code, we restrict tool responses to 25,000 tokens by default." That is the source of the guide's number.

Problem 5: the evaluator loop that does not stop

What happens. A team uses an evaluator-optimizer loop to write release notes. The evaluator's criterion is "clear and engaging". Each round, the evaluator finds a new detail to improve, and the generator changes it. The loop stops only at the request timeout. The output of round 9 is not better than round 3.

Why. The guide says to avoid this pattern when "evaluation criteria are subjective or unclear". A vague criterion has no pass state. An evaluator that must return feedback always finds some feedback.

The fix.

  1. Write criteria that can pass: "every endpoint in the code has a section", "every example compiles", "no paragraph over 80 words".
  2. Run the deterministic checks first, in code: tests, a linter, a schema check. Use the model evaluator only for what code cannot check.
  3. Cap the rounds. The guide's API documentation example "typically runs 2-4 cycles". Stop at a fixed number, and keep the best-scored draft, not the last one.
In the wild. We did not find a public post-mortem of an evaluator loop that would not stop. The closest evidence is the MAST study of multi-agent failures (Cemri et al., 2025). It sorts 14 failure modes into three groups. One group is "task verification": the system checks the work badly, or does not know when the work is complete. Anthropic's "scouring the web endlessly" from Problem 1 is the same missing stop condition.

Problem 6: collaborative agents pass the task back and forth

What happens. In a peer-to-peer support system, the refunds agent decides an issue is a shipping problem and hands it over. The shipping agent decides it is a refund problem and hands it back. No agent fails. The ticket never closes.

Why. In the collaborative pattern, the guide says "coordination emerges from agent interactions rather than being imposed by a central authority". When no one owns the task, a handoff is always a valid move. The guide names the risk directly: "preventing agents from bouncing tasks indefinitely".

The fix. Give every task one owner at a time, a hop counter and a hop limit. When the counter reaches the limit, send the task to a human or to a fixed fallback agent. Log each handoff with the reason, so you can find the pair of rules that causes the loop.

In the wild. The MAST study's second group of failures is "inter-agent misalignment". Our post on deadlock in AI agent systems shows the full mechanism, with code that detects the cycle and breaks it.

Problem 7: the agent with the production credentials

What happens. A coding agent has write access to the production database. The user tells it, in the chat, that there is a code freeze. The agent runs a destructive command anyway.

Why. An instruction in the prompt is not a permission check. The model reads the instruction and usually follows it. "Usually" is not a control. The guide's first decision question covers this: when control needs are high, start with a single agent or a sequential workflow. That advice helps, but it is not enough alone. A single agent with a DROP TABLE tool is still a single agent.

The fix.

  1. Enforce limits outside the model. The agent's credentials must not allow what the agent must not do. Use a read-only role by default.
  2. Put destructive tools behind a human approval step in code, not in the prompt.
  3. Keep development and production data separate, and test the restore path before the agent ever needs it.
In the wild. In July 2025, The Register reported a Replit incident. During a code freeze, Replit's agent deleted the production database of SaaStr founder Jason Lemkin. Lemkin wrote: "There is no way to enforce a code freeze in vibe coding apps like Replit." The agent also said that a rollback was not possible. The Register adds that the rollback did work.

Problem 8: a failure at step 40 restarts at step 1

What happens. A long research agent makes 40 tool calls over 15 minutes. At call 41, a third-party API returns a 503. The run fails and the user starts again. The second run costs the same as the first. On another day, a deploy restarts the worker pods and kills every agent that was running.

Why. An agent run is a long, stateful process. A web request is short and stateless, so a retry is cheap. An agent retry repeats every step and every token.

The fix.

  1. Checkpoint after each tool call: the messages, the tool results and the plan. On failure, continue from the last checkpoint.
  2. Make every tool with side effects idempotent. A resumed run may call the same tool again. See idempotency keys for the pattern.
  3. Deploy without killing running agents. Keep the old version alive until its runs finish, and send only new runs to the new version.
In the wild. Anthropic's research system post has a section called "Agents are stateful and errors compound". The team "built systems that can resume from where the agent was when the errors occurred", and it uses "rainbow deployments to avoid disrupting running agents".
Part 3A starting designOne agent, a router and a budget that code enforces

Single agent with escalation

The guide's advice reduces to one rule: start simple and add complexity only when it "delivers measurable value". In code, that becomes a router, a budget per tier and one escalation path. The sketch below is TypeScript. It shows the control structure only. classify and runTier stand for your model calls. The limits are examples, not recommendations. We did not run this sketch against a model.

TypeScript
type Tier = "single" | "workflow" | "multi";

type Limits = { maxToolCalls: number; maxSubagents: number; maxTokens: number };

// Example numbers. Set yours from your own traces.
const LIMITS: Record<Tier, Limits> = {
  single:   { maxToolCalls: 10,  maxSubagents: 0, maxTokens: 60_000 },
  workflow: { maxToolCalls: 30,  maxSubagents: 0, maxTokens: 200_000 },
  multi:    { maxToolCalls: 150, maxSubagents: 5, maxTokens: 1_000_000 },
};

class BudgetExceeded extends Error {}

class RunBudget {
  private toolCalls = 0;
  private subagents = 0;
  private tokens = 0;

  constructor(private readonly limits: Limits) {}

  chargeToolCall() {
    if (++this.toolCalls > this.limits.maxToolCalls) throw new BudgetExceeded("tool calls");
  }
  chargeSubagent() {
    if (++this.subagents > this.limits.maxSubagents) throw new BudgetExceeded("subagents");
  }
  chargeTokens(n: number) {
    this.tokens += n;
    if (this.tokens > this.limits.maxTokens) throw new BudgetExceeded("tokens");
  }
}

async function handle(task: Task): Promise<Result> {
  // A small, fast model picks the tier. Most tasks should get "single".
  const tier: Tier = await classify(task);

  try {
    return await runTier(tier, task, new RunBudget(LIMITS[tier]));
  } catch (err) {
    if (!(err instanceof BudgetExceeded)) throw err;
    log.warn({ task: task.id, tier, limit: err.message }, "budget exceeded");

    // One escalation step only. Never escalate from the top tier.
    if (tier === "single") {
      return await runTier("multi", task, new RunBudget(LIMITS.multi));
    }
    return { status: "needs_human", taskId: task.id };
  }
}

Three details in this sketch matter more than the numbers:

  • The tool loop calls the budget, not the model. runTier calls chargeToolCall() before each tool runs and chargeSubagent() before each subagent starts. The model cannot talk its way past a counter.
  • Escalation happens once. A task that fails at the top tier goes to a person. It does not go back to the bottom.
  • The code logs every escalation with its reason. That log is how you learn whether the router is too cheap or too expensive. Without it, "add complexity when it delivers measurable value" has nothing to measure.

Grow it in steps

The guide describes an e-commerce platform that grows in five phases:

  1. One agent for customer questions.
  2. A router that splits order status, product questions and complaints.
  3. Specialist agents with shared context.
  4. Multi-agent coordination of inventory, payment and shipping.
  5. Evaluator agents for quality.

This is the right order. Each phase gives you traces that tell you whether the next phase is worth its cost.

Add the observability before phase two, not after phase four. The guide says it plainly: when an agent fails, "you can't simply examine a stack trace". You need the prompt, the tool calls, the tool results and the token count of every step. In a multi-agent system, you also need which agent called which, and with what context.

Part 4Six mythsWhere a number in the guide needs its conditions back

Myth 1: "Multi-agent systems are 90% better"

The guide says that "multi-agent systems outperform single-agent systems by 90.2%" for "complex tasks requiring pursuit of multiple independent directions simultaneously". The source is Anthropic's research system post. There, the setup was specific. A Claude Opus 4 lead agent with Claude Sonnet 4 subagents ran against a single Claude Opus 4 agent, on "our internal research eval". The example task was to find the board members of every Information Technology company in the S&P 500. That is a broad, parallel search task.

The same post gives a second finding that the guide does not repeat. In the BrowseComp evaluation, "token usage by itself explains 80% of the variance" in performance. A large part of the gain comes from the multi-agent system spending more tokens. That is a real gain, but it is a gain you buy. It is not free intelligence, and it does not transfer to a narrow task such as a refund.

Myth 2: "Multi-agent costs 10-15x a single agent"

The guide says: "Multi-agent systems use roughly 10-15x more tokens than single agents." The source says something different. It says agents "use about 4× more tokens than chat interactions", and "multi-agent systems use about 15× more tokens than chats". The comparison is to a chat, not to a single agent.

If you divide the two averages, a multi-agent system uses roughly 15 ÷ 4 ≈ 4 times the tokens of a single agent. That is a rough estimate from two averages, not a measurement. The practical point stays the same: measure your own token use per tier before you commit. The router in Part 3 gives you that number.

Myth 3: "Swarm beats supervisor"

The guide quotes "swarm architecture slightly outperforms supervisor architecture across the board". The word that matters is "slightly". The source is one LangChain benchmark: the retail domain of τ-bench, with gpt-4o and up to six distractor domains added. In the same post, small changes to the supervisor (Problem 2) gave it "a nearly 50% increase in performance". The main gap was the supervisor's rewrite step, not the shape of the graph. On your task, a well-built supervisor is easier to audit and may perform the same.

The same benchmark supports a different claim in the guide, and this one is useful. The single agent "falls off sharply when there are two or more distractor domains". If one agent has tools for six unrelated domains, it gets worse. That is a reason to split by domain, or to load tools and Skills only when the task needs them.

Myth 4: "Start with a framework"

The guide names LangGraph and Mastra as frameworks that help modular agents grow. That is true at scale. But Anthropic's own Building effective agents post says frameworks "often create extra layers of abstraction that can obscure the underlying prompts and responses". It suggests that "developers start by using LLM APIs directly". Learn the loop by writing it once. Then choose a framework whose abstractions you can read.

Myth 5: "Workflows are the old way, agents are the new way"

The guide does not say this, but many readers will take it from the title. The guide's own decision table sends high-control work to single agents and sequential workflows. It sends multi-domain but predictable work to sequential or parallel workflows. A workflow is not a lesser agent. It is the right tool when you can draw the steps in advance. In that case, you get a known cost, a test per step and a clear audit trail.

Myth 6: "Agents can build agents now"

Dynamic agent generation is in the guide, so it is easy to think it is ready. The guide itself says that "no production systems currently implement true dynamic creation", and that organizations should treat it "as experimental territory". Read that sentence before you plan a roadmap around it.

What the guide leaves out

The executive summary promises "Security and compliance frameworks for protecting sensitive data". The table of contents has no chapter for them, and the body does not cover permissions, prompt injection or tool access control. Problem 7 shows why that gap matters. For a production system, read the guide together with your own security review, and enforce tool permissions in code.

The guide also says little about evaluations. It says "measure everything", but it does not say how to build a test set for an agent. Without one, you cannot know if phase three is better than phase two.

The takeaway

  1. Climb the ladder one step at a time. Start with one agent, or a workflow if you can draw the steps. Add a Skill before you add an agent.
  2. Put limits in code, not in prompts. Budgets, hop limits, round limits and permissions must be counters and credentials, not requests.
  3. Read every number with its conditions. 90.2% was a broad research task with more tokens. 15× was against chat. "Swarm wins" was "slightly", on one benchmark.
  4. Trace from day one. The traces decide when to climb, and they are the only way to debug when you do.

Sources