๐Ÿ“š Domain 1 ยท Task Statement 1.2

Orchestrate Multi-Agent Systems with Coordinator-Subagent Patterns

๐Ÿ“Š Domain Weight: 27% โญ High Exam Priority ๐Ÿ”— Scenario: Multi-Agent Research System

Multi-agent orchestration is where Claude truly scales. Instead of one agent trying to do everything, you build a coordinator that delegates intelligently to specialised subagents. This task statement tests your ability to design those systems correctly โ€” including how context flows, how scope is partitioned, and how the coordinator refines results iteratively.

๐Ÿ“‹ Contents

  1. Real-World Analogy โ€” The Project Manager & Specialists
  2. Hub-and-Spoke Architecture
  3. Context Isolation โ€” Subagents Start Fresh
  4. The Coordinator's Four Roles
  5. Dynamic Selection vs Full-Pipeline Routing
  6. Scope Partitioning โ€” Dividing Work Without Duplication
  7. Iterative Refinement Loops
  8. Anti-Patterns & Pro Tips
  9. Summary & Exam Key Points

๐Ÿข Real-World Analogy โ€” The Project Manager & Specialists

๐Ÿง‘โ€๐Ÿ’ผ Analogy โ€” Management Consulting Firm

Imagine a large consulting project. A project manager (coordinator) receives the client brief: "Analyse the impact of AI on the financial services industry."

The PM doesn't personally write every section. Instead, they break the work into specialisms and delegate: a market analyst researches trends and data, a regulatory specialist reviews compliance implications, a technology expert assesses AI tools being adopted, and a writer synthesises everything into the final report.

Crucially: each specialist works independently โ€” the market analyst doesn't see the regulatory specialist's notes unless the PM explicitly shares them. All communications flow through the PM. The PM reviews drafts, spots gaps ("We haven't covered insurance sector impact"), and sends targeted follow-up requests before delivering the final report.

This is exactly how a Claude coordinator-subagent system works.

๐Ÿ•ธ๏ธ Hub-and-Spoke Architecture

The architecture that has emerged as the standard pattern for multi-agent Claude systems is the hub-and-spoke model (coordinator-subagent pattern). In this architecture, a single coordinator agent sits at the centre and manages all orchestration, while specialist subagents sit at the periphery and execute specific assigned tasks.

๐ŸŽฏ The Three Coordinator Responsibilities
  • Task Decomposition: Analyse the user's request and break it into clearly bounded subtasks with minimal overlap between subagents. Good partitioning is either by subtopic (e.g. distinct themes) or by source type (e.g. academic vs news).
  • Dynamic Subagent Selection: Choose only the subagents needed for the specific request โ€” do not always route through the full pipeline.
  • Iterative Refinement: Evaluate subagent results for gaps; re-delegate targeted follow-up queries if coverage is insufficient.
Figure 1 โ€” Hub-and-Spoke: Coordinator at Centre, Subagents on Spokes
COORDINATOR Decomposes & Routes Aggregates Results ๐Ÿ” Web Search Searches & retrieves URLs ๐Ÿ“„ Doc Analysis Extracts & summarises โœ๏ธ Synthesis Combines findings ๐Ÿ“Š Report Gen Formats final output โœ… Fact Checker Validates claims Task delegation Result return

Key architectural rules of hub-and-spoke:

๐Ÿ’ก Why Not Let Subagents Talk Directly?

If Synthesis could call Web Search directly, you lose: (1) error handling consistency โ€” each subagent would need its own retry logic; (2) observability โ€” you can't easily log the full chain; (3) circular dependency risk โ€” Agent A calls B which calls A again. Routing through the coordinator eliminates all three problems.

๐Ÿงฑ Context Isolation โ€” Subagents Start Fresh

This is one of the most commonly misunderstood concepts โ€” and a frequent exam trap. Subagents do NOT automatically inherit the coordinator's conversation history. Every subagent invocation starts with an empty context, receiving only what the coordinator explicitly passes in the prompt.

๐Ÿ“ฆ Analogy โ€” Package Delivery Instructions

