CertPrep
Domain 1 · Lesson 1.1 · 9 min read

Orchestrating Multiple Agents in Production

Exam skillMulti-Agent Orchestration

Evaluating orchestration patterns for production multi-agent designs and inter-agent failures, including supervisor/worker hierarchies, parallel subagent dispatch, delegation and context-isolation boundaries, inter-agent communication, and human-in-the-loop and approval flows.

Choose the orchestration pattern a production workload needs, draw the delegation and context-isolation boundaries, make agents communicate through structured handoffs, and place approval gates where they stop only the action that needs a person.

What you need to know

A multi-agent system is a set of model contexts that hand work to each other. Each context starts with only what it is given. That single fact explains most production failures: duplicated work, lost findings, claims that lose their sources, and approvals that block more than they should. The exam describes a running system, shows you the evidence from its traces, and asks which change fixes the failure.

The patterns and when they earn their cost

PatternShapeFits whenWatch for
Supervisor and workersA coordinator splits the task, workers each do one part, the coordinator mergesThe parts are independent and the merge is well definedVague task messages; free-text results the merge misreads
Parallel subagent dispatchMany workers run at once on separate slicesBreadth-first research, partitioned searchOver-spawning, hung workers, silent gaps
Handoff between agentsOne agent finishes its part and passes the conversation onDistinct stages with different tools or policiesRe-asking for facts already verified; huge transcripts
Single agent with toolsOne context, possibly with subagents for isolated lookupsSteps depend on each otherContext growth on long tasks

Parallel agents cost several times the tokens of a single agent for the same task. They pay off only when the work divides into pieces whose intermediate steps the coordinator does not need to see.

Delegation is a written brief

A subagent starts with its own system prompt and the task message the coordinator writes, nothing more. If three subagents receive "research market trends in Asia-Pacific", they will overlap and miss things, whatever model they run. A good brief states:

  • the scope and what is out of scope,
  • the sources to prefer,
  • the output format, including a status field and an obstacles section,
  • the deadline or budget.

In Claude Code and the Agent SDK, the subagent's description does double duty: the main agent reads it to decide when to delegate, and uses it as guidance when writing the task message. A description that says "the delegator must name the files to review and the criteria" produces specific briefs.

Communication between agents

Free text between agents is the most common source of inter-agent failure. "Could not verify the policy number" can be merged as a pass. Use a schema:

FieldWhy
status (complete, partial, failed)The merge cannot mistake a failure for a finding
findings with source and verified per claimProvenance survives synthesis
obstaclesWorkarounds and errors reach the coordinator
run_idEvery worker span joins the coordinator's trace

Pass a compact, structured record between agents, not the whole transcript. A mortgage specialist needs "identity verified at 10:42 by the intake agent", not 18,000 tokens of conversation.

Isolation boundaries are security boundaries

When one context reads untrusted content (supplier websites, emails, tickets) and also holds a consequential tool (purchase orders, email, payments), any injected instruction can reach the tool. Split them: a read-only subagent processes the untrusted content and returns validated, structured fields; only the agent that never saw the raw text can act.

Containing failures in parallel dispatch

  • Deadlines per worker, enforced by the harness, with one bounded retry or an alternate source.
  • Honest gaps: if a worker still fails, the final result states what is missing. Never let the coordinator fill a gap from its own knowledge.
  • Caps on fan-out: a per-run limit on subagents and tokens in the harness, plus guidance on how many subagents each kind of question warrants. A prompt regression should not be able to multiply cost tenfold.
  • Separate write targets: parallel agents that share a file system each write to their own path; the coordinator merges.

Approval flows

An approval gate belongs where the action happens, enforced in the tool or permission layer, not in the system prompt. It should:

  1. stop only the action that needs a decision (one refund, one invoice), not the whole run;
  2. give the approver what they need to decide: the action, the amount, the evidence;
  3. have a timeout with a safe default when no one answers (for payments, decline);
  4. leave a record of who approved what.

Gating every action to control a few creates a queue that reviewers learn to rubber-stamp. Reviewing after the fact finds the bad refund after the money has left.

In the exam

Orchestration items describe a running multi-agent system and a failure seen in traces: overlap, missing coverage, misread results, runaway cost, an exploit, or an approval bottleneck. Find the boundary where information or control was lost, then pick the change that fixes that boundary: a clearer brief, a schema, a run ID, an isolation split, a harness cap, or a narrowly placed gate. Distractors add more agents, bigger models, longer summaries, peer-to-peer chatter, or prompt instructions.

Check your understanding

Question 1

A coordinator's briefings repeatedly cover one region three times. Traces show three subagents received the same one-line task. What fixes it?

Show answer

Answer: A. Subagents see only their own brief, so overlap comes from the delegation. Clear boundaries plus a coverage check fix both overlap and gaps.

Question 2

Which workload is the weakest fit for parallel subagents?

Show answer

Answer: C. Dependent steps need the discoveries of the steps before them, which parallel subagents cannot share. The other three split into independent pieces.

Question 3

An agent pauses refunds over $500 for a team lead. Which design is right?

Show answer

Answer: D. The gate must be enforced where the action happens and stop only what needs a decision. Prompt rules can be skipped, gating everything overwhelms reviewers, and weekly review is too late.

Apply it: Restructure Granite's fraud-review agent

Exercise · about 25 minCase: Granite Federal Bank

Granite Federal Bank wants to split its fraud-review agent into a coordinator and specialists: one reads transaction history, one reads device and login data, and one reads the free-text memos and dispute messages customers write. The coordinator writes the case summary and can open or close cases. A red-team test already showed that a memo containing instructions could make the agent add an external email address to a case.

  1. Decide which specialists should exist, and which tools each one gets.
    Why: the memo reader handles untrusted text.
  2. Define the result schema every specialist returns to the coordinator.
  3. Place the approval gates for closing a case and for any change to who is notified about a case.
  4. Set the failure-containment rules for a specialist that times out.
    Done when: the coordinator can never publish a summary that silently omits an area.
Check your work
Show model answer

1. Specialists and tools

SpecialistToolsWhy
Transactionsget_transactions (read-only, scoped to the alert's account)Needs history, nothing else
Device and loginget_device_events (read-only)Same
Memo readerNo tools; returns structured fields onlyIt reads untrusted customer text, so it must not reach anything that acts

Only the coordinator can call open_case and close_case. No agent can call a tool that changes notification recipients; that becomes an analyst action in the case system.

2. Schema. status (complete, partial, failed), findings (each with source, timestamp, verified), risk_signals (enumerated values), obstacles, run_id. The memo reader returns enumerated signals ("customer disputes merchant", "mentions travel") and a short quoted excerpt, never instructions.

3. Gates. Opening a case needs no approval. Closing a case as "not fraud" above a set amount pauses for an analyst, who sees the summary and the evidence. Notification changes are not an agent capability at all.

4. Containment. Each specialist has a deadline of 60 seconds and one retry. If a specialist still fails, the summary lists the missing area under "Not reviewed", the case stays open, and an analyst is assigned.

Key termsAgentMulti-agent systemOrchestratorSubagent

Sources