---
title: "smolagents: features, version and quickstart · DotsAgent"
description: "smolagents by Hugging Face: licence, latest version, MCP support, durable runs, human approval, tracing and evals, plus a quickstart to copy."
url: https://dotsagent.io/frameworks/smolagents
---

Framework · Hugging Face

# smolagents at a glance

Hugging Face's small Python library, about a thousand lines, whose CodeAgent writes its actions as Python code. That code runs in sandboxes such as Modal, E2B or Docker, and agents and tools can be shared on the Hub.

**Best for:**  Learning and research, especially agents that act by writing code.

## Key facts

- **Maintainer**: Hugging Face
- **Languages**: Python
- **Licence**: Apache-2.0
- **Latest version**: `1.26.0` · May 29, 2026
- **Repository**: [huggingface/smolagents](https://github.com/huggingface/smolagents) · 29,617 stars
- **Hosted option**: None

## Quickstart

Install the package, set the credentials, then run the smallest agent from the official docs. Model IDs are the ones the docs use and may not be enabled on your account.

`Install`

```
pip install 'smolagents[toolkit]'
```

Needs HF token for Inference API

`Python`

```
from smolagents import CodeAgent, InferenceClientModel

# Initialize a model (using Hugging Face Inference API)
model = InferenceClientModel()  # Uses a default model

# Create an agent with no tools
agent = CodeAgent(tools=[], model=model)

# Run the agent with a task
result = agent.run("Calculate the sum of numbers from 1 to 10")
print(result)
```

[Quickstart source](https://huggingface.co/docs/smolagents/index)

## Features

| Any model | — | HF Inference Providers, LiteLLM, local Transformers and Ollama |
| --- | --- | --- |
| MCP client | — | Tools from any MCP server, LangChain or Hub Spaces |
| MCP server | — | — |
| Multi-agent | — | Agents can orchestrate other agents |
| Durable runs | — | — |
| Human approval | — | — |
| Tracing | — | — |
| Evals | — | — |

## Recent changes

- No PyPI release since 1.26.0 on 29 May 2026, though the repo still received commits in late September 2026.

## Alternatives in the same language

- [OpenAI Agents SDK](https://dotsagent.io/frameworks/openai-agents-python)

- [Claude Agent SDK](https://dotsagent.io/frameworks/claude-agent-sdk)

- [Google ADK](https://dotsagent.io/frameworks/google-adk)

- [Microsoft Agent Framework](https://dotsagent.io/frameworks/microsoft-agent-framework)

- [LangGraph](https://dotsagent.io/frameworks/langgraph)

- [CrewAI](https://dotsagent.io/frameworks/crewai)

## Sources

1. [huggingface.co](https://huggingface.co/docs/smolagents/index)/docs/smolagents/index
2. [pypi.org](https://pypi.org/pypi/smolagents/json)/pypi/smolagents/json
3. [api.github.com](https://api.github.com/repos/huggingface/smolagents)/repos/huggingface/smolagents

Independent reference for people who build AI agents. Not affiliated with any vendor named here.

© 2026 DotsAgent · Facts checked October 1, 2026
