Building Agents with Smolagents
- Source
- youtube.com
- Author
- Hugging Face
- Date
Context
Hugging Face's smolagents tutorial shows an agent built from a , a set of tools and a loop, with the model swappable without rewriting the rest. In the walkthrough, a -calling agent is given a built-in web search tool and a model reached through Hugging Face's Providers, then asked who the current president of France is, with the date given as December 2025. The agent chooses to call web search, reads the results and answers. The presenter then points the same agent at a model from OpenAI and one from Anthropic by changing the model object.
Custom tools are plain Python functions with type hints and a description, marked with a decorator; the presenter stresses the description because the agent reads it to decide whether the tool is useful. In the example image tool, the agent first searches the web to identify the person, then generates the image, which the presenter contrasts with the image model alone guessing. The agent is then wrapped in a chat interface. Hugging Face has a separate walkthrough of Inference Providers.
- Model — A computational system that uses learned patterns to produce an output from information supplied to it.
- Tool — An operation that the software around a model makes available for the model to request, with a name, expected inputs and a kind of result.
- Inference — Using a trained model to produce an output from a supplied input.
- agentic loop — The cycle an agent runs in: decide, call a tool, read the result, decide again — repeating until the goal is met or a stop condition fires.
Checking sign-in…
Loading comments…






