Study guides / CCAR-F / Domain 1

Agentic Architecture & Orchestration · Lesson 2 of 7

1.2 - Multi-Agent Orchestration

Orchestrate multi-agent systems with coordinator-subagent patterns, hub-and-spoke architecture, and proper isolation principles.

Multi-agent orchestration is how you get several Claude agents working together on one complex task. The exam isn't loose about the shape this takes. It tests one pattern: hub-and-spoke, with a coordinator at the centre.

Hub-and-Spoke Architecture

The architecture has two roles:

The cardinal rule: ALL communication flows through the coordinator. Subagents never communicate directly with each other. Never. Not for efficiency, not for convenience, not for any reason. Every piece of information that moves between subagents passes through the coordinator.

Current state

This strict hub-and-spoke model is what the exam tests. In current Claude Code a sub-agent can itself spawn sub-agents (nested parent-child delegation), so the "never, for any reason" absolute is an exam simplification rather than a hard product limit. On the exam, treat direct subagent-to-subagent communication as the wrong answer.

This centralisation provides three things the exam cares about:

  1. Observability - you can log and monitor every message in one place.
  2. Consistent error handling - the coordinator applies uniform error recovery policies.
  3. Controlled information flow - the coordinator decides what context each subagent receives.

Key Concept

All inter-subagent communication flows through the coordinator. Subagents never communicate directly with each other. This is the foundational architectural constraint of hub-and-spoke orchestration.

The Critical Isolation Principle

This is the single most misunderstood idea in multi-agent systems, and the exam leans on that confusion hard.

Subagents do NOT automatically inherit the coordinator's conversation history. When the coordinator spawns a subagent, that subagent starts with only what the coordinator explicitly includes in its prompt. It has no access to:

Subagents do NOT share memory between invocations. If the coordinator calls the web search subagent twice, the second invocation has no knowledge of the first. Every invocation is independent.

So the coordinator has to be deliberate about context. Every piece of information a subagent needs goes in its prompt, explicitly. If the synthesis agent needs web search results, the coordinator passes those results - the synthesis agent can't "look them up" from a shared store. There's no shared store.

Exam Trap

When a multi-agent system produces incomplete or incorrect output, the exam expects you to trace the failure to its origin. Do not blame the subagent that produced the output - check whether the coordinator gave it the right input.

Coordinator Responsibilities

The coordinator has four key responsibilities that the exam tests:

1. Dynamic subagent selection. The coordinator analyses query requirements and dynamically selects which subagents to invoke. It does NOT always route through the full pipeline. A simple factual question might only need the web search subagent, not the full research-analysis-synthesis chain. Routing every query through every subagent wastes time and resources.

2. Research scope partitioning. When delegating to multiple subagents, the coordinator partitions the research scope to minimise duplication. It assigns distinct subtopics or source types to each agent. For example, one agent searches academic papers while another searches news articles - they do not both search the same sources.

3. Iterative refinement loops. The coordinator evaluates synthesis output for gaps. If the synthesis is incomplete, it re-delegates to search and analysis subagents with targeted queries. It re-invokes synthesis until coverage is sufficient. This is not a single-shot process - it is an iterative cycle.

4. Centralised communication routing. All subagent communication routes through the coordinator for observability, consistent error handling, and controlled information flow.

The Narrow Decomposition Failure

This is a specific exam pattern you must recognise. The exam includes a question (referenced as Q7 in sample sets) where a coordinator decomposes "impact of AI on creative industries" into only visual arts subtopics, missing music, writing, and film entirely.

The root cause is the coordinator's task decomposition, not any downstream agent. The web search agent searched thoroughly for what it was assigned. The synthesis agent synthesised everything it received. But the coordinator only assigned visual arts topics, so music, writing, and film were never researched.

The exam expects you to trace failures to their origin. When a multi-agent system produces a report that misses entire categories, do not blame the subagents - check the coordinator's decomposition.

This pattern applies broadly: if the output is incomplete in scope (not depth), the coordinator's decomposition is almost always the root cause.

Practical Example: Research System Coverage Gap

A multi-agent research system is tasked with "renewable energy technologies." The coordinator decomposes this into "solar panel efficiency" and "wind turbine design." Each subagent produces thorough, well-sourced research on its assigned topic.

