Agents can delegate to other agents. Sub-agents are just another type of tool.
Why Sub-Agents?
Complex tasks benefit from specialization:
1Main Agent2├── Research Agent (gathers information)3├── Writing Agent (creates content)4└── Editor Agent (reviews and polishes)Each focuses on what it does best.
How to Add a Sub-Agent
Sub-agents are added through the unified Tools tab:
- Open your agent's settings
- Go to the Tools tab
- Click Add Tool → Agent Tool
- Select another agent
The main agent can now delegate to it.
How Delegation Works
1You: Write a blog post about AI trends23Main Agent: I'll delegate this.4 [Calling research-agent: "Find AI trends 2024"]5 [Calling writing-agent: "Write post about these trends"]6 [Calling editor-agent: "Review and polish"]7 8 Here's your blog post!Each sub-agent:
- Receives the task from the parent
- Works independently using its own tools
- Returns results via the
finishtool
Sub-Agent Results
When a sub-agent completes, it calls finish with:
- status: succeeded, failed, or cancelled
- result: the output to send back
The parent agent receives this and continues.
Nested Agents
Sub-agents can have their own sub-agents:
1Orchestrator2└── Project Manager3 ├── Developer Agent4 │ └── Code Review Agent5 └── Designer AgentKeep nesting shallow for clarity.
Parallel execution
When the parent agent emits multiple tool calls in a single turn, the runtime runs them in parallel. The parent does not continue until every call in that turn has finished.
| Model output | What happens |
|---|---|
| Three sub-agent calls in one assistant message | Three sub-agents run at the same time |
| One sub-agent call per turn across three turns | Three sequential runs |
Parallelism is controlled by the model and your instructions, not by a separate concurrency API. To fan out work, prompt the coordinator to invoke several sub-agents (or app tools) in one response.
Each sub-agent runs in its own chat with its own context. Siblings do not share state; the parent only sees structured results returned through finish. A sub-agent can fan out again in its own turn.
Parallel research, sequential synthesis is a common pattern:
1Turn 1: [research-a, research-b, research-c] ← parallel2Turn 2: [synthesis-agent(combined results)] ← waits for turn 1Sub-agents and app tools both participate in the same join behavior: mixed parallel turns (for example, two sub-agents plus one app run) complete together before the next coordinator turn.
When to Use Sub-Agents
- Complex workflows with distinct phases
- Specialized expertise for different tasks
- Reusable components across multiple agents
When NOT to Use Sub-Agents
- Simple tasks a single agent can handle
- When an app tool would suffice
- Over-engineering for its own sake
Start without sub-agents. Add them when you need specialization.