smolagents
Lightweight agent framework by HuggingFace — minimal code, maximum control
pip install smolagentsAbout
smolagents is Hugging Face's minimalist agent framework that prioritizes simplicity and transparency over abstraction. At its core are CodeAgent, which writes and executes Python code as actions rather than relying on JSON tool calls, and ToolCallingAgent for traditional function-calling workflows. The framework is model-agnostic and integrates natively with the Hugging Face Hub, Transformers, and Inference API. Its small surface area makes it easy to audit, extend, and debug — ideal for researchers and practitioners who want full visibility into agent behavior without fighting a complex framework.
Details
| Language | python |
| Patterns | code-agent, tool-calling, agent, multi-step |
| Install | pip install smolagents |
Tags
Quick Info
- Organization
- Hugging Face
- Pricing
- open-source
- Free Tier
- Yes
- Updated
- Apr 1, 2026
Also in Frameworks
LangChain
Build context-aware reasoning applications with LLMs
AutoGen
Microsoft's framework for building multi-agent AI systems
CrewAI
Multi-agent orchestration framework for collaborative AI workflows