On this article, you’ll discover ways to resolve whether or not a given piece of agent performance needs to be constructed as a instrument or as a subagent, and find out how to keep away from overengineering your agent structure within the course of.
Matters we are going to cowl embrace:
- What instruments and subagents are, and the important thing variations between them.
- When a instrument is the higher selection, and when a subagent is definitely worth the added complexity.
- Tips on how to apply a easy three-question resolution framework, and what including subagents truly prices.
With that framing in place, let’s take a look at how each bit suits collectively.

Introduction
Each AI agent you construct reaches the identical resolution level ultimately. You have got a job that must be executed — name an API, search a database, run a calculation — and it’s essential resolve: ought to this be a instrument the agent calls straight, or ought to it’s a separate agent that handles the work independently?
Get this improper in a single route and you find yourself with a bloated agent that tries to do an excessive amount of in a single context window. Get it improper within the different route and also you’ve added coordination overhead, further LLM calls, and debugging complexity to an issue {that a} easy perform would have solved.
This text explains what instruments and subagents are, the place every suits, and find out how to make the selection each time.
What Instruments Are
A instrument is a functionality an agent makes use of to work together with exterior programs and carry out actions past the mannequin’s built-in information. In observe, instruments are often features, API calls, database queries, searches, file operations, or different executable code uncovered to the mannequin via an outlined interface.
A typical instrument interplay seems like this:
- The mannequin receives a job and determines that exterior data or an motion is required.
- The mannequin generates a structured instrument name with the required arguments.
- Your utility executes the instrument and returns a consequence.
- The result’s added again into the dialog, permitting the mannequin to proceed reasoning and resolve what to do subsequent.
The essential distinction is that instruments don’t carry out reasoning themselves. They execute predefined operations and return knowledge. The mannequin handles the planning, interpretation, and decision-making round these operations.
Instruments are the first approach brokers work together with the skin world. They’ll question a database, name an API, search the net, learn information, run calculations, or set off workflows. As a result of instruments execute code somewhat than working one other LLM, they’re usually quick, deterministic, and cheap in comparison with spawning a subagent.
What Subagents Are
A subagent is a separate LLM name — usually a definite agent occasion with its personal system immediate, its personal context window, and sometimes its personal set of instruments — that receives a job, works via it independently, and returns a consequence to the orchestrating agent.
From the orchestrator’s perspective, calling a subagent seems equivalent to calling a instrument: ship a job, get a consequence. The distinction is what occurs in between. A subagent runs its personal multi-step reasoning loop, doubtlessly makes its personal instrument calls, and manages its personal state. The orchestrator has no visibility into that course of; it solely will get the abstract on the finish.
Instruments vs Subagents
Instruments vs Subagents: The Key Variations
Instruments execute code. Subagents execute reasoning.
| Side | Instruments | Subagents |
|---|---|---|
| What runs | Your code | One other LLM |
| Context window | Shared with the orchestrator | Separate, remoted |
| Reasoning | None; deterministic execution | Full multi-step reasoning loop |
| Error dealing with | Structured returns, retry in identical loop | Subagent handles internally or surfaces to orchestrator |
| Price | Execution value solely | Further LLM name(s) |
| Latency | Low; one perform name | Larger; full inference cycle |
| Visibility | Full; end in orchestrator’s context | Partial; orchestrator sees abstract solely |
| When it breaks | Unhealthy schema, API failure, improper arguments | Hallucination in subagent, misplaced context, coordination failure |
The context window distinction issues greater than it first seems. When an agent calls a instrument, the consequence lands again in the identical context the agent is actively reasoning in — prior reasoning, instrument consequence, and the whole lot else collectively. When an orchestrator spawns a subagent, that subagent begins contemporary with solely what the orchestrator handed it.
When to Use a Device
Use a instrument when the operation is well-defined, has deterministic habits, and does not require multi-step reasoning to finish.
Name an exterior API. Duties like fetching a person document, posting to Slack, or querying a database are pure execution duties. The mannequin decides to name them; your code runs them.
Remodel or validate knowledge. Operating a regex, formatting a date, calculating a hash, or changing models. Deterministic operations belong in features, not in LLM calls.
Learn or write information. Opening a file, writing output, checking if one thing exists. File system operations are predictable and quick when carried out as direct instrument calls.
Run a search. Semantic search over a vector database, a SQL question in opposition to a database, an internet search. The search itself runs deterministically and returns outcomes. The mannequin interprets these outcomes, however the search runs as a instrument.
The sensible take a look at: when you can write the habits as a Python perform with typed inputs and outputs, and it doesn’t have to motive via a number of steps, it needs to be a instrument.
When to Use a Subagent
Use a subagent when the duty requires multi-step reasoning, when the intermediate work would create noise within the orchestrator’s context, or when duties can run in parallel.
The duty has non-obvious intermediate steps. “Analysis the aggressive panorama for X” includes deciding what to look, studying outcomes, deciding what to look subsequent, synthesizing throughout sources, and producing a structured abstract. Every step depends upon the earlier one. That’s a reasoning course of, and it belongs in its personal context.
The work will be parallelized. Processing ok paperwork independently runs quicker throughout ok concurrent subagents than sequentially in a single context. Microsoft’s AutoGen framework is constructed partly round this sample, coordinating specialised brokers that work in parallel on unbiased subtasks.
The subtask wants its personal instrument set. A code-writing subagent wants a code executor and file system instruments. A analysis subagent wants internet search and doc instruments. Giving the orchestrator entry to all of those creates instrument overload. Analysis on agent tool-calling confirms accuracy degrades as instrument depend grows. Scoping instruments per subagent retains every agent’s resolution house small.
The intermediate output would introduce noise into the orchestrator’s context. A single database question result’s compact and helpful in context. A multi-step analysis synthesis spanning dozens of retrieved paperwork is noise. Isolating that work in a subagent and surfacing solely the conclusion retains the orchestrator’s reasoning clear.
When to make use of subagents
Context isolation improves reliability. A subagent working in a contemporary context can’t be distracted by the orchestrator’s gathered historical past. For duties the place focus issues, equivalent to code era, structured knowledge extraction, or multi-step evaluation, isolation tends to provide extra constant outputs.
The Resolution Framework
Most selections come down to 3 questions.
1. Is the duty primarily execution or reasoning?
If the duty is a well-defined operation with predictable inputs and outputs, a instrument is often the suitable selection. Database queries, API calls, searches, calculations, and file operations all fall into this class.
If the duty requires exploring, analyzing, synthesizing, or making a sequence of selections the place every step depends upon the earlier one, it’s often a greater match for a subagent.
2. Does the intermediate work matter to the orchestrator?
Device outcomes are usually small and helpful sufficient to maintain straight within the orchestrator’s context. A database document, search consequence, or API response can typically be consumed instantly.
When a job generates massive quantities of intermediate work — a number of searches, doc opinions, iterations, or analyses — a subagent can maintain that work remoted and return solely the ultimate conclusion.
3. Can the duty run independently?
A instrument executes as a part of the orchestrator’s workflow and returns a consequence earlier than the workflow continues.
A subagent is commonly a greater match when work will be delegated, run independently, or executed in parallel with different duties. That is particularly helpful when processing a number of paperwork, researching a number of subjects, or coordinating specialised workflows.
Instruments are finest for deterministic execution:
- Fetching knowledge from a database, API, or search system
- Operating calculations, transformations, or validations
- Studying, writing, or updating information and information
Subagents are finest for bounded reasoning duties:
- Researching a subject and synthesizing findings throughout sources
- Writing, reviewing, and refining complicated content material
- Analyzing massive collections of paperwork or knowledge in parallel
The Overengineering Lure
The commonest mistake is introducing subagents earlier than they’re truly wanted.
A subagent could make an structure cleaner, nevertheless it additionally provides complexity. Each subagent introduces one other context window, one other reasoning loop, and one other handoff between parts. Which means extra latency, extra value, and extra transferring elements to debug.
In lots of instances, a well-designed instrument is sufficient. If a job will be accomplished via a simple API name, database question, search, or different deterministic operation, including a separate agent typically creates extra overhead than worth.
As a rule of thumb, begin with a single agent and a small set of well-designed instruments. Solely introduce subagents after they remedy a particular drawback that instruments can not remedy cleanly, equivalent to isolating massive quantities of intermediate work, enabling parallel execution, or giving a posh job its personal devoted reasoning house.
A helpful query to ask is: “What does the subagent truly purchase me?”
- If the reply is just a small quantity of processing earlier than returning a consequence, a instrument might be adequate.
- If the reply is unbiased reasoning, context isolation, specialised capabilities, or parallel execution, a subagent is probably going justified.
Instruments needs to be the default. Subagents needs to be launched after they present a transparent architectural benefit.
What Including Subagents Really Prices
Calling a instrument is straightforward: present inputs, get a consequence. Calling a subagent is totally different. You’re additionally delegating a part of the pondering course of.
Which means the orchestrator has to outline the duty clearly sufficient for the subagent to work independently. The subagent doesn’t robotically inherit the orchestrator’s objectives, assumptions, or full dialog historical past. It solely is aware of what it was given.
Because of this, good subagent architectures rely upon clear handoffs:
- The orchestrator sends a centered, self-contained job.
- The subagent performs its personal reasoning and power use.
- The subagent returns a concise consequence that the orchestrator can use.
For instance, a analysis subagent may return: “Recognized three rivals, together with their pricing fashions and key differentiators.”
It usually shouldn’t return each search question, doc excerpt, and intermediate remark that led to that conclusion.
Retaining the boundary clear has two advantages. First, it prevents the orchestrator’s context from filling up with pointless intermediate work. Second, it makes the system simpler to know and debug as a result of every subagent has a transparent duty and a well-defined output.
Subagents in observe
A helpful rule of thumb is: Go duties down; move conclusions again up. Clear job in, clear abstract out is the contract that retains multi-agent programs debuggable. Methods that permit subagents share mutable state or move partial outcomes again mid-task introduce coordination complexity that rapidly outgrows the unique drawback.
Abstract
Selecting between instruments and subagents is a key architectural resolution in agentic programs. Whereas each assist accomplish duties, they differ considerably in execution mannequin, reasoning capabilities, value, and operational complexity. The next comparability highlights when every strategy is most applicable.
| Idea | Instruments | Subagents |
|---|---|---|
| What runs | Your code | One other LLM with its personal reasoning loop |
| Finest for | Deterministic execution: API calls, searches, calculations, file ops | Complicated reasoning: analysis, code era, parallel processing |
| Context | Shared with the orchestrator | Remoted; contemporary context window per job |
| Price | Execution value solely | A number of extra LLM calls |
| Latency | Low | Larger |
| Debuggability | Excessive; consequence seen in orchestrator’s context | Decrease; inner steps are opaque |
| When to succeed in for it | The duty will be written as a deterministic perform | The duty wants multi-step reasoning, parallelism, or instrument isolation |
| Overengineering danger | Low | Excessive; provides coordination overhead if used prematurely |
| Communication contract | Typed perform enter → structured output return | Self-contained job string → abstract string |
| Begin right here | Sure; default to instruments first | Solely when instruments hit a concrete restrict |
This separation retains programs easy by default, whereas permitting subagents to be added solely when tool-based design is not adequate.
On this article, you’ll discover ways to resolve whether or not a given piece of agent performance needs to be constructed as a instrument or as a subagent, and find out how to keep away from overengineering your agent structure within the course of.
Matters we are going to cowl embrace:
- What instruments and subagents are, and the important thing variations between them.
- When a instrument is the higher selection, and when a subagent is definitely worth the added complexity.
- Tips on how to apply a easy three-question resolution framework, and what including subagents truly prices.
With that framing in place, let’s take a look at how each bit suits collectively.