When you send a package with delivery instructions, the courier doesn't know your entire life history โ€” only what's written on the label you attached. If you forget to write "leave at side door," the courier won't know. Subagents are the same: they receive exactly the "label" (prompt) the coordinator writes, nothing more.

Figure 2 โ€” Context Isolation: What Each Agent Sees
COORDINATOR MEMORY User query: "AI in finance" Plan: decompose into 3 subtopics Web Search result: [10 articles] DocAnalyst result: [summary] Error log: retry #1 on search Synthesis draft v1 Coverage gaps identified โ€ฆ all conversation turns โ€ฆ passes only selected context SUBAGENT SEES Articles: [10 article texts] Task: "Synthesise these findings" โŒ No prior retries history HIDDEN FROM IT โŒ User's original query โŒ Coordinator's plan โŒ Other subagent results โŒ Error logs

What This Means in Practice

When invoking a subagent, the coordinator must explicitly pass everything the subagent needs to complete its task. Nothing flows automatically. This is a design responsibility โ€” the coordinator author must think carefully about what each subagent needs.

Python โ€” Explicit Context Passing to a Subagent
# BAD: Subagent will have no idea what articles to synthesise
subagent_prompt = "Please synthesise the research findings."

# GOOD: Everything the subagent needs is in the prompt
subagent_prompt = f"""You are a synthesis specialist.

TASK: Produce a 500-word synthesis of the following research findings.
TOPIC: {original_user_query}
QUALITY CRITERIA: Cite sources, flag conflicting data, highlight consensus.

WEB SEARCH FINDINGS:
{web_search_results}

DOCUMENT ANALYSIS FINDINGS:
{doc_analysis_summary}

OUTPUT FORMAT: Structured report with sections: Overview, Key Trends, Conflicts, Gaps.
"""
โญ Pro Tip โ€” Use Structured Data Formats for Inter-Agent Handoffs

When passing findings between agents, use structured formats (JSON or markdown tables) to clearly separate content from metadata (source URLs, dates, confidence scores). Unstructured prose handoffs cause the synthesis agent to lose attribution data, making citations impossible.

Example: instead of passing "Article X says AI adoption is 40%", pass {"claim": "AI adoption is 40%", "source": "McKinsey 2024", "url": "..."}.

๐ŸŽฎ The Coordinator's Four Roles

The coordinator isn't just a router โ€” it plays four distinct roles throughout the pipeline. Each role requires active intelligence, not just message passing.

1

Task Decomposition

The coordinator analyses the user's query to identify what subtasks are required. For the research system example, "impact of AI on creative industries" must be broken into: visual arts, music, writing, film, gaming โ€” NOT just "digital art, graphics, photography." Overly narrow decomposition is the primary root cause of incomplete reports and a key exam question type.

2

Dynamic Delegation

Based on the decomposed subtasks and the incoming query's complexity, the coordinator selects which subagents to invoke. Complex queries may require all agents. Simple factual queries may need only Web Search + Report Gen. The coordinator must not blindly route through the full pipeline every time.

3

Result Aggregation

The coordinator collects outputs from all subagents and assembles them into a coherent whole. This includes resolving conflicts, normalising formats, and preserving source attribution. It must know which subagent produced which finding.

4

Quality Gate & Refinement Decision

Before finalising, the coordinator evaluates coverage. Are there gaps? Is any subtopic underrepresented? If yes, it re-delegates targeted queries to specific subagents and re-invokes synthesis. This iterative refinement is the difference between a good system and a great one.

๐Ÿ”€ Dynamic Selection vs Full-Pipeline Routing

One of the key design skills tested is knowing when to invoke the full agent pipeline vs. a targeted subset. Blindly running all subagents on every query is wasteful and slower.

ScenarioRecommended RoutingWhy
"What year was GPT-3 released?"Web Search only โ†’ Report GenSimple factual query. Doc Analysis and Synthesis add latency with no value.
"Summarise the attached 50-page whitepaper"Doc Analysis only โ†’ Report GenInput is already provided. No web search needed.
"Comprehensive analysis of AI in healthcare across 5 years"All agents โ†’ Iterative refinement loopBroad scope needs web search, document analysis, synthesis, and fact-checking.
"Verify if claim X in this document is accurate"Doc Analysis + Web Search โ†’ Fact CheckerSpecific verification task. Report Gen not needed until after fact check.
"Generate a weekly news summary"Full pipeline alwaysOverkill โ€” most weeks only need Web Search + Report Gen.
โญ Pro Tip โ€” Coordinator System Prompt Design

