8.2 Sub-Agent Pattern (AgentTool)
This is the most fundamental multi-Agent pattern. The parent Agent spawns a sub-Agent via AgentTool to execute independent tasks.
Key file: src/tools/AgentTool/AgentTool.tsx
Complete Parameter Analysis
typescript
{
description: string, // 3-5 word task description (required)
prompt: string, // Complete task instruction (required) — Worker starts from scratch, no conversation context
subagent_type?: string, // Specialized Agent type
model?: 'sonnet' | 'opus' | 'haiku', // Model override