Introduction
Each AI agent you construct reaches the identical resolution level ultimately. You have got a job that must be executed — name an API, search a database, run a calculation — and it’s essential resolve: ought to this be a instrument the agent calls straight, or ought to it’s a separate agent that handles the work independently?
Get this improper in a single route and you find yourself with a bloated agent that tries to do an excessive amount of in a single context window. Get it improper within the different route and also you’ve added coordination overhead, further LLM calls, and debugging complexity to an issue {that a} easy perform would have solved.
This text explains what instruments and subagents are, the place every suits, and find out how to make the selection each time.
What Instruments Are
A instrument is a functionality an agent makes use of to work together with exterior programs and carry out actions past the mannequin’s built-in information. In observe, instruments are often features, API calls, database queries, searches, file operations, or different executable code uncovered to the mannequin via an outlined interface.
A typical instrument interplay seems like this:
- The mannequin receives a job and determines that exterior data or an motion is required.
- The mannequin generates a structured instrument name with the required arguments.
- Your utility executes the instrument and returns a consequence.
- The result’s added again into the dialog, permitting the mannequin to proceed reasoning and resolve what to do subsequent.
The essential distinction is that instruments don’t carry out reasoning themselves. They execute predefined operations and return knowledge. The mannequin handles the planning, interpretation, and decision-making round these operations.
Instruments are the first approach brokers work together with the skin world. They’ll question a database, name an API, search the net, learn information, run calculations, or set off workflows. As a result of instruments execute code somewhat than working one other LLM, they’re usually quick, deterministic, and cheap in comparison with spawning a subagent.
What Subagents Are
A subagent is a separate LLM name — usually a definite agent occasion with its personal system immediate, its personal context window, and sometimes its personal set of instruments — that receives a job, works via it independently, and returns a consequence to the orchestrating agent.
From the orchestrator’s perspective, calling a subagent seems equivalent to calling a instrument: ship a job, get a consequence. The distinction is what occurs in between. A subagent runs its personal multi-step reasoning loop, doubtlessly makes its personal instrument calls, and manages its personal state. The orchestrator has no visibility into that course of; it solely will get the abstract on the finish.
Instruments vs Subagents
Instruments vs Subagents: The Key Variations
Instruments execute code. Subagents execute reasoning.
| Side | Instruments | Subagents |
|---|---|---|
| What runs | Your code | One other LLM |
| Context window | Shared with the orchestrator | Separate, remoted |
| Reasoning | None; deterministic execution | Full multi-step reasoning loop |
| Error dealing with | Structured returns, retry in identical loop | Subagent handles internally or surfaces to orchestrator |
| Price | Execution value solely | Further LLM name(s) |
| Latency | Low; one perform name | Larger; full inference cycle |
| Visibility | Full; end in orchestrator’s context | Partial; orchestrator sees abstract solely |
| When it breaks | Unhealthy schema, API failure, improper arguments | Hallucination in subagent, misplaced context, coordination failure |
The context window distinction issues greater than it first seems. When an agent calls a instrument, the consequence lands again in the identical context the agent is actively reasoning in — prior reasoning, instrument consequence, and the whole lot else collectively. When an orchestrator spawns a subagent, that subagent begins contemporary with solely what the orchestrator handed it.
When to Use a Device
Use a instrument when the operation is well-defined, has deterministic habits, and does not require multi-step reasoning to finish.
Name an exterior API. Duties like fetching a person document, posting to Slack, or querying a database are pure execution duties. The mannequin decides to name them; your code runs them.
Remodel or validate knowledge. Operating a regex, formatting a date, calculating a hash, or changing models. Deterministic operations belong in features, not in LLM calls.
Learn or write information. Opening a file, writing output, checking if one thing exists. File system operations are predictable and quick when carried out as direct instrument calls.
Run a search. Semantic search over a vector database, a SQL question in opposition to a database, an internet search. The search itself runs deterministically and returns outcomes. The mannequin interprets these outcomes, however the search runs as a instrument.
The sensible take a look at: when you can write the habits as a Python perform with typed inputs and outputs, and it doesn’t have to motive via a number of steps, it needs to be a instrument.
When to Use a Subagent
Use a subagent when the duty requires multi-step reasoning, when the intermediate work would create noise within the orchestrator’s context, or when duties can run in parallel.
The duty has non-obvious intermediate steps. “Analysis the aggressive panorama for X” includes deciding what to look, studying outcomes, deciding what to look subsequent, synthesizing throughout sources, and producing a structured abstract. Every step depends upon the earlier one. That’s a reasoning course of, and it belongs in its personal context.
The work will be parallelized. Processing ok paperwork independently runs quicker throughout ok concurrent subagents than sequentially in a single context. Microsoft’s AutoGen framework is constructed partly round this sample, coordinating specialised brokers that work in parallel on unbiased subtasks.
The subtask wants its personal instrument set. A code-writing subagent wants a code executor and file system instruments. A analysis subagent wants internet search and doc instruments. Giving the orchestrator entry to all of those creates instrument overload. Analysis on agent tool-calling confirms accuracy degrades as instrument depend grows. Scoping instruments per subagent retains every agent’s resolution house small.
The intermediate output would introduce noise into the orchestrator’s context. A single database question result’s compact and helpful in context. A multi-step analysis synthesis spanning dozens of retrieved paperwork is noise. Isolating that work in a subagent and surfacing solely the conclusion retains the orchestrator’s reasoning clear.
When to make use of subagents
Context isolation improves reliability. A subagent working in a contemporary context can’t be distracted by the orchestrator’s gathered historical past. For duties the place focus issues, equivalent to code era, structured knowledge extraction, or multi-step evaluation, isolation tends to provide extra constant outputs.
The Resolution Framework
Most selections come down to 3 questions.
1. Is the duty primarily execution or reasoning?
If the duty is a well-defined operation with predictable inputs and outputs, a instrument is often the suitable selection. Database queries, API calls, searches, calculations, and file operations all fall into this class.
If the duty requires exploring, analyzing, synthesizing, or making a sequence of selections the place every step depends upon the earlier one, it’s often a greater match for a subagent.
2. Does the intermediate work matter to the orchestrator?
Device outcomes are usually small and helpful sufficient to maintain straight within the orchestrator’s context. A database document, search consequence, or API response can typically be consumed instantly.
When a job generates massive quantities of intermediate work — a number of searches, doc opinions, iterations, or analyses — a subagent can maintain that work remoted and return solely the ultimate conclusion.
3. Can the duty run independently?
A instrument executes as a part of the orchestrator’s workflow and returns a consequence earlier than the workflow continues.
A subagent is commonly a greater match when work will be delegated, run independently, or executed in parallel with different duties. That is particularly helpful when processing a number of paperwork, researching a number of subjects, or coordinating specialised workflows.
Instruments are finest for deterministic execution:
- Fetching knowledge from a database, API, or search system
- Operating calculations, transformations, or validations
- Studying, writing, or updating information and information
Subagents are finest for bounded reasoning duties:
- Researching a subject and synthesizing findings throughout sources
- Writing, reviewing, and refining complicated content material
- Analyzing massive collections of paperwork or knowledge in parallel
The Overengineering Lure
The commonest mistake is introducing subagents earlier than they’re truly wanted.
A subagent could make an structure cleaner, nevertheless it additionally provides complexity. Each subagent introduces one other context window, one other reasoning loop, and one other handoff between parts. Which means extra latency, extra value, and extra transferring elements to debug.
In lots of instances, a well-designed instrument is sufficient. If a job will be accomplished via a simple API name, database question, search, or different deterministic operation, including a separate agent typically creates extra overhead than worth.
As a rule of thumb, begin with a single agent and a small set of well-designed instruments. Solely introduce subagents after they remedy a particular drawback that instruments can not remedy cleanly, equivalent to isolating massive quantities of intermediate work, enabling parallel execution, or giving a posh job its personal devoted reasoning house.
A helpful query to ask is: “What does the subagent truly purchase me?”
- If the reply is just a small quantity of processing earlier than returning a consequence, a instrument might be adequate.
- If the reply is unbiased reasoning, context isolation, specialised capabilities, or parallel execution, a subagent is probably going justified.
Instruments needs to be the default. Subagents needs to be launched after they present a transparent architectural benefit.
What Including Subagents Really Prices
Calling a instrument is straightforward: present inputs, get a consequence. Calling a subagent is totally different. You’re additionally delegating a part of the pondering course of.
Which means the orchestrator has to outline the duty clearly sufficient for the subagent to work independently. The subagent doesn’t robotically inherit the orchestrator’s objectives, assumptions, or full dialog historical past. It solely is aware of what it was given.
Because of this, good subagent architectures rely upon clear handoffs:
- The orchestrator sends a centered, self-contained job.
- The subagent performs its personal reasoning and power use.
- The subagent returns a concise consequence that the orchestrator can use.
For instance, a analysis subagent may return: “Recognized three rivals, together with their pricing fashions and key differentiators.”
It usually shouldn’t return each search question, doc excerpt, and intermediate remark that led to that conclusion.
Retaining the boundary clear has two advantages. First, it prevents the orchestrator’s context from filling up with pointless intermediate work. Second, it makes the system simpler to know and debug as a result of every subagent has a transparent duty and a well-defined output.
Subagents in observe
A helpful rule of thumb is: Go duties down; move conclusions again up. Clear job in, clear abstract out is the contract that retains multi-agent programs debuggable. Methods that permit subagents share mutable state or move partial outcomes again mid-task introduce coordination complexity that rapidly outgrows the unique drawback.
Abstract
Selecting between instruments and subagents is a key architectural resolution in agentic programs. Whereas each assist accomplish duties, they differ considerably in execution mannequin, reasoning capabilities, value, and operational complexity. The next comparability highlights when every strategy is most applicable.
| Idea | Instruments | Subagents |
|---|---|---|
| What runs | Your code | One other LLM with its personal reasoning loop |
| Finest for | Deterministic execution: API calls, searches, calculations, file ops | Complicated reasoning: analysis, code era, parallel processing |
| Context | Shared with the orchestrator | Remoted; contemporary context window per job |
| Price | Execution value solely | A number of extra LLM calls |
| Latency | Low | Larger |
| Debuggability | Excessive; consequence seen in orchestrator’s context | Decrease; inner steps are opaque |
| When to succeed in for it | The duty will be written as a deterministic perform | The duty wants multi-step reasoning, parallelism, or instrument isolation |
| Overengineering danger | Low | Excessive; provides coordination overhead if used prematurely |
| Communication contract | Typed perform enter → structured output return | Self-contained job string → abstract string |
| Begin right here | Sure; default to instruments first | Solely when instruments hit a concrete restrict |
This separation retains programs easy by default, whereas permitting subagents to be added solely when tool-based design is not adequate.
















