Skip to main content
SmolAgents ToolCallingAgent (ReAct) with Celsius, Prime, and Memo tools, demonstrating AI agent capabilities.

Editorial illustration for SmolAgents introduces ToolCallingAgent (ReAct) with Celsius, Prime, and Memo tools

SmolAgents' ReAct AI Can Switch Tools Autonomously

SmolAgents introduces ToolCallingAgent (ReAct) with Celsius, Prime, and Memo tools

Updated: 3 min read

Move past the hype. SmolAgents has actually shipped something: the ToolCallingAgent, built on the ReAct framework. It's a real engineering release, a working system that merges reasoning with execution.

This agent lets a language model run code, manage tools like Celsius, Prime, and Memo on the fly, and coordinate with other agents. It's a blueprint you can use.

In this tutorial, we build an advanced, production-ready agentic system using SmolAgents and demonstrate how modern, lightweight AI agents can reason, execute code, dynamically manage tools, and collaborate across multiple agents. We start by installing dependencies and configuring a powerful yet efficient LLM backend, and then progressively design custom tools, including mathematical utilities, memory storage, and web search capabilities. We explore both CodeAgent and ToolCallingAgent paradigms, understand how tools are managed dynamically through the agent.tools dictionary, and implement multi-agent orchestration.

The specific tools—Celsius for conversion, Prime for number checking, Memo for storage—are the entire point. Each does one boring job well. Reliability comes from these precise, callable functions, not from a monolithic model straining to do everything itself.

Dynamic management through the `agent.tools` dictionary is what makes it feel alive. This isn't a preset flowchart. The system decides what it needs and uses it.

That flexibility separates a script from an agent.

Wiring multiple agents together creates a specialized workforce, passing tasks between them. This approach firmly rejects the giant, do-everything model. It argues for composition: a reasoning core armed with precise instruments.

The result is less magical but far more useful. It works. Now, what will people build?

Common Questions Answered

How does the ToolCallingAgent in SmolAgents implement the ReAct framework?

The ToolCallingAgent follows the ReAct framework by allowing a single model to dynamically switch between reasoning and action without manual prompting. It supports multiple tools like temperature conversion, prime number generation, and memo storage, enabling the agent to handle complex multi-step tasks within a maximum of 5 steps.

What specific tools are bundled with the SmolAgents ToolCallingAgent?

The ToolCallingAgent includes three distinct utilities: a Celsius-to-Fahrenheit temperature converter, a prime number generator, and a memo-style note keeper. These tools allow the agent to perform unit conversions, mathematical operations, and note-taking tasks within a single interaction.

How can developers configure the ToolCallingAgent in SmolAgents?

Developers can configure the ToolCallingAgent by specifying tools, selecting a model engine, setting a maximum number of steps (max_steps), and defining a verbosity level. The configuration allows for flexible and customizable agent behavior, with the ability to register custom tools and control the agent's operational parameters.

LIVE03:21OpenAI's Miles Wang in Talks for USD 2B AI Drug Discovery Startup