---
title: "Sub-agent"
description: "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."
canonical_url: "https://promptmetheus.com/resources/llm-knowledge-base/sub-agent"
---

> Index of every page on this site: [llms.txt](https://promptmetheus.com/llms.txt)

A sub-agent is an [AI agent](https://promptmetheus.com/resources/llm-knowledge-base/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](https://promptmetheus.com/resources/llm-knowledge-base/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](https://promptmetheus.com/resources/llm-knowledge-base/agent-orchestration);
- delegation from a general assistant to a domain-specific assistant; and
- nested execution inside an [agent sandbox](https://promptmetheus.com/resources/llm-knowledge-base/agent-sandbox).

Sub-agents can be connected through an [agent handoff](https://promptmetheus.com/resources/llm-knowledge-base/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](https://promptmetheus.com/resources/llm-knowledge-base/agent-trace-observability) are necessary to understand nested behavior.

The OpenAI Agents SDK documents this distinction in its [SandboxAgent reference](https://openai.github.io/openai-agents-python/ref/sandbox/sandbox_agent/), where an agent can be transformed into a callable tool rather than receiving a handoff.

## Sitemap

See the full [sitemap](https://promptmetheus.com/sitemap.md) for all pages.
