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.
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.
Alternatives
Similar systems
Similar in category, features or use cases.
- DeveloperAgent SquadAgent Squad is an open source framework for Python, TypeScript and Swift that distributes requests across multiple specialized agents. A classifier selects the right agent for each message based on agent descriptions and conversation history; the SupervisorAgent additionally coordinates a team of agents in parallel using an agents-as-tools approach. The project was formerly called Multi-Agent Orchestrator, was hosted under awslabs and is now maintained by 2FastLabs. It is licensed under Apache-2.0 and runs locally, in containers or on AWS Lambda.View profile
- DeveloperBeeAI FrameworkThe BeeAI Framework is an open source framework for agents and multi-agent systems in Python and TypeScript, originally developed by IBM and now under open governance at the Linux Foundation (LF AI & Data). The RequirementAgent follows rules the developer defines, such as which tool must be called at which step. Multiple agents collaborate via the HandoffTool, which lets a main agent pass questions to specialists, and via workflows; agents can be served over A2A and MCP. It supports more than ten model providers, OpenTelemetry, memory, RAG and caching. The license is Apache-2.0.View profile
- DeveloperHaystackHaystack by deepset is a Python framework that developers use to build modular pipelines and agents for RAG, semantic search and assistants. The Agent component calls the model and tools in a loop, shares data via a typed state schema, loads tools from MCP servers and allows human review before tool calls. For multi-agent systems, an agent is wrapped as an AgentTool and given to a coordinator agent as a tool, creating coordinator/specialist architectures. Haystack is licensed under Apache-2.0; deepset additionally offers the Haystack Enterprise Platform with a free Studio plan and an Enterprise plan on request.View profile
- DeveloperLangChain Deep AgentsDeep Agents is an agent harness from LangChain for long, multi-step tasks, built on LangChain and the LangGraph runtime. It includes filesystem backends for context management, optional planning with todo lists, skills, long-term memory and human approval. For multi-agent work, the main agent delegates via the task tool to subagents with their own fresh context, each returning a final report; custom subagents are defined in the subagents parameter, and async subagents handle long-running or parallel work. The library is available for Python and JavaScript under the MIT license; tracing and deployment optionally run on the paid LangSmith platform.View profile