What Is a Subagent in AI? A Practical Guide
A subagent turns a large amount of input into a small amount of output in its own context. The cost arithmetic is what makes the pattern worth the complexity.
A subagent in AI is a second model instance that a main agent calls to do one bounded piece of work and report back a short answer. The main agent keeps the plan and the conversation. The subagent gets a narrow task, its own fresh context, and no memory of anything else. It exists for the length of that task and then it is gone.
The reason the pattern exists is not elegance. It is that context is finite and expensive, and a subagent lets you spend a lot of tokens on a question whose answer is small.
The problem it solves
Say your agent needs to answer one question about a 400-page contract. Without subagents, the whole contract enters the main conversation, and it stays there for every subsequent turn. You pay for those tokens again on turn after turn, and the useful signal gets buried in a long context the model has to re-read each time.
With a subagent, the contract goes into a separate instance. That instance reads it, returns two sentences, and disappears. The main agent's context grows by two sentences rather than 400 pages.
This is the core trade: a subagent converts a large amount of input into a small amount of output, and only the output costs you twice.
Where the cost argument became real
Subagents were always architecturally tidy. They became economically obvious when small models got good enough to run them.
Anthropic's Claude Haiku 5.5 launch on 7 October 2026 positions the model explicitly for this: it "pairs well with Opus 5.5 and Sonnet 5.5 as a subagent on coding work". The published prices make the arithmetic plain. For prompts under 100,000 tokens, Haiku 5.5 costs $0.10 per million input tokens against Sonnet 5.5's $2.00, and $0.50 output against $10.00.
Work an example. Your agent needs to search 50 files for every place a deprecated function is called. That is maybe 300,000 input tokens of file content and perhaps 400 tokens of answer.
Approach | Input tokens | Cost at Sonnet 5.5 rates | Cost at Haiku 5.5 rates |
|---|---|---|---|
Main agent reads all 50 files | 300,000 | $0.60 | not applicable |
Three subagents read 17 files each | 300,000 | not applicable | $0.15 at the over-100k tier |
Three subagents, chunked under 100k each | 300,000 | not applicable | $0.03 |
The last row is the one to notice. Splitting the work three ways does not only parallelise it, it keeps each subagent's prompt in the cheaper pricing tier. The same 300,000 tokens cost $0.03 instead of $0.60, and the main agent's context grows by 400 tokens rather than 300,000.
That is a twentyfold difference produced by how you partition the work, not by which model you bought.
What a subagent in AI is not
The term gets used loosely, so three distinctions are worth holding.
A subagent is not a multi-agent system. Multi-agent usually means several peers that negotiate or hand work between themselves. A subagent is strictly subordinate: one caller, one task, one return value, no peer traffic.
A subagent is not a tool call. A tool call runs deterministic code and returns its result. A subagent runs a model, which means it can reason about what it finds, and it can also be wrong in model-shaped ways.
A subagent is not a longer prompt. The point is the separate context window. If you are only splitting one prompt into sections, you have a longer prompt.
When to reach for one
The pattern earns its complexity when all three of these are true:
The task consumes much more input than it produces output. Searching, reading, summarising, verifying.
The main agent does not need the raw material afterwards, only the conclusion.
The task is independent enough to describe in a paragraph without the full conversation history.
It is the wrong tool when the work is genuinely conversational, when the subagent would need most of the main context to do its job anyway, or when the task is small enough that the overhead of a second call exceeds what you save.
The failure modes
Three things go wrong in practice.
The brief is too thin. A subagent sees only what you pass it. If you ask it to "check the auth code for problems" without saying which problems matter, you get a generic list. Treat the brief like a task you are handing to a contractor who has never seen your codebase, because that is exactly what it is.
The return value is too large. If a subagent returns 8,000 tokens, you have moved the context problem rather than solved it. Specify the output shape: a verdict, a list of file paths, a number. If you cannot say what good output looks like in one sentence, the task is not bounded enough to delegate.
Errors come back as confident prose. A subagent that fails to find something often reports that nothing exists. The main agent has no way to tell the difference between a clean negative and a failed search unless you ask for evidence. Require the subagent to return what it looked at, not only what it concluded.
Related reading
The agent loop is the cycle a subagent runs inside, and multi-agent orchestration covers the larger structures these fit into. For choosing which model goes where, frontier model versus cheap model covers the decision, and how AI models work is the foundation underneath all of it.
Questions people ask
Does a subagent remember previous subagent calls?
No. Each one starts with a fresh context and only sees the brief you pass it. If continuity matters, the main agent has to carry it.
Should a subagent use a smaller model than the main agent?
Usually yes, when the task is search, extraction or summarisation. Keep the larger model for the planning and judgement that the main agent does.
How many subagents can run at once?
That depends on your rate limits and whether the tasks are independent. Three to five parallel calls is a common ceiling before coordination costs outweigh the speed gain.
What is the difference between a subagent and a skill?
A skill is a packaged set of instructions a model follows. A subagent is a separate model instance that runs with its own context. A subagent can use a skill.
Do subagents make an agent more reliable?
They make it cheaper and they keep the main context clean, which indirectly helps. They also add a failure surface, because a subagent can return a confidently wrong answer that the main agent has no way to check.
How did this land?
About the author

Senior Editor, AI & Product
Cecilia leads the Swarmz editorial desk. She has spent a decade turning complex AI and product topics into writing people actually finish, and she owns the blog's quality bar.


