The Pattern
Hierarchical routing uses a lead agent to triage queries to specialized sub-agents, each with its own focused context window. The lead agent carries minimal context (just enough to classify), while sub-agents carry deep domain-specific context. This is the multi-agent version of context routing.
Architecture
// Hierarchical routing
Lead Agent (lightweight context)
├─→ Billing Agent
│ └─ billing KB, billing tools
├─→ Refund Agent
│ └─ refund KB, payment tools
├─→ Tech Support Agent
│ └─ tech KB, diagnostic tools
└─→ Onboarding Agent
└─ setup KB, config tools
When to Use
Hierarchical routing makes sense when domains are deeply different — different tools, different knowledge bases, different behavioral patterns. If domains share most of their context and differ only in instructions, progressive disclosure (Ch 3) with skill-based identity management is simpler and cheaper.
Why it matters: Hierarchical routing trades orchestration complexity for context efficiency. Each sub-agent has a clean, focused context window. The cost is managing inter-agent communication and ensuring the lead agent routes correctly.