Skip to content
ActiveDeveloperOpen Source, Apache-2.0

smolagents

Lightweight agent library from Hugging Face

smolagents is a Python library from Hugging Face whose agent logic fits in about a thousand lines of code. The central CodeAgent writes its actions as Python code, and the ToolCallingAgent covers classic JSON tool calling. For multi-agent systems, you pass additional agents to a manager agent in the managed_agents argument; these need a name and a description and are called by the manager like tools. The library is model agnostic, can execute code in sandboxes such as E2B, Modal, Blaxel or Docker, and is licensed under Apache-2.0.

Position on the system map88 systems
Scalability, upwardsusable without developers, to the right

Good fit if

Focus: Developers and researchers who want to experiment with little abstraction and open models

  • your project is about Research agents with web search, Data analysis with code execution or Prototypes with open models
  • someone on your team writes code
  • you want to get started quickly (learning curve: flat)

Probably not if

  • nobody on your team writes code (1/5 for use without developers)

Key figures

Usable without developers
1/5
Scalability
2/5
Integrations
3/5
Versioning
1/5
Observability
2/5

Editorial rating on a scale from 1 to 5. Methodology

Fact sheet

Category
Developer
Type
Lightweight agent library from Hugging Face
Licence
Open Source (Apache-2.0)
Pricing
Open SourceLibrary without license fee (Apache-2.0). Costs arise only for the models used, for example via Hugging Face Inference Providers or other APIs, and for optional sandbox services.
Deployment
Self-Hosted, Docker, Any
Models
Hugging Face Inference Providers, OpenAI, Anthropic, LiteLLM, Transformers (lokal), Ollama
RAG
Yes
Multi-Agent
Yes
SSO, roles (RBAC)
SSO no, RBAC no
Latest version
1.26.0 (29.05.2026)
GitHub stars
29,770

Key features

  • CodeAgent with actions as Python code
  • Manager agent with managed_agents
  • Sandboxed execution (E2B, Modal, Blaxel, Docker)
  • Tools from MCP servers, LangChain and Hub Spaces
  • Sharing agents and tools via the Hugging Face Hub

Typical use cases

  • Research agents with web search
  • Data analysis with code execution
  • Prototypes with open models
  • Teaching and research on agents

Market notes

Changes to smolagents by email

We let you know when the status, pricing or license of smolagents changes, together with the weekly market notes.

Implementation

Get smolagents implemented

Free for you. Partners only pay for requests they accept.

Request a project

Alternatives

Similar systems

Similar in category, features or use cases.

Compare smolagents