Category · Agents and orchestration
What is a subagent?
A subagent is an agent with a narrow mission that a main agent calls like a tool. It works in its own context and returns only its conclusion. For example, it reads long documentation while the main agent keeps a clean context.
By Laurent Poupet, Claude trainer and artificial intelligence architect · Updated
How it works
- The subagent receives a precise instruction and its own tools, works alone, then returns a short result, which keeps the main agent’s context clean.
- It is used to isolate a hungry task, such as reading long documentation, or to give narrower permissions to part of the work.
- Several subagents can work in parallel on independent parts, which cuts the total time, at the price of higher token consumption.
The trap to avoid
The trap is a vague mission; a subagent that does not know exactly what to return explores too much, burns many tokens and sends back an unusable result.
A concrete example
Before changing a large project, the main agent asks a subagent to “read the 40 files of the billing folder and tell me where the discount is computed”. The subagent reads everything in its own context and sends back three lines only: the file, the function, the rule. The main agent keeps a clean context to make the change.
What is the difference with a multi-agent system?
| Criterion | Subagent | a multi-agent system |
|---|---|---|
| Organisation | One main agent that delegates | Several agents that cooperate |
| What comes back | A short conclusion | Exchanges between agents |
| Main goal | Keep the main context clean | Split a large piece of work |
Related terms
- WorkflowAgents and orchestration
- OrchestrationAgents and orchestration
- Multi-agent systemAgents and orchestration
Where this is taught
Track 2 · Claude Code: the augmented developer
Delegate with Subagentslesson 8 · 1 hourTrack 3 · Skills, agents and connectors
Beyond skills — Introduction to advanced capabilitieslesson 1 · 1 hour
Lesson content (step-by-step instructions, exercises with solutions, quizzes) is for students only, with an access code received after the first lesson.