Deployed Lab

Module 2 · Agentic architecture and orchestration · Chapter 4

Coordinator and subagents: hub-and-spoke orchestration that covers the whole topic

19 min1 clickable picture1 coverage lab2 predictions5-question quiz5-min video review

Independent exam preparation. Not affiliated with or endorsed by Anthropic.

In 30 seconds

The picture: one hub, many spokes, no side roads.

Exam objective: Task statement 1.2

Orchestrate multi-agent systems with coordinator-subagent patterns (Domain 1, 27 percent). You should be able to:

The problem Harbor & Pine Outfitters is a made-up gear retailer. Compass, its research assistant, answered "How strong is demand for ultralight tents next season?" with a clean, cited report. Buyers ordered 600 tents at a made-up $350: $210,000. By January, 240 were unsold; markdowns cost about $64,000. Kavish, the solutions architect, found the coordinator had split the topic into three jobs, all about US online stores. Nobody searched Canada, specialty shops or lead times. The subagents did what they were asked. The split was too small.

New to the single-agent loop underneath this? Read chapter 3 first.

The plan for this chapter
  1. The hub-and-spoke picture.
  2. Why subagents start blank.
  3. Choosing which subagents to call.
  4. Splitting the topic.
  5. The refinement loop, and costs.
  6. Build and check coverage.

Step 1: One hub, many spokes

Like an airline hub, all flights pass through the middle. Three jobs:

  1. Decompose. Break the question into pieces covering the topic.
  2. Delegate. Send each piece to a subagent, with a clear brief.
  3. Aggregate. Collect results, find gaps, handle errors.
Hub-and-spoke orchestration in Compass A coordinator in the middle links two ways to four subagents. A gap check sits below it. Subagents never call each other. Buyerasks a question Coordinatorsplit, send, mergethe hub Web searchfinds public sources Document analysisreads files, pulls claims Synthesismerges findings Reportwrites the cited report Gap checkis coverage enough? No side links: subagents never call each other
  1. Only the coordinator hears the buyer's question, so one place tracks the run.
  2. The coordinator splits the topic: US demand, Canadian demand, lead times. This decides coverage.
  3. It calls web search and document analysis, each with its own brief. Subagents start blank.
  4. Findings return to the coordinator, not sideways, so it logs them and handles failures one way.
  5. The coordinator passes findings to synthesis, its only way to see them.
  6. The coordinator checks the draft against its list. Canada missing? It sends a targeted search, then synthesizes again.
  7. Coverage enough? The report subagent writes the final document.
  8. Direct calls hide errors and data from the coordinator.

Where the picture breaks down:

Next: what does a subagent actually know when it starts?

Step 2: Subagents start blank

A subagent is a contractor on day one: fresh context, no share of the coordinator's history. A good brief has:

"Look into tent demand" is a weak brief: the subagent picks its own scope and may repeat others. Isolation helps too: long tool output stays in the subagent; only a short result returns. Rule: if the subagent needs it, put it in the brief.

Next: should every question wake every subagent?

Step 3: Call only the subagents the question needs

A coordinator that always runs the full pipeline is a fixed workflow in disguise, and wastes money.

It may even answer alone. The rules live in its system prompt: what each subagent is for, and when to skip it.

Do this: walk the tree for a price lookup, restart for a broad report, then try "I am not sure".

What to notice: three of four paths skip a subagent, and the unsure path starts small. Prompt rules can be wrong, so test on real questions.

Next: how to slice a broad topic.

Step 4: Split the topic so nothing overlaps and nothing is missing

For ultralight tents: US demand, Canadian demand, specialty shops, online marketplaces, supplier lead times, price trends. Every task maps to an item, so unowned items show up.

The checklist itself can be too narrow. Have the coordinator consider regions, channels, time frames and source types first.

Next: a good split can still miss. The fix: a loop at the hub.

