smolagents
Minimal agent library where agents write their actions as Python code.
Small code-writing agents you want to read end to end before trusting them.
You need a large integration ecosystem or managed orchestration out of the box.
About smolagents
Hugging Face's small agent library. Its CodeAgent writes actions as executable Python rather than JSON tool calls, with sandboxed execution options; a conventional tool-calling agent is also included. It is model-agnostic and deliberately small, favouring a readable core over a large feature surface.
smolagents is an open-source project, with 29k stars on GitHub. It was last updated in August 2026.
smolagents vs. the alternatives
All 33 alternatives →| Record | Stars | Pricing | ||
|---|---|---|---|---|
| smolagentsthis listing | 29k | — | Apache-2.0 | Open source |
| langchain | 146k | Python | MIT | Open source |
| ruflo | 72k | TypeScript | MIT | Open source |
| autogen | 61k | Python | CC-BY-4.0 | Open source |
| crewAI | 58k | Python | MIT | Open source |
| LlamaIndex | 52k | — | MIT | Open source |