The final report is comprehensive on solar and wind but says nothing about geothermal, tidal, biomass, or nuclear fusion. The coverage gap is not because the search was poor or the synthesis was weak - it is because the coordinator never assigned those subtopics.

The fix is not better search queries, not a more capable synthesis agent, and not more subagents. The fix is better coordinator decomposition that covers the full breadth of the topic.

Exam traps

Practice question

A multi-agent research system produces a report on 'renewable energy technologies' that only covers solar and wind power. Each subagent produced thorough, well-sourced coverage of its assigned topic. The web search subagent returned relevant results for every query it received. The synthesis subagent accurately combined all research it was given. What is the most likely root cause of the coverage gap?

  • A The web search subagent used queries that were too narrow, so geothermal, tidal, biomass and fusion sources never appeared anywhere in its results

    The web search subagent researched exactly what it was assigned and returned relevant results. The issue is not how it searched - it is what it was asked to search for.

  • B The synthesis subagent failed to identify gaps in the research it received and request additional coverage of the missing technology categories from the coordinator

    The synthesis subagent works with the research it receives. It cannot synthesise topics that were never researched. Gap identification is the coordinator responsibility during iterative refinement.

  • C The coordinator decomposed the topic into only solar and wind subtopics, never assigning geothermal, tidal, biomass, or fusion to any subagent Correct

    The coordinator is responsible for task decomposition. If it only assigns solar and wind as subtopics, no downstream agent can cover the missing categories. The root cause is the coordinator decomposition, not any subagent performance.

  • D The document analysis subagent had no access to sources covering the other renewable energy categories, so none of those sections were ever written

    Source availability is not the issue. The coordinator never asked any agent to research these other energy types. Even with perfect source access, unassigned topics would remain uncovered.

Build exercise: Build a Hub-and-Spoke Research Coordinator

Intermediate · 60 minutes

