# smolagents review

> smolagents is a minimal Python library from Hugging Face for building agents that write their actions as Python code to call tools.

Devtoolwatch Board, the week of Oct 25–31, 2026. Canonical page: https://index.devtoolwatch.com/tools/smolagents/

## TL;DR

smolagents is an open-source Python library for building and running agents in a few lines of code. It is for developers who want minimal abstractions and any LLM. Its CodeAgent writes actions as Python code instead of JSON tool calls, with sandboxed execution via E2B, Blaxel, Modal or Docker.

## smolagents at a glance

- **Category:** [Agent frameworks](https://index.devtoolwatch.com/categories/agent-frameworks/)
- **Maintained by:** Hugging Face (organization, [@huggingface](https://github.com/huggingface) on GitHub)
- **License:** Apache 2.0
- **Language:** Python, Makefile
- **Repository:** [github.com/huggingface/smolagents](https://github.com/huggingface/smolagents)
- **Website:** [huggingface.co/docs/smolagents](https://huggingface.co/docs/smolagents)
- **PyPI package:** [smolagents](https://pypi.org/project/smolagents/) 1.26.0
- **Latest release:** [v1.26.0](https://github.com/huggingface/smolagents/releases/tag/v1.26.0) on GitHub, May 29, 2026
- **First published:** Dec 5, 2024

## What smolagents does

- smolagents provides a CodeAgent that writes its actions as Python code snippets, so tool calls become Python function calls.
- smolagents also offers a ToolCallingAgent that writes actions as JSON/text blobs, for cases where that style fits better.
- smolagents works with any LLM: local transformers or Ollama models, Hub inference providers, or OpenAI, Anthropic and others via LiteLLM.
- smolagents can use tools from MCP servers, from LangChain, or a Hugging Face Hub Space as a tool.
- smolagents lets you share and pull tools or agents to and from the Hugging Face Hub.
- smolagents agents accept text, vision, video and audio inputs.
- smolagents includes CLI commands: smolagent for a general multi-step CodeAgent and webagent for a helium-based web-browsing agent.

### How it works

smolagents runs as a Python library or from the CLI. A CodeAgent follows a ReAct loop. The model generates a Python code action from memory, the code runs, and execution logs return to memory until the agent calls final_answer. Models connect through InferenceClientModel, LiteLLMModel, OpenAIModel, TransformersModel, AzureOpenAIModel or AmazonBedrockModel. Code can run in E2B, Blaxel, Modal or Docker sandboxes.

## How to install smolagents

**With pip (default toolkit)**

```
pip install "smolagents[toolkit]"
```

### Requirements

- Python 3.10 or later
- Access to an LLM, either a local model or a provider API key such as ANTHROPIC_API_KEY or OPENROUTER_API_KEY
- A sandbox such as E2B, Blaxel, Modal or Docker is recommended for running agent code

### First steps

1. Install smolagents with the default toolkit using pip.
2. Create a model, for example InferenceClientModel, and a CodeAgent with tools such as WebSearchTool.
3. Call agent.run with your task to execute the agent.
4. Run smolagent without a prompt to launch the interactive setup wizard for agent type, tools and model.

## Who smolagents is for

- Python developers who want an agent framework with minimal abstractions they can read and modify.
- Teams wanting to switch between open and closed LLMs without changing agent code.
- Developers building agents whose actions use loops, conditionals and function nesting in code.
- Users of the Hugging Face Hub who want to share agents and tools as Spaces.

### Limitations

- smolagents' built-in LocalPythonExecutor is not a security sandbox and must not be used to run untrusted code.
- smolagents CodeAgent executes arbitrary code, so safe use needs a sandbox like E2B, Blaxel, Modal or Docker.
- smolagents is a Python library and requires Python 3.10 or later.

## Usage data (the week of Oct 25–31, 2026)

- Board rank: #143 overall, #15 in Agent frameworks, momentum score 55
- Downloads that week: 152.7k (+29% vs 4-week average)
- New GitHub stars per week (last 12 weeks): Aug 9: 103; Aug 16: 123; Aug 23: 129; Aug 30: 145; Sep 6: 126; Sep 13: 123; Sep 20: 112; Sep 27: 165; Oct 4: 120; Oct 11: 137; Oct 18: 139; Oct 25: 133

## smolagents alternatives

| Rank | Tool | Stars | Downloads/wk |
|---|---|---|---|
| #1 | [Harness²](https://index.devtoolwatch.com/tools/google-research-harness2/) | 21.7k | – |
| #2 | [HyperFrames](https://index.devtoolwatch.com/tools/heygen-com-hyperframes/) | 76.6k | 1.5M |
| #3 | [AgentScope](https://index.devtoolwatch.com/tools/agentscope-ai-agentscope/) | 35k | 51.4k |
| #4 | [AG-UI](https://index.devtoolwatch.com/tools/ag-ui/) | 16.9k | 4.6M |
| #5 | [LangGraph](https://index.devtoolwatch.com/tools/langgraph/) | 44.2k | 18.5M |
| #6 | [Bifrost](https://index.devtoolwatch.com/tools/maximhq-bifrost/) | 9.3k | – |

## smolagents FAQ

### Is smolagents free and open source?

Yes. smolagents's source code is on GitHub (huggingface/smolagents) under the Apache 2.0 license, so you can use it for free. Its website also links to a pricing page (https://huggingface.co/pricing) for any paid plans.

### How do I install smolagents?

Run `pip install "smolagents[toolkit]"`. The smolagents package needs Python 3.10 or newer. The install section above has the other options from the project's README.

### Is smolagents still maintained?

Yes. The huggingface/smolagents repository was last updated on Oct 6, 2026, and the latest release, v1.26.0 on GitHub, came out on May 29, 2026.

### How popular is smolagents?

smolagents has 30.2k GitHub stars as of Nov 1, 2026. It gained 133 new stars in the week of Oct 25–31, 2026, against a 12-week average of 130 a week. Its main package had 152.7k downloads that week, +29% against its own 4-week average. That made it #15 among AI agent frameworks on the Devtoolwatch Board.

### smolagents vs LangGraph: how do they compare?

smolagents and LangGraph are both tracked by Devtoolwatch as AI agent frameworks. smolagents has 30.2k GitHub stars and LangGraph has 44.2k. In the week of Oct 25–31, 2026, smolagents's main package had 152.7k downloads and LangGraph's had 18.5M. LangGraph is a low-level orchestration framework and runtime for building, managing, and deploying long-running, stateful agents in Python or JavaScript. [LangGraph review](https://index.devtoolwatch.com/tools/langgraph/)

### smolagents vs LangChain: how do they compare?

smolagents and LangChain are both tracked by Devtoolwatch as AI agent frameworks. smolagents has 30.2k GitHub stars and LangChain has 148.8k. In the week of Oct 25–31, 2026, smolagents's main package had 152.7k downloads and LangChain's had 41.1M. [LangChain review](https://index.devtoolwatch.com/tools/langchain/)

### What are the best alternatives to smolagents?

Other AI agent frameworks on the Devtoolwatch Board in the week of Oct 25–31, 2026, by momentum: Harness² (#1), HyperFrames (#2), AgentScope (#3), AG-UI (#4), LangGraph (#5). The alternatives table above has their numbers.

### How does smolagents work?

smolagents runs a ReAct-style loop. The model generates a Python code action from the agent's memory, the code executes, and logs go back into memory. The loop ends when the agent calls the final_answer tool, whose argument is returned.

### Is smolagents open source?

Yes. The smolagents documentation describes it as an open-source Python library, and the repository is published by Hugging Face on GitHub.

### Is smolagents safe to run in production?

smolagents executes model-written code, so the README says you should run agent code in a sandbox. Supported options are E2B, Blaxel, Modal and Docker. The built-in LocalPythonExecutor is not a security boundary.

### Which LLMs does smolagents support?

smolagents supports any LLM. Options include local transformers or Ollama models, Hub inference providers, OpenAI-compatible servers, Azure OpenAI, Amazon Bedrock, and OpenAI, Anthropic and others through LiteLLM.

### Why do smolagents agents write actions in code?

smolagents' README states that code actions use 30% fewer steps than JSON tool-call dictionaries and reach higher performance on difficult benchmarks. Code also allows loops and function nesting in one action.

## Sources

1. [huggingface/smolagents on GitHub](https://github.com/huggingface/smolagents)
2. [smolagents README](https://github.com/huggingface/smolagents/blob/main/README.md)
3. [smolagents on PyPI](https://pypi.org/project/smolagents/)
4. [smolagents website](https://huggingface.co/docs/smolagents)
5. [Release v1.26.0 (May 29, 2026)](https://github.com/huggingface/smolagents/releases/tag/v1.26.0)
6. [Release v1.25.0 (May 14, 2026)](https://github.com/huggingface/smolagents/releases/tag/v1.25.0)
7. [Release v1.24.0 (Jan 16, 2026)](https://github.com/huggingface/smolagents/releases/tag/v1.24.0)
8. [Hacker News: Qwen 3.8 27B](https://news.ycombinator.com/item?id=49299605)
9. [Hacker News: Kimi-K3 on HuggingFace](https://news.ycombinator.com/item?id=49065752)
10. [Hacker News: DeepSeek-v3.2: Pushing the frontier of open large language models [pdf]](https://news.ycombinator.com/item?id=46108780)
11. [Devtoolwatch Board, the week of Oct 25–31, 2026](https://index.devtoolwatch.com/)
