What Are Subagents
Target audience: Those seeing quality drop when one AI handles several roles at once, those who want to design how AI divides up work
Prerequisites: Basic understanding of What Is an AI Agent and What Is Orchestration
A subagent is a helper agent that the main AI agent delegates a specific piece of work to. Much as a conductor assigns parts to individual performers, the main agent hands research, review, or transformation work to a specialist.
Why Subagents Help
When one agent handles research, implementation, and review together, the conversation history grows and the original instruction fades by the later stages. Subagents address this by isolating context per task.
| Aspect | One agent does everything | Delegated to a subagent |
|---|---|---|
| Context | History from every step accumulates | Only the information needed for that task is passed |
| Clarity of instruction | Multiple roles blur the criteria | The instruction targets a single role |
| Handling of results | Every intermediate step remains | Only the conclusion returns to the main agent |
| Review | The agent evaluates its own work | An independent perspective evaluates it |
The Basic Delegation Shape
graph LR
Main["Main agent\nmanages overall progress"]
Sub1["Subagent A\nresearch"]
Sub2["Subagent B\nreview"]
Main -->|instruction and input| Sub1
Sub1 -->|conclusion only| Main
Main -->|instruction and input| Sub2
Sub2 -->|findings only| MainWhat goes to a subagent is the instruction, input, and completion condition for that task. Passing the entire main conversation history defeats the purpose of isolating context.
Good Fits and Poor Fits
Good fits
- Research that covers a wide area and returns only the conclusion
- Review that checks a deliverable from an independent perspective
- Parallel work that repeats the same processing across different targets
Poor fits
- Simple processing that finishes in one or two steps, where delegation costs more than it saves
- Work that requires continuously sharing fine-grained context with the main agent
Pages in This Section
| Page | Content |
|---|---|
| Delegation Patterns | What to split out and what to pass along |
| Context Isolation | Why isolation improves quality, and its caveats |
| When Not to Use Subagents | Cases where delegation becomes inefficient |
Summary
- A subagent is a helper agent that the main agent delegates specific work to
- The main benefit is isolating context per task
- Pass only the instruction, input, and completion condition, and receive the conclusion
- Simple work and work needing shared context are poor fits
Related Links
Quiz