A subagent is a child agent that a parent agent invokes to handle a self-contained subtask. The child runs with its own context window and its own attached tools, then returns a compact result to the parent. The parent never sees the child’s intermediate steps — only the final answer. Use subagents to keep a parent agent focused. Long research passes, tool-heavy exploration, and specialized review steps work better when their token-heavy intermediate state stays out of the parent’s context.Documentation Index
Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-ea9e18cc.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Enable subagents
In the Agent Builder, open Advanced settings and toggle Subagents. Two more controls appear:- Allow self-spawn - when on, the agent can spawn copies of itself for parallel work. Useful for fan-out patterns (one parent, several identical workers).
- Additional subagents - pick specific other agents this parent is allowed to delegate to. The parent decides at runtime which subagent (if any) to call based on the task.
When a subagent helps
- Research subtasks - the parent decomposes a complex question, hands a slice to a subagent specialized for that slice, and synthesizes the responses.
- Tool-heavy passes - code interpreter sessions, multi-step web search loops, or anything that would consume the parent’s context with intermediate tool output.
- Specialized review - one agent generates, another reviews, the reviewer’s full reasoning stays in its own context window.
Subagents vs. agent chain
Subagents are a runtime delegation mechanism — the parent decides on the fly. An agent chain is a pre-defined graph of agents that run in a fixed order. Reach for subagents when the routing is dynamic; reach for a chain when the routing is fixed.Limits
- Max 10 subagents listed per parent.
- Max depth of 5 hops from the root agent.
- Max 50 unique subagent targets loaded for a single run.
- Max 100 expanded subagent configurations per request.