Directory / smolagents
smolagents
Verified
Hugging Face small code-agent library with a code-first interface.
smolagents is Hugging Face’s open library for agents that write and run Python as their tool interface. The library is deliberately small and self-hosted. Models can be HF, local, or commercial APIs.
- Model support
- Multi-model
- Deployment
- Self-hosted
- Open source
- Yes
- License
- Apache-2.0
- Pricing model
- Free
- Added / updated
- 19 Aug 2026 / 19 Aug 2026
huggingface.co/docs/smolagents · Docs · Source
Assessment
smolagents uses model-written code as an action interface instead of JSON tool calls. The library is small and readable, but executing generated Python requires a separate sandbox and strict credentials policy.
Strengths
- Tiny Apache-2.0 library, code-first agents.
- Hugging Face integrations and local models.
- Good for research and internal tools.
Limitations
- The interpreter requires a separate sandbox.
- No team session or collaboration layer.
- Generated Python can expose credentials or host resources without strict isolation.