# Subagent

> A helper agent that starts fresh, does one job and sends back a short note.

**Field:** Artificial Intelligence  
**Category:** AI Agents  
**Also known as:** Sub-Agent, Worker Agent, Child Agent

## Think of it like

Think of it like sending a friend to the shop. They go, and they only tell you what they found.

## Definition

A subagent is a helper agent that a main agent starts to do one piece of work. It begins with a fresh, empty context and its own orders, and often fewer tools. It does the job, such as searching through a lot of code. Then it sends back only a short summary. That keeps all the detail it read out of the main agent's context. Several subagents can run at once.

## Example

Jack's coding agent needs to know where logins are handled. It starts a subagent that reads 40 files and returns a five-line answer.

## Why it matters

It stops long tasks from filling the main context with detail that is only needed once.

## Common mistake

Expecting the subagent to know what the main agent knows. It starts empty, so the task must say everything.

## Three principles

- **Fresh context.** Starts empty.
- **One job.** Then it reports.
- **Short summary back.** The detail stays out.

## Related terms

- [Orchestrator Agent](https://learn.benibix.com/term/ai/orchestrator-agent)
- [Context Window](https://learn.benibix.com/term/ai/context-window)
- [Multi-Agent System](https://learn.benibix.com/term/ai/multi-agent-system)
- [Built-in Subagents](https://learn.benibix.com/term/ai/built-in-subagents)
- [Agent Tool](https://learn.benibix.com/term/ai/agent-tool)
- [Claude Code Subagent](https://learn.benibix.com/term/ai/claude-code-subagent)

## Told apart from

- [Subagents vs Agent Teams](https://learn.benibix.com/compare/subagent-vs-agent-teams): People often think agent teams are just more subagents. A subagent lives inside one session. It does one job in its own context and sends a summary back to the main agent, and you do not talk to it. Agent teams are separate sessions. They share a task list, message each other, and you can talk to each one directly.
- [Subagent vs Agent Handoff](https://learn.benibix.com/compare/subagent-vs-agent-handoff): People think giving work to a subagent and making a handoff are the same move, and they are not. A subagent works for the main agent. It does one job in its own window and sends back a summary, and the main agent stays in charge. In a handoff, control moves. The new agent takes over the chat, and the first one steps out.

## Taught in

- [Claude Code Subagents](https://learn.benibix.com/learn/ai-claude-code/claude-code-subagents): Claude Code, 15/16
- [Background Session Commands](https://learn.benibix.com/learn/ai-claude-code-commands/background-session-commands): Claude Code Commands, 7/17

![The main agent's context is full of many items. It sends a short task to a subagent with a fresh, empty context. Only a short summary comes back.](https://learn.benibix.com/diagrams/ag-subagent.svg)

---

Source: https://learn.benibix.com/term/ai/subagent
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