Encode routing rules in the coordinator's system prompt using explicit criteria: "If the query requires information not in the attached documents, invoke the Web Search agent. If the query is purely about attached documents, skip Web Search." This lets Claude make routing decisions itself, rather than hard-coding routing logic in your application code.

๐Ÿ—‚๏ธ Scope Partitioning โ€” Dividing Work Without Duplication

When multiple subagents research the same broad topic in parallel, there's a risk of duplication (both agents find the same articles) or collisions (both agents are assigned "AI in healthcare" in full). Effective partitioning assigns distinct, non-overlapping scope slices to each agent.

โŒ Poor Partitioning

Agent A: "Research AI impact on creative industries"
Agent B: "Find information about AI and creative work"

Both agents search the same space. Results overlap by ~70%. Synthesis agent receives duplicate data and produces a bloated report.

โœ… Good Partitioning (by subtopic)

Agent A: "AI in visual arts & graphic design โ€” 2022-2024"
Agent B: "AI in music & audio production โ€” 2022-2024"
Agent C: "AI in writing, filmmaking & gaming โ€” 2022-2024"

Zero overlap. Each agent has a clear, distinct domain.

โœ… Good Partitioning (by source type)

Agent A: "Search academic papers & research journals"
Agent B: "Search industry reports & news articles"
Agent C: "Search social media trends & user sentiment"

Different source layers give complementary perspectives without duplication.

โœ… Good Partitioning (by time period)

Agent A: "Pre-2022 historical context"
Agent B: "2022-2023 adoption wave"
Agent C: "2024-present current state"

Temporal slicing ensures full chronological coverage.

๐ŸŽฏ Exam Alert โ€” The Narrow Decomposition Trap

Sample Question: "Your multi-agent research system is asked about AI's impact on creative industries. The final report covers only visual arts, missing music, writing, and film. Subagents all completed successfully. What is the root cause?"

Answer: Coordinator task decomposition was too narrow. The coordinator only assigned visual arts subtopics. The subagents did exactly what they were told โ€” the bug is in the coordinator's planning, not the subagents' execution. This is Task 1.2's signature question type.

๐Ÿ” Iterative Refinement Loops

A sophisticated coordinator doesn't just collect results once โ€” it evaluates quality, identifies gaps, and loops back to gather more targeted information before finalising. This is the iterative refinement pattern.

Figure 3 โ€” Iterative Refinement Loop
1. Decompose & Delegate 2. Subagents Research & Analyse 3. Synthesise Combine results 4. Evaluate Coverage gaps? Gaps found! Re-delegate with targeted queries for missing subtopics 5. Done Coverage sufficient OK โœ“ ITERATION 1: Initial pass Coordinator decomposes โ†’ delegates to all subagents โ†’ gets first synthesis draft Evaluator detects: "Music and film industries not covered" โ†’ triggers loop back ITERATION 2: Targeted re-delegation for missing subtopics โ†’ new synthesis โ†’ evaluate โ†’ sufficient โ†’ done

What Makes a Good Evaluation Step?

The coordinator's evaluation prompt should specify concrete coverage criteria. Without explicit criteria, Claude will generally say "looks complete" even when it isn't.

Prompt โ€” Coordinator Evaluation Step
# Coordinator evaluates synthesis for gaps
evaluation_prompt = """
Review the synthesis draft below and check for coverage gaps.

REQUIRED COVERAGE (all must be addressed):
- Visual arts (painting, sculpture, digital art)
- Music (composition, production, performance)
- Writing (journalism, fiction, copywriting)
- Film and video production
- Gaming and interactive media

SYNTHESIS DRAFT:
{synthesis_draft}

OUTPUT: JSON with keys:
- covered_topics: list of topics adequately addressed
- missing_topics: list of topics absent or insufficient
- sufficient: boolean (true only if ALL required topics covered)
- targeted_queries: specific search queries for any missing topics
"""
โญ Pro Tip โ€” Limit Refinement Iterations

