Hierarchical Delegation
An orchestrator agent delegates sub-tasks to specialist agents. Each specialist has its own tools, system prompt, and context window.
Why hierarchical > single agent for complex tasks
| ADVANTAGE | EXPLANATION |
|---|---|
| Focused context | Each specialist only gets the tools and context it needs — no noise from 50 other tools |
| Specialized prompts | Researcher gets "be thorough, cite sources." Writer gets "be concise, match brand voice." Better outputs than a generic prompt |
| Parallel execution | Independent sub-tasks can run simultaneously (researcher and data analyst at the same time) |
| Cost optimization | Use cheap fast models (Haiku) for simple sub-tasks, expensive models (Opus) only for the orchestrator |
| Failure isolation | If the writer fails, the researcher's results are preserved. Orchestrator can retry just the failed step |
Implementation with model routing
Continue Reading
This topic continues with more in-depth content, code examples, and diagrams. Sign up free to unlock the full guide with all 87 sections.
Sign Up Free to UnlockFree access · No credit card required