AI agents and tool use: language models that plan steps and call tools
AI agents are systems that use a large language model to reason, plan, and act through tools. They interleave reasoning traces with actions such as search or calculation, and can teach themselves to call APIs. Open standards like the Model Context Protocol help connect agents to data sources and tools.

What defines an AI agent
An AI agent is a system that uses an AI model to interact with its environment and achieve a user-defined objective, as described in the Hugging Face agents course. The model, typically a large language model, handles reasoning and planning, while tools provide the actions the agent can take.
IBM defines an AI agent similarly as a system that autonomously performs tasks by designing workflows with available tools, and notes that agents use tool calling to obtain up-to-date information and create subtasks to reach complex goals, as stated in IBM's AI agents overview.
Agents versus workflows
Anthropic distinguishes workflows, where LLMs and tools follow predefined code paths, from agents, where the model dynamically directs its own processes and tool usage. The company recommends starting with the simplest solution and using agents only when flexibility and model-driven decisions are needed at scale, as advised in Anthropic's building effective agents guide.
Workflows suit tasks that can be decomposed into fixed steps, such as generating copy and then translating it. Agents are better when the task requires adapting to new information or deciding among several tools throughout the process.
How tool use works
Tool use, or function calling, allows a model to call functions that the developer defines or that the provider executes. The model decides when to call a tool based on the user request and the tool description, then returns a structured call, as shown in the Claude tool use overview.
Tools differ by where the code runs. Client tools execute in the application, which then sends a tool_result block back to the model. Server tools run on the provider's infrastructure, so results appear directly in the response without the application handling execution.
Planning with ReAct and self-supervised tools
The ReAct approach interleaves reasoning traces with task-specific actions, allowing the model to plan, track, and update action plans while gathering information from external sources. In tests on question answering and fact verification, ReAct reduced hallucination by interacting with a Wikipedia API, and on two interactive decision benchmarks it outperformed imitation and reinforcement learning methods by 34% on ALFWorld and 10% on WebShop, according to the ReAct paper.
Toolformer, presented in another arXiv paper, trains the model to select the appropriate API, determine the right timing and arguments for the call, and integrate the returned results into its subsequent token predictions. This self-supervised training requires only a handful of demonstrations for each API, as described in the Toolformer paper.
A standard for tool connectivity: MCP
The Model Context Protocol (MCP) is an open standard that connects AI applications to external systems, enabling them to access data sources, tools, and workflows, as explained in the Model Context Protocol introduction. It works like a USB-C port for AI applications, providing a standardized way to connect.
For developers, MCP reduces the time and complexity of building or integrating with an AI application. For AI applications, it expands the range of tools and data they can reach, improving user experience. For end users, it leads to more capable agents that can access user data and take actions when needed.
| Aspect | Client tools | Server tools |
|---|---|---|
| Execution location | In the user's application | On the model provider's infrastructure |
| Who runs the operation | The application's code | The provider |
| Examples | User-defined functions, bash, text editor | Web search, web fetch, code execution |
| How results are returned | The application sends a tool_result block | Results appear directly in the response |
Frequently asked questions
What is a tool in an AI agent?
A tool is a function that the agent can call, such as a web search, a calculator, or an API. Tools allow the model to access external information or perform actions beyond generating text.
What is the difference between a workflow and an agent?
A workflow follows predefined code paths, while an agent lets the model dynamically decide its own steps and tool usage.
How do agents plan steps?
Agents use the language model to generate reasoning traces that induce, track, and update action plans, as in the ReAct approach.
What is the Model Context Protocol?
MCP is an open standard for connecting AI applications to data sources, tools, and workflows.