Why use subagents
Build an orchestrator agent. Instead of one agent trying to handle every workflow, an orchestrator agent can route a question to an existing specialized agent, or to one you build specifically to support the orchestrator. This keeps each agent focused on a narrow, well-tested task. Isolate context. A subagent runs in its own context. The orchestrator’s conversation isn’t cluttered with the full detail of how a sub-task was completed, and the subagent isn’t distracted by instructions, skills, or tools that are irrelevant to its task. Match the language model to the task. A subagent can use a different language model than its orchestrator. Route simple, well-defined sub-tasks to a faster or cheaper model to speed up the overall system, and reserve a more advanced model for subagents that handle more complex reasoning.Adding a subagent
Add subagents from the Subagents section in the Agent builder. The agent you want to delegate to must have a description.Approval and client-side tools
A subagent can use tools that require user approval or run client-side. When one of these tools is called during a delegated task, the approval request surfaces in the orchestrator’s conversation, labeled with the subagent’s name, so the user can approve or deny it without leaving the top-level conversation.Limits
- An agent supports up to 20 subagents.
- An agent can’t delegate to itself.
- An agent can’t add the same subagent twice.
- A subagent can’t itself delegate to other agents. Delegation is limited to one level.