Skip to content

DirectoryTools

Smolagents logo

Smolagents

Hugging Face's minimal library for building agents.

Visit Smolagents

Coding & WebOpen SourceWe checked the prices on github.com on 28 Sep 2026.

Smolagents homepage screenshot

What is Smolagents?

Hugging Face's minimal library for building agents.

Who is Smolagents best for?

Smolagents is best for Python developers who want to build AI agents with very little framework code on any model.

  • A first agent in a few lines

    A working agent takes a handful of lines, and the core logic is about a thousand lines of code you can actually read.

  • Agents that act in code

    CodeAgent writes its actions as Python, with loops and nested calls, and can run them in a sandbox through Docker, E2B, Modal or Blaxel.

  • Teams that switch models

    It runs on models from the Hugging Face Hub, on APIs such as OpenAI and Anthropic through LiteLLM, or on local models through Transformers or Ollama.

  • Reusing existing tools

    Agents can use tools from any MCP server, from LangChain or from a Hugging Face Space, and you can share agents and tools on the Hub.

How much does Smolagents cost?

Smolagents is free and open source under the Apache-2.0 license, with no paid tier; the only costs are the hosted models or code sandboxes you choose to connect it to.

Free$0No paid tier
  • Open source under the Apache-2.0 license
  • Installed with pip and run on your own machine
  • Works with local models or the hosted API of your choice

Smolagents is a Python library from Hugging Face, not a hosted service, so there is nothing to buy to use it. Hosted models and code sandboxes you plug in run on your own accounts with those providers. Full pricing on github.com. We checked these prices on .

How do readers rate Smolagents?

No one has rated Smolagents yet. Be the first.

No ratings yetThe score and its stars show once 3 readers have rated Smolagents.
Your rating

Sign in to rate. One rating per account.

Your rating of Smolagents

Is Smolagents open source?

Yes. Smolagents's code is public under the Apache 2.0 licence, so you can read it, change it and run it yourself.

On GitHub

30,343stars

Last commit
10 Nov
Repository age
1 years
Latest release
29 May
Licence
Apache 2.0
Self-hosted
No
Run it yourselfThe code and the steps to set it up are in its repository on GitHub.View on GitHub

What are the best Smolagents alternatives?

Two tools on Recaply do Smolagents's job.

Questions about Smolagents

What is Smolagents?

Hugging Face's minimal library for building agents.

Who is Smolagents for?

Smolagents is best for Python developers who want to build AI agents with very little framework code on any model.

Is Smolagents free for commercial use?

Yes. Smolagents is free and released under the Apache-2.0 license, which allows commercial use, changes and redistribution as long as you keep the license and copyright notices with your copy.

Is Smolagents open source?

Yes. Smolagents's code is public under the Apache 2.0 licence, so you can read it, change it and run it yourself.

What are the best Smolagents alternatives?

The closest alternatives on Recaply are LangChain and Agno.

Where can I try Smolagents?

On its official website, huggingface.co.