Overview
Subagents enable decomposition of complex tasks into isolated subtasks. The main agent orchestrates multiple subagents, each with specialized roles and tools. This pattern provides:- Context isolation: Each subagent has clean context without cross-contamination
- Parallel execution: Multiple subagents can work simultaneously
- Specialized capabilities: Each subagent has specific tools for its role
- Scalability: Handle many independent subtasks without context overflow
- Result aggregation: Main agent synthesizes subagent outputs
UseSubagents: Capability that enables subagent spawningAgentRegistry: Registry of available subagent specificationsAgentSpec: Defines subagent role, tools, and behaviorspawn_subagent: Tool to create and execute subagent- Context isolation: Subagents don’t see each other’s work