Tool Selection for AI Agents
A single model performs one kind of action, while external tools let an agent perceive its environment and act upon it.
The Limits of a Single Model
Picture a model working entirely on its own. A language model can produce text, and an image generator can produce pictures. Each one is good at a single kind of output. Nothing about either model lets it check the weather, look up a bank balance, or send a message. Its reach ends where its own inputs and outputs end.
An agent is different because it can be connected to things outside the model. A system does not need external tools to count as an agent, but without them its capabilities stay narrow. The question this article follows is simple: once an agent can reach beyond the model, what kinds of tools does it need, and what does each kind change about the agent's behavior?
Tools do two jobs. Some let an agent take in information about its surroundings, and others let it change something in those surroundings. Both jobs matter. An agent that can only observe is stuck watching, and an agent that can only act has no picture of what it is acting on.
The tool inventory is the full set of tools an agent can call. The inventory determines what the agent is able to do, which makes it a design decision. Adding tools widens what the agent can accomplish, but a larger inventory is harder to understand and to use well. Choosing the right inventory usually takes experimentation rather than a single correct answer.
What Changes When Tools Are Added
Before reading further, compare two situations. In the first, a model receives a request and can only answer in the form it was built for. In the second, the same model sits inside an agent that can call tools. The diagram below shows how the reach of the system changes. Notice that the model is the same in both columns; what differs is the set of tools attached to it.
In the standalone case, the model's reach ends where its inputs and outputs end. In the tool-equipped case, the model can recognize that a task needs something it cannot do well alone and pass that part to a tool. The reach of the agent is therefore the combined reach of the model and every tool it can call, not the reach of the model by itself.
Read-Only Actions Versus Write Actions
Every tool falls into one of two directions. A read-only action lets the agent gather information from a data source without changing anything. A write action lets the agent change its environment or the data sources it depends on. Write actions carry greater risk, because their effects persist after the tool call has finished.
The difference is easiest to see when one tool can do both. A SQL executor can retrieve a data table, which is a read. The same executor can also change or delete that table, which is a write. An email API can read a message and can also send a reply. A banking API can report a current balance and can also initiate a transfer. The tool is the same kind of system in each case; only the operation determines whether the action is a read or a write.
The direction of data flow is the key idea. A read flows from the data source back to the agent, so the agent gains information without altering anything. A write flows from the agent outward into the environment, so the agent's decision now has consequences. Write actions are what make automation possible. An agent could research prospective customers, draft and send emails, read the replies, follow up, record orders, and update a database, all without a person handling each step.
Consider the workplace. A new intern should not be given authority to delete the production database, and an unreliable AI should not be allowed to start bank transfers. The point is not that write access is forbidden. The point is that write access must be matched to the system's reliability and protected against manipulation. Humans make mistakes too, and tools are what let both humans and models accomplish far more than either could alone.
Three Families of Tools
Once an agent's inventory is in view, its tools can be sorted into three families. The first is knowledge augmentation, sometimes called context construction, where tools enrich what the agent knows at the moment it is working. The second is capability extension, where tools cover tasks a model handles poorly by itself. The third is environment interaction, the family of tools that let the agent act upon its environment. That third family corresponds to the write actions described in the previous section.
Knowledge augmentation addresses a limit on what a model knows. A model's knowledge is fixed at the point its training ends, and its working context is limited to what is in front of it. Knowledge augmentation tools supply additional material into that working context, so the agent does not have to memorize everything in advance. The Chameleon agent, which combines a language model with a set of tools, uses knowledge retrieval in this way: it adds retrieved material to what the model has to work with.
Capability extension addresses weaknesses inside the model. Math is the standard illustration, because models are notoriously weak at arithmetic. Rather than spending large amounts of training effort to make a model good at arithmetic, it is far more resource-efficient to give the model access to a calculator tool. Simpler tools in this family include a calendar, a timezone converter, a unit converter, and a translator for languages the model handles poorly. In each case the tool does a narrow job reliably, and the model does the reasoning around it. A code interpreter is a more powerful member: it runs a piece of code, returns the output, or analyzes why the code failed.
How a Planner Routes a Request
Tools only help if the agent knows which ones to use and in what order. That job belongs to the planner. The model is responsible for solving a task, and a task is defined by its goal and its constraints. The goal says what must be achieved, and the constraints limit how it may be achieved. The planner reads the incoming request and forms a plan that respects both.
Complex tasks cannot be handled in a single leap, so the agent produces a plan, which is a roadmap of the steps needed to accomplish the task. Producing a good plan usually means understanding the task, considering several ways to achieve it, and choosing the most promising one. In the multimodal case, the planner's first decision is which output types the request needs. The diagram below traces that routing.
The routing works in two ways. In the diagram, the planner decides whether text generation, image generation, or both are needed. Either branch can run alone. When the request calls for both, their outputs are combined into one reply. The same routing pattern explains how ChatGPT produces text and images, since it relies on DALL-E as its image generator.
The idea also runs in the other direction. A model that accepts only text can call an image captioning tool to interpret pictures, a transcription tool to handle audio, or an OCR tool to read text out of PDFs. The planner decides which of these tools to call before the text model reasons over their results. The model never learns to read the picture; it learns when a picture needs reading and passes the work to the right tool.
Tracing a Request That Needs Text and a Picture
A user asks for a short description of a beach and also wants an image of it. Trace how the planner routes this request through the available tools.
- 1Receive the request
The request arrives at the planner with two output types mentioned: a description and an image.
- 2Form a plan
The planner considers the goal, which is one reply containing both outputs, and the constraint that the reply must be a single combined answer.
- 3Route the text part
The description is text, so the planner sends this part to the language model, which generates the text.
- 4Route the image part
The picture cannot come from the language model alone, so the planner calls the text-to-image tool with a description of the beach.
- 5Combine the outputs
Both branches have produced results, so the outputs are merged into one reply that contains the text and the image.
Both branches ran, and their outputs were combined into one reply. Neither branch was skipped, because the request asked for both kinds of output.
Common Mistakes When Choosing Tools
Common mistake Assuming a model is reliable at arithmetic because it can write fluent text
What it looks likeA model asked to multiply two large numbers gives an answer straight from its own generation.
Why it failsModels are notoriously weak at arithmetic, so fluent output does not mean correct calculation.
Do this insteadGive the agent a calculator tool and let the model reason around the tool's result.
Common mistake Granting write access without matching it to the system's reliability
What it looks likeAn agent that is still unreliable is allowed to start bank transfers.
Why it failsWrite actions have consequences that persist after the call finishes, and they must be protected against manipulation.
Do this insteadMatch write access to demonstrated reliability and restrict it to the operations the task truly needs.
Common mistake Adding tools until the inventory is large, without checking whether the agent can use them
Why it failsA larger inventory is harder to understand and to use well, even though it widens what the agent can accomplish.
Do this insteadChoose the inventory through experimentation, and keep only tools that serve the agent's actual tasks.
Common mistake Treating each tool as belonging to exactly one family
Why it failsThe three families are not mutually exclusive, and a single tool can serve more than one purpose.
Common mistake Confusing the same tool's read operation with its write operation
What it looks likeTreating a SQL executor as read-only because it was first used to retrieve a table.
Why it failsThe same tool can retrieve a data table, which is a read, and also change or delete it, which is a write.
Do this insteadClassify each operation separately, not the tool as a whole.
Practice Routing and Classifying
An agent's inventory includes a calendar tool, a unit converter, an email API, and a knowledge retrieval tool. For each tool, name its family (knowledge augmentation, capability extension, or environment interaction) and say whether its typical use is a read or a write. Then describe what the planner would do with a request to convert a recipe's weights from pounds to kilograms and email the result to a friend.
Hints
- Start with the three families and ask whether each tool adds knowledge, covers a weakness, or acts on an environment.
- Sending an email changes something outside the agent; reading a message does not.
- Think about the planner's job: decide which tools to call and in what order, based on the goal and constraints.
What do you think happens?
A user asks for a sentence describing a sunset and also wants a picture of that sunset. Before reading the answer, predict which branches of the planner's routing run and how the results are returned.
Reveal answer
Both branches run: text generation produces the sentence, image generation produces the picture, and their outputs are combined into one reply.
When a request calls for both text and image output, the planner routes the request down both branches. Either branch can run alone, but when both are needed their outputs are merged into a single reply.
Article Summary
- 1A single model performs one kind of action, while external tools let an agent perceive its environment and act on it. Tools extend the agent's reach beyond what the model can do alone.
- 2Read-only actions gather information without changing anything. Write actions change the environment or data sources, carry greater risk, and make automation possible.
- 3The three tool families are knowledge augmentation, which enriches working context; capability extension, which covers tasks a model handles poorly; and environment interaction, which corresponds to write actions.
- 4A planner decides which tools to call and in what order, based on the goal and constraints of the task. For multimodal requests, it routes parts of the request to text and image branches and combines their outputs.
At a glance
- A single model performs one kind of action, while external tools let an agent perceive its environment and act on it, extending its reach.
- Read-only actions gather information without changing anything, while write actions change the environment or data sources and carry greater risk.
- The three tool families are knowledge augmentation, capability extension, and environment interaction, and a single tool can belong to more than one purpose.
- A planner decides which tools to call and in what order, based on the task's goal and constraints, and can route a multimodal request down text and image branches before combining the outputs.