The Manager Pattern
A high-level agent (e.g., “Customer Support Lead”) can delegate complex tasks to specialized subagents (e.g., “Billing Specialist” or “Technical Troubleshooter”).Key Features
- Recursive Nature: Subagents can themselves have their own subagents, allowing you to build deeply nested “Agent Trees.”
- Shared Context: Subagents inherit relevant context from their parents but operate within their own specialized prompts and capability sets. State fields flow between them according to each field’s read/write scope.
- Modular Design: Build and test specialized agents independently, then compose them together into a powerful multi-agent system.
Subagents and execution mode
How a subagent is invoked depends on the parent’s execution mode:- In
reasoningmode, the orchestrator delegates a scoped objective to the subagent inside the loop, then processes its result like any other action. - In
routemode, a subagent can be the routing target — the original conversation is passed through, and the subagent’s answer becomes the response.
For latency-sensitive deployments with deep hierarchies, the
high_performance request flag flattens subagent capabilities into the root agent and runs everything in-process. See Execution Mode — performance options.