Sub-Agents
- used in Multi-Agent workflows
Patterns
Fan-Out/Fan-In
- Spawn multiple sub-agents in parallel for independent tasks
- aggregate results of all sub-agents
- Use case
- Evaluate 5 models on the same benchmark
Pipeline
- Chain sub-agents where output of one agent becomes input of another
- Use case
- Data Processing: extract → clean → analyze → report
Supervisor
- aka Hierarchical
- Parent agent directs to multiple specialized sub-agents
- Use case
- Product launch report needs sales, engineering, and marketing data
Swarm
- aka Collaborative
- Multiple subagents work on the same problem, comparing approaches and converging on best solution
- Use case
- Design review with architect, security, and performance subagents
Invoking Sub-Agents
- You can ask directly in the prompt to launch multiple subagents
Claude Code
- Custom Agents:
.claude/agents/NAME.md
- Run the following command to check status of each agent
claude agents
GitHub Copilot
/tasks