You'll practice:

  1. Create a coordinator agent that accepts a broad research topic as input

    The coordinator is the central hub in hub-and-spoke architecture. The exam tests whether you understand that the coordinator owns task decomposition, subagent selection, and result aggregation - not the subagents.

    You should see: A coordinator function that accepts a topic string and returns a structured research report. It should have a system prompt defining its role as the orchestrating hub.

    Hints
    1. Think about what responsibilities the coordinator has: decomposition, delegation, aggregation, and refinement. What does the initial setup need?
    2. The coordinator needs a system prompt, a list of available subagent definitions, and logic to process a topic through decomposition, delegation, and aggregation phases.
    3. const coordinator = {
        systemPrompt: "You are a research coordinator. Decompose topics into comprehensive subtopics, delegate to specialist subagents, aggregate results, and identify coverage gaps.",
        subagents: [webSearchAgent, docAnalysisAgent],
        async research(topic: string) {
          const subtopics = await this.decompose(topic);
          // delegation and aggregation follow
        }
      };
  2. Implement task decomposition logic that breaks the topic into at least 5 distinct subtopics covering the full breadth of the subject

    Narrow decomposition is a specific exam failure pattern. The coordinator that only assigns solar and wind for renewable energy misses entire categories. The exam expects you to recognise that incomplete output traces back to the coordinator decomposition.

    You should see: A decomposition function that produces 5 or more subtopics for any broad topic. For renewable energy, it should cover solar, wind, geothermal, tidal, biomass, and fusion at minimum.

    Hints
    1. How would you ensure breadth? Consider prompting the coordinator to explicitly enumerate categories before narrowing down.
    2. Use a two-phase approach: first generate broad categories, then validate that no major area is missing. The coordinator prompt should instruct the model to consider all major subcategories of the topic.
    3. async decompose(topic: string): Promise<string[]> {
        const response = await client.messages.create({
          model: "claude-sonnet-5",
          max_tokens: 1024,
          messages: [{
            role: "user",
            content: `List ALL major subtopics for: ${topic}. Ensure comprehensive breadth - missing an entire category is a critical failure. Return as JSON array.`
          }]
        });
        return JSON.parse(response.content[0].text);
      }
  3. Spawn two subagents (web search and document analysis) with explicit context passing - include all relevant information in each subagent prompt

    Subagent isolation means no shared memory and no inherited context. The exam heavily tests this: if a subagent produces poor results, check whether the coordinator gave it sufficient context, not whether the subagent itself is flawed.

    You should see: Two subagent invocations where each receives the full assigned subtopic, the research goal, and any relevant context from prior agents - all explicitly included in the prompt.

    Hints
    1. Remember: subagents start with a blank slate. What information do they need to do their job effectively?
    2. Each subagent prompt must include: the specific subtopic assigned, the broader research goal for context, the expected output format, and any prior findings relevant to its task. Do not assume the subagent knows anything.
    3. async delegateToSubagent(agent: AgentDefinition, subtopic: string, context: string) {
        return await client.messages.create({
          model: "claude-sonnet-5",
          max_tokens: 2048,
          system: agent.systemPrompt,
          messages: [{
            role: "user",
            content: `Research subtopic: ${subtopic}\nBroader goal: ${context}\nReturn structured findings with source URLs and confidence levels.`
          }]
        });
      }
  4. Aggregate results from both subagents and evaluate coverage completeness

    The coordinator must evaluate whether the combined results cover the full breadth of the original topic. This is where iterative refinement starts - gaps detected here trigger re-delegation.

    You should see: An aggregation function that combines results from both subagents and produces a coverage assessment listing which subtopics are well-covered, partially covered, or missing.

    Hints
    1. What does the coordinator need to check? Compare the subtopics assigned against the findings actually returned.
    2. Build a coverage map: for each original subtopic, check whether the aggregated results contain substantive findings. Flag any subtopic with no findings or only superficial coverage.
    3. async evaluateCoverage(subtopics: string[], results: Finding[]): Promise<CoverageReport> {
        const covered = subtopics.filter(st =>
          results.some(r => r.subtopic === st && r.findings.length > 0)
        );
        const gaps = subtopics.filter(st => !covered.includes(st));
        return { covered, gaps, completeness: covered.length / subtopics.length };
      }
  5. Implement an iterative refinement loop: if the coordinator identifies coverage gaps, re-delegate to subagents with targeted queries and re-invoke until coverage is sufficient

    Iterative refinement is a core coordinator responsibility the exam tests. A single-shot delegation is not enough - the coordinator must evaluate output and re-delegate for gaps. This distinguishes a coordinator from a simple dispatcher.

    You should see: A loop that checks coverage, identifies gaps, sends targeted follow-up queries to subagents for the missing subtopics, and re-evaluates until a coverage threshold is met or a maximum iteration count is reached.

    Hints
    1. What triggers another iteration? What stops the loop?
    2. The loop continues while coverage is below a threshold (e.g., 90%). Each iteration targets only the gaps, not the already-covered subtopics. A maximum iteration count prevents infinite loops.
    3. let coverage = await this.evaluateCoverage(subtopics, allResults);
      let iterations = 0;
      while (coverage.completeness < 0.9 && iterations < 3) {
        for (const gap of coverage.gaps) {
          const newResults = await this.delegateToSubagent(webSearchAgent, gap, topic);
          allResults.push(...newResults);
        }
        coverage = await this.evaluateCoverage(subtopics, allResults);
        iterations++;
      }
  6. Test with the topic renewable energy technologies and verify that the final output covers solar, wind, geothermal, tidal, biomass, and fusion

    This specific test case maps to the exam narrow decomposition failure pattern. If your output only covers solar and wind, the root cause is the coordinator decomposition - the exact diagnostic the exam expects you to make.

    You should see: A final research report with substantive sections on all six energy types: solar, wind, geothermal, tidal, biomass, and fusion. The coverage evaluation should show 100% completeness.

    Hints
    1. Run your coordinator and check the output. If categories are missing, where in the pipeline did it go wrong?
    2. If the output is missing categories, trace back: did the decomposition include them? If not, fix the decomposition. If it did, did the subagents receive the assignment? Check the context passing.
    3. const report = await coordinator.research("renewable energy technologies");
      const required = ["solar", "wind", "geothermal", "tidal", "biomass", "fusion"];
      const missing = required.filter(cat =>
        !report.sections.some(s => s.topic.toLowerCase().includes(cat))
      );
      console.log(missing.length === 0 ? "Full coverage" : `Missing: ${missing.join(", ")}`);

Sources