Step 5: The refinement loop and why all traffic goes through the hub

  1. Run round one of search and analysis, then synthesize.
  2. Compare the draft with the checklist and list gaps.
  3. Send a targeted query per gap (for example, "Canadian specialty-shop sales, last 12 months").
  4. Synthesize again. Repeat until coverage is enough or the round limit (2 or 3) hits.

Without a limit, a weak gap check can loop forever and burn money. Why must all traffic pass through the hub?

The coordinator owns the plan. A subagent searches what it is told to search. The report subagent sees only the findings it is given, so it cannot know Canada was left out. The fix: a broader checklist and a gap check at the hub.

Next: numbers: what selective calling and a second round cost.

Step 6: Worked example with real numbers

All numbers made up. Price: $3 per million input tokens, $15 per million output tokens.

Full pipeline run:

  1. Coordinator, 8,000 in, 1,000 out: 0.024 + 0.015 = $0.039.
  2. Web search, 30,000 in and 3,000 out: 0.090 + 0.045 = $0.135.
  3. Document analysis, 20,000 in and 2,000 out: 0.060 + 0.030 = $0.090.
  4. Synthesis, 12,000 in and 2,500 out: 0.036 + 0.0375 = $0.0735.
  5. Report, 6,000 in and 3,000 out: 0.018 + 0.045 = $0.063.
  6. Total: $0.4005, about $0.40.

Simple price lookup: coordinator $0.039 + web search (10,000 in, 1,000 out) $0.045 = $0.084. The full chain costs $0.4005 / $0.084, about 4.8 times more. At 200 lookups a month: $80.10 against $16.80, saving $63.30.

Overlap: three searches at 12 pages each: 36 fetches, 21 unique, 15 duplicate. About 42% wasted.

Refinement round for the Canada gap: gap check $0.039 + three searches at $0.045 = $0.135 + second synthesis $0.0735 = $0.2475, about $0.25.

So: an extra round, about $0.25. October's miss: $64,000.

0.4005 / 0.084 is about 4.8, so about 5 times. Always-on pipelines multiply cost on easy questions, and add wait time too.

Next: two short cases, then the lab.

Step 7: Two cases and the mix-ups to avoid

Case 1: the cheap question (made up) Lucia in finance asks, "What do this supplier's current payment terms say?" One fact, one public page: web search once, answer. Cost about $0.08. Lesson: the hub should be free to do less.
Case 2: the broad report (made up) Buyers ask for a report on trail-running footwear demand. Six-item checklist; round one covers four. The gap check flags seasonality and supplier capacity; round two closes them: six of six. Lesson: the loop catches what the first split missed.

Mix-ups to avoid

Next: build it.

Step 8: Hands-on lab

Lab: The Step 6 worked example, as a model you can drive. This lab runs in your browser and needs JavaScript enabled.

Field note, November 2026 Teams running multi-agent research systems commonly log every coordinator decision: plan, briefs, results, gap check. When a report is wrong, the log shows whether the split or a subagent failed: failure usually sits in the plan, not the workers. SDK details change, so check the current docs.

Chapter quiz

Five scenario questions. Score 70% or more to pass.

Review this chapter in 5 minutes

Watch the whole chapter recapped: hub and spoke orchestration, blank subagents, gap free splits and the refinement loop.

Decision rule: never researched? Fix the plan and gap check. Brief misused? Fix the brief.

Review

Glossary

Coordinator
The agent that plans, delegates, merges.
Subagent
A worker agent for one bounded task.
Hub-and-spoke
All messages pass through one hub.
Isolated context
A subagent's fresh memory, no coordinator history.
Brief
The task text written for a subagent.
Decomposition
Splitting a big question into tasks.
Aggregation
Combining several subagents' results.
Dynamic selection
Choosing subagents based on the question.
Partitioning
Each subagent gets a distinct slice of scope.
Coverage gap
A required subtopic no finding addresses.
Refinement loop
Check gaps, send targeted work, resynthesize.
Observability
Seeing and replaying what happened.

Next: "Spawn subagents and pass context: the Task tool, AgentDefinition and parallel calls".