Skip to main content
Orchestrate

Subagents

Let an agent hand a focused task to a specialist agent with its own tools.

A subagent is a specialist that a lead agent hands one focused task to. It has its own tools, starts with a fresh context, and only its answer comes back to the lead. A tool on the lead calls it by key, like any other Actor.

Support agentask_specialist toolOrders specialistget_order toolEngineering specialistsandboxquestion
  • The model picks the specialist and writes the question. The question has to carry everything the specialist needs, because the specialist can’t see the lead’s conversation.
  • Each specialist has only the tools for its job: orders has get_order, and engineering has a sandbox to read and run code. The support agent has neither.
  • Specialists are keyed by the lead’s session id, so a follow-up question on the same ticket continues the same specialist session.
  • The tool waits for the answer and returns it as the tool result. To hand work off without waiting, see Agent-to-Agent Messages.