Sub-agent

A sub-agent is an AI agent invoked by another agent to handle a specific part of a task. It has its own model configuration, instructions, tools, memory scope, and execution loop, and returns a result to the calling agent or orchestrator.

A sub-agent is different from a tool. A tool performs a defined operation, such as searching a database or running a command. A sub-agent can reason, plan, call tools, ask for clarification, and perform several steps before producing its output.

A sub-agent is also different from an agent skill. A skill is packaged knowledge or procedure loaded into an agent. A sub-agent is an active runtime participant that can make decisions.

Common uses include:

  • specialist review, such as security, legal, or architecture checks;
  • parallel research across independent topics;
  • isolated workspaces for competing implementations;
  • manager-worker agent orchestration;
  • delegation from a general assistant to a domain-specific assistant; and
  • nested execution inside an agent sandbox.

Sub-agents can be connected through an agent handoff or exposed as a callable tool. In a handoff, the receiving agent takes over the conversation or task flow. When exposed as a tool, the sub-agent runs as a nested operation and returns a result without taking over the outer conversation.

The design tradeoff is specialization versus coordination overhead. Sub-agents can improve focus and parallelism, but they create extra latency, duplicated context, state synchronization problems, and more complex debugging. Agent trace and observability are necessary to understand nested behavior.

The OpenAI Agents SDK documents this distinction in its SandboxAgent reference, where an agent can be transformed into a callable tool rather than receiving a handoff.

The LLM Knowledge Base is a collection of bite-sized explanations for commonly used terms and abbreviations related to Large Language Models and Generative AI.

It's an educational resource that helps you stay up-to-date with the latest developments in AI research and its applications.

© 2026 Promptmetheus