# smolagents (slim)

> smolagents is Hugging Face's small Python library for agents that write and run Python code (CodeAgent) or call tools as JSON (ToolCallingAgent), with MCP tools, any model provider and sandboxed execution through E2B, Docker, Modal or Blaxel.

- Full: https://www.anchorterminal.com/tools/smolagents.md (~7,200 tokens) · this version ~1,280 tokens · JSON https://www.anchorterminal.com/tools/smolagents.json · canonical https://www.anchorterminal.com/tools/smolagents
- Index: https://www.anchorterminal.com/llms.txt · API: https://www.anchorterminal.com/api/v1/index.json · MCP: https://www.anchorterminal.com/mcp · Updated: 2026-11-07 · pricing https://www.anchorterminal.com/tools/smolagents#pricing · reviews https://www.anchorterminal.com/tools/smolagents#reviews
- Licence: CC BY 4.0, credit Anchor Terminal and link this page (https://www.anchorterminal.com/terms/#data)

**C · 58.7/100 · rank #739 of 1510 · #18 in Agent frameworks & SDKs · not agent-ready · confidence medium**


Assessment: A compact Python library for code-writing and tool-calling agents, with MCP tools, any model provider and remote sandboxes through E2B, Docker, Modal or Blaxel. The newest release is 1.26.0 of 29 May 2026, a critical remote-executor RCE took about eight weeks to fix, and the local executor isn't a security boundary.

## Facts

- Kind: Agent framework · vendor: Hugging Face · category: Agent frameworks & SDKs · legal entity: Hugging Face, Inc. · provenance 62/100
- Packages: pypi `smolagents`
- Auth: None · pricing: Free · x402: no · licence: Apache-2.0
- Benchmark probes: not run yet, so Performance is pending
- Surface listed: The smolagents Python library, read from the huggingface/smolagents repository (source, docs, workflows, SECURITY.md, tags), huggingface.co/docs/smolagents and OSV on 6 November 2026. Nothing was installed
- Agents: CodeAgent writes actions as Python and runs them; ToolCallingAgent emits JSON tool calls. Managed agents give multi-agent hierarchies
- MCP client: MCPClient and ToolCollection.from_mcp over stdio and Streamable HTTP, with a structured_output option
- Execution: LocalPythonExecutor with an import allow-list by default; E2B, Docker, Modal and Blaxel executors for isolation. The guide says the local executor isn't a security boundary
- Run controls: max_steps, planning intervals, step callbacks and final_answer_checks
- Telemetry: None found in the source. OpenTelemetry tracing through OpenInference when installed
- Releases: 1.24.0 on 16 January, 1.25.0 on 14 May and 1.26.0 on 29 May 2026; none since

- Scores: Reliability 64, Performance pending, Schema & documentation 81, Agent ergonomics 68, Security & auth 66, Payments & pricing 60, Task success pending, Maintenance & community 34, Transparency & trust 65 · negative events -6 · total over the 7 assessed categories
- Why: Reliability, Local-package reading. · Schema & documentation, Framework reading. · Agent ergonomics, Framework reading. · Security & auth, Framework reading (telemetry defaults, approvals, guardrails, sandboxing). · Payments & pricing, Self-hosted rule. · Maintenance & community, v1.26.0 on 29 May 2026, 161 days before this check (10). · Transparency & trust, Apache-2.0 (30).
- Sources: 9, open questions: 3, both in the full twin
- Capabilities: agent.framework, agent.mcp-client, agent.multi-agent
- JSON: https://www.anchorterminal.com/api/v1/tools/smolagents.json
- Verify (for the vendor): the badge `https://www.anchorterminal.com/badges/smolagents.svg` or a link to https://www.anchorterminal.com/tools/smolagents from the front page of github.com/huggingface or of one of its repositories, or the README at the root of github.com/huggingface/smolagents, then `POST https://www.anchorterminal.com/api/v1/verify` `{"slug", "url"}` or `verify_listing` at /mcp; re-checked weekly, no effect on the grade. Snippets in the full twin.
- Support: Discord https://huggingface.co/join/discord; https://huggingface.co/support; https://huggingface.co/docs/inference-endpoints/support/faq; more in the full twin

## Before you call it

1. Run CodeAgent with `executor_type` set to e2b, docker, modal or blaxel whenever the model or its inputs aren't trusted
2. Use smolagents 1.24.0 or later to get the remote-executor deserialisation fix
3. Set max_steps and final_answer_checks so a run stops on its own
4. Pass structured_output explicitly to MCPClient to avoid the default-change warning
5. Pin the version, since minor releases have removed APIs

## Connect

```bash
pip install smolagents   # MCP: pip install 'smolagents[mcp]'
```

## Similar tools

| Tool | Grade | Score | Shared capabilities | Slim |
| --- | --- | --- | --- | --- |
| AI SDK | AA | 89.8 | agent.framework, agent.mcp-client, agent.multi-agent | https://www.anchorterminal.com/tools/vercel-ai-sdk.min.md |
| OpenAI Agents SDK | AA | 86.2 | agent.framework, agent.multi-agent, agent.mcp-client | https://www.anchorterminal.com/tools/openai-agents-sdk.min.md |
| Pydantic AI | A | 81.9 | agent.framework, agent.multi-agent, agent.mcp-client | https://www.anchorterminal.com/tools/pydantic-ai.min.md |
| Strands Agents | A | 80 | agent.framework, agent.mcp-client, agent.multi-agent | https://www.anchorterminal.com/tools/strands-agents.min.md |
| Microsoft Agent Framework | A | 79.4 | agent.framework, agent.multi-agent, agent.mcp-client | https://www.anchorterminal.com/tools/microsoft-agent-framework.min.md |


## Panel reviews (0, desk reviews from public material, no calls made)

