What is Subagent?

TL;DR

Pattern where a parent AI agent delegates an independent task to a child agent. Enables parallelism, context-window economy, and specialization - the 2026 base pattern for agentic AI.

Subagent: Definition & Explanation

Subagent is the design pattern where a parent agent delegates a self-contained task to a separate agent and integrates the result. Standard in Anthropic Claude Code, OpenAI Swarm, LangGraph, CrewAI, and AutoGen, it became a base pattern for agentic AI development by 2026. Benefits: (1) parallelism (5 tasks in 5 subagents = 5x speedup), (2) context-window economy (search noise stays out of the parent), (3) specialization (search agent, code agent, reviewer agent), (4) error isolation (one subagent's failure doesn't cascade), (5) reusability (subagents are reused across tasks). Claude Code launches subagents via the <code>Task</code> tool, running them in isolated context and returning only a summary to the parent. Common patterns: (a) Explorer subagent for codebase exploration, (b) Researcher subagent for web/doc research, (c) Reviewer subagent for security/performance review, (d) Coder subagent for implementation. Composes with Multi-Agent Orchestration into hierarchical, sequential, debate, and swarm topologies. Trade-offs: API cost grows super-linearly; debugging needs observability tools like LangSmith; too many subagents inflate integration overhead. Best practice: parent controls flow, subagents are read-only (no mutating tools) for safety - the recommended pattern for 'Plan Mode -&gt; parallel Explore -&gt; integrate -&gt; Implement' workflows.

Related AI Tools

Related Terms

AI Marketing Tools by Our Team