What is it?
Sub-agent
A secondary agent that a main agent spins up to handle a specific piece of work. A sub-agent runs in its own context window and usually returns only a condensed result to the main agent. This serves two purposes: parallelism (many sub-agents at once) and context isolation (the sub-agent's messy intermediate work does not clog the main agent's context). See also orchestrator-worker pattern and context isolation.
From the AI agent glossary
Where Sub-agent is explained
- The Four Moves: Reduce, Offload, Isolate, RetrieveContext Engineering · Move 3: Isolate context
- Practical Lessons from Building ManusContext Engineering · Treat "agent as a tool," not as an org chart
- How Context Goes Wrong: Rot, Pollution, and ConfusionContext Engineering · Context pollution: clutter that distracts
- How Memory Is Built and RetrievedAgentic Memory · The agent loop and context tools: the Claude Agent SDK
- The Case Against: Cognition's "Don't Build Multi-Agents"Multi-Agent Systems · Real-world examples Yan offers