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
- Isolated execution: Each subagent runs independently with its own state
- 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 spawningAgentDefinitionRegistry: Registry of available subagent definitionsAgentDefinition: Defines subagent role, tools, and behaviorAgentConsoleLogger: Shows parent/child agent IDs for tracking orchestration