Always cap your refinement loop (e.g., max 3 iterations) to prevent runaway costs. After the cap, produce the best report available and annotate which topics remain under-covered. This gives users useful output rather than a hung pipeline.

โš ๏ธ Anti-Patterns & Pro Tips

โŒ Subagent-to-Subagent Direct Calls

Letting the Synthesis agent call Web Search directly bypasses the coordinator. You lose: consistent error handling, observability, and deadlock prevention.

โŒ Always Running Full Pipeline

Routing every query through all agents regardless of complexity wastes tokens and adds latency. A "what year was X founded?" query doesn't need Doc Analysis or Synthesis.

โŒ Implicit Context Inheritance

Assuming subagents know the original user query or prior agent results. They don't โ€” everything must be explicitly included in the Task tool prompt.

โŒ Undifferentiated Scope Assignment

Giving multiple agents the same broad scope (e.g., "research AI in creative industries" ร— 3). Leads to duplicate findings and an inflated, repetitive synthesis.

Pro Tips Checklist

โœ… Pass Structured Metadata

Include source URLs, dates, and confidence scores in every inter-agent handoff. Prose-only handoffs lose provenance and make citing sources impossible.

โœ… Coordinator Prompts Specify Goals, Not Steps

Tell subagents what outcome is needed, not step-by-step instructions. This preserves their adaptability and lets them handle unexpected input formats.

โœ… Parallel Subagent Calls

Emit multiple Task tool calls in a single coordinator response to run subagents in parallel. Sequential calls for independent tasks multiply latency unnecessarily.

โœ… Log Everything at the Coordinator

Since all communication passes through the coordinator, instrument every delegation and result for observability. This is your audit trail for debugging production issues.

๐Ÿ“ Summary & Exam Key Points

๐ŸŽฏ Exam Scenario โ€” Multi-Agent Research System

The primary exam scenario for this task is: "You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports."


Questions will present a broken multi-agent system and ask you to identify the root cause. The root cause almost always traces to one of: (1) overly narrow task decomposition by the coordinator leading to incomplete coverage of broad topics, (2) missing explicit context passing to subagents, (3) subagents with wrong tool scope, (4) missing iterative refinement, or (5) wrong routing pattern (full pipeline for simple queries).

1
Hub-and-spoke is the canonical topology. All inter-agent communication routes through the coordinator for observability, consistent error handling, and controlled information flow. Subagents never communicate directly.
2
Subagents operate with isolated context โ€” they do not inherit the coordinator's conversation history automatically. Every subagent invocation starts empty. Provide everything the subagent needs explicitly in their Task prompt.
3
The coordinator has four roles: Task Decomposition โ†’ Dynamic Delegation โ†’ Result Aggregation โ†’ Quality Gate & Refinement Decision. Each requires active intelligence, not just message passing.
4
Overly narrow coordinator decomposition = incomplete coverage. This is the primary risk: if the coordinator assigns only visual art subtopics to a broad creative industries query, music/film will be absent โ€” even if all subagents succeed perfectly. The fault is in the coordinator's planning.
5
Dynamic routing beats full-pipeline routing. Coordinator should analyze query requirements and dynamically select which subagents to invoke rather than always routing through the full pipeline. A simple factual query doesn't need Doc Analysis and Synthesis.
6
Partition scope to minimise duplication. Assign distinct subtopics, source types, or time periods to each subagent. Overlapping assignments produce duplicate findings and bloated reports.
7
Iterative refinement closes coverage gaps. After synthesis, the coordinator evaluates completeness, re-delegates targeted queries for gaps, and re-invokes synthesis โ€” looping until coverage is sufficient. Cap iterations (e.g., max 3) to prevent runaway costs.
8
Pass structured metadata between agents. Include source URLs, dates, and confidence scores in every inter-agent handoff. Prose-only handoffs cause attribution loss, making citations impossible in the synthesis step.