Skip to content
47% off: the complete course for $79 (reg. $149)Order now →
Agent Builder

AI agent glossary

Subagent

A helper agent launched by a main agent to handle a focused subtask in its own fresh context, returning only a summary of the result.

A subagent is a common way to delegate. The main agent writes a brief, starts a subagent with its own context window and often its own tools and instructions, and waits for a result.

The biggest benefit is context isolation. A subagent can read dozens of files or pages while exploring, and none of that clutter lands in the main agent's context. Only the conclusion comes back. Subagents can also run in parallel and can be given narrower permissions than the main agent.

The cost is that information can get lost in the handoff. The subagent knows only what the brief tells it, and the main agent sees only the summary, so clear briefs and clear output formats matter.

Example

While fixing a bug, a coding agent sends a subagent to search the codebase for every place a function is called. The subagent returns a short list of file locations instead of the full search output.

Learn more in the course

Related terms

Go from definitions to doing

Learn to use and build AI agents in 65 practical lessons.