Overview
Sub-agent delegation enables hierarchical task decomposition while maintaining context isolation. This pattern is fundamental to modern agentic systems.
Key Principles
Context Isolation
- Each sub-agent gets only relevant context
- Parent doesn't see sub-agent's internal reasoning
- Only final results propagate up
Recursive Decomposition
- Sub-agents can spawn their own sub-agents
- Creates natural hierarchies for complex tasks
- Each level handles appropriate abstraction
Result Aggregation
- Parent synthesizes results from multiple sub-agents
- Can run sub-agents in parallel when independent
- Handles partial failures gracefully
Patterns
Worker Pool
Pre-defined set of specialized workers, tasks routed by type.
Dynamic Spawning
Create sub-agents on-demand based on task analysis.
Hierarchical Task Network
Use formal task decomposition (HDDL) to plan sub-agent structure.