← Concept library

Agents & Tool Use

Multi-Agent Coordinator-Subagent Architecture

Hub-and-spoke multi-agent design with coordinator delegation, isolated subagent context, parallel execution, and iterative refinement loops.

advanced · 10 min read

Multi-agent systems built with the Claude Agent SDK use a hub-and-spoke architecture where a coordinator agent manages specialist subagents.

Core Architecture

The coordinator is the brain of the system. It:
- Decomposes user queries into subtasks
- Delegates to appropriate subagents
- Aggregates results
- Decides which subagents to invoke based on query complexity (not always all of them)

Subagents are specialists. Each handles one domain: search, analysis, synthesis, report generation. They operate with isolated context and communicate only through the coordinator.

Context Isolation

Subagents do NOT automatically inherit the coordinator's conversation history. This is a deliberate design choice. Context must be explicitly provided in the subagent's prompt.

When spawning a synthesis subagent, include the complete findings from prior agents directly in its prompt: web search results, document analysis outputs, source URLs, and metadata. Use structured data formats to separate content from metadata so attribution is preserved.

Parallel Execution

The coordinator can spawn multiple subagents simultaneously by emitting multiple Task tool calls in a single response. This is faster than sequential execution where each subagent waits for the previous one to complete.

Task Decomposition Pitfalls

The most common failure mode is overly narrow decomposition. If asked to research "impact of AI on creative industries" and the coordinator decomposes it into only visual arts subtasks, it misses music, writing, and film entirely. The subagents will execute correctly within their assigned scope - the problem is always the coordinator's decomposition, not the subagents' execution.

Iterative Refinement

The coordinator can evaluate synthesis output for gaps, re-delegate to search and analysis subagents with targeted queries, and re-invoke synthesis until coverage is sufficient. This loop continues until the coordinator judges the output as complete.

Sign in to save and react.
Share Copied