1.2 Orchestrate multi-agent systems with coordinator-subagent patterns
Design hub-and-spoke multi-agent systems in which a coordinator decomposes the task, selects and delegates to subagents dynamically, aggregates results, handles errors, and iterates until coverage is sufficient.
Key points
- 1
Hub-and-spoke: the coordinator is the only component that talks to every subagent. All inter-subagent communication, error handling and information routing pass through it, which gives observability, consistent error handling and controlled information flow.
- 2
Subagents operate with isolated context. They do not inherit the coordinator's conversation history, do not see each other's work, and do not share memory between invocations; only their final message returns to the coordinator as the Task/Agent tool result.
- 3
The coordinator's responsibilities: analyse the query, decompose it, decide which subagents to invoke (and whether to invoke any), delegate with clear scope, aggregate the results, and decide when the task is done.
- 4
Dynamic selection beats fixed pipelines: a simple factual question should not run search → analysis → synthesis → report. Match the subagents invoked to the query's complexity instead of always routing through the full pipeline.
- 5
Overly narrow decomposition is the classic coordinator failure: every subagent succeeds, yet the report misses whole areas of the topic. When output is incomplete and subagents did their assigned work, look at what they were assigned, not at the subagents.
- 6
Partition scope to minimise duplication: give each subagent a distinct subtopic or source type, explicit in/out-of-scope boundaries and an output format. Identical vague briefs produce overlapping sources and uncovered aspects; adding more subagents with the same brief makes it worse.
- 7
Iterative refinement loop: the coordinator evaluates the synthesis output against its coverage plan or quality criteria, re-delegates targeted queries to search and analysis subagents for the gaps, and re-invokes synthesis until coverage is sufficient, bounded by a round limit. Re-running synthesis with "be more thorough" cannot create findings that were never researched.
- 8
Conflicting values from different sources are the coordinator's job to flag with attribution and resolve (or hand to synthesis clearly annotated); letting subagents message each other or write into a shared scratchpad hides failures and breaks the audit trail.
- 9
Multi-agent systems cost more tokens than a single agent; their payoff is parallel breadth and context isolation. Do not reach for a coordinator when a single agent or a fixed prompt chain covers the task.
- 10
Distractors the exam likes: giving the synthesis agent full web-search tools instead of routing research through the coordinator (contrast with a narrowly scoped
verify_facttool, which is fine), peer-to-peer subagent messaging, a bigger or faster model as a fix for planning failures, and running the pipeline twice to reconcile contradictions.
Read the source
Test yourself on 1.2 Orchestrate multi-agent systems with coordinator-subagent patterns
Ten questions, with the answer and explanation after each one.