Skip to main content
An agent can delegate a task to another agent, called a subagent. The main agent writes a task description, the subagent works on it with its own instructions, knowledge sources and tools, and returns its answer. The main agent then uses that answer in its reply to the user. Use subagents when one conversation needs several areas of expertise, for example a general assistant that hands billing questions to a billing specialist and technical questions to a technical specialist.
To send each conversation to the right agent from the start, use a Router instead. A router picks one agent per message; subagents let a single agent call others in the middle of its answer.

Set up a subagent

1

Make the agent available as a subagent

  1. Go to Agents and open the specialized agent.
  2. In the General tab, fill in Description. The main agent reads it to decide when to call this agent.
  3. In the Agent as Subagent section, turn on Can be used as subagent.
  4. Choose whether to Share conversation context and set the Maximum call depth (see below).
  5. Click Save.
2

Give it to the main agent

  1. Open the main agent.
  2. In the Capabilities tab, open Agent Tools and select the subagents it may call.
  3. Click Save.

Settings

Write good descriptions

The description is what the main agent reads to pick a subagent. Say what the agent handles, and what it does not:
Avoid descriptions that are vague (“Helps with billing stuff”), too broad (“Answers any question about the product”), or that overlap with another subagent. You can also tell the main agent when to delegate in its instructions:

Safety limits

AGO stops a delegation and returns an error to the main agent when:
  • an agent would call itself, or an agent already in the chain (for example A calls B, which calls A)
  • the chain is longer than the subagent’s Maximum call depth
  • the user is not allowed to use the subagent under their agent permissions
Each delegation adds response time. Keep chains short: most setups need a main agent and one level of subagents.

Troubleshooting

Open the subagent and check that Can be used as subagent is on, then save it.
  1. Make each subagent’s Description specific, and say what it does not handle.
  2. Add delegation rules to the main agent’s instructions.
  3. Test the conversation in the simulator after each change.
Turn on Share conversation context on the subagent, or tell the main agent to include the relevant details in the task it writes.
Check the Agent Tools of each agent in the chain for loops, or raise the subagent’s Maximum call depth if the chain is intended.