AI Agent Platforms / All platforms / smolagents
smolagents
Compact Python library for agents that act through code snippets or tool calls.
smolagents is a Python library for building agents whose core logic fits in about 1,000 lines of code. Its CodeAgent writes actions as Python code snippets instead of JSON tool calls, and it also offers a standard tool-calling agent. Developers use it with local or hosted models and optional sandboxed execution.
| Category | Agent builders and frameworks |
| License | Apache-2.0 |
| Hosting | library for self-managed applications |
| Repository | github.com/huggingface/smolagents |
| Website | huggingface.co/docs/smolagents/index |
| Last verified | 2026-09-02 |
Documented features
- CodeAgent writes actions as Python code snippets
- ToolCallingAgent supports standard JSON tool calling
- Supports multi-agent hierarchies
- Sandboxed code execution via E2B, Blaxel, Modal, or Docker
- Works with local transformers, Ollama, and 100+ models via LiteLLM, plus OpenAI, Anthropic, Azure, and Bedrock
- Integrates tools from MCP servers, LangChain, and Hugging Face Hub Spaces
- Multimodal support for text, vision, video, and audio
- Hub integration for sharing agents and tools
- Ships smolagent and webagent CLI commands
Feature summaries come from the project's own repository and documentation and describe the software as documented on the verification date, not an evaluation.