smolagents
A minimal Python library from Hugging Face for building AI agents that write and run code to solve tasks. It lets you set up capable agents in a few lines.
Pick a small issue you can reproduce, then fix it with your AI coding agent.
Share on XLicense: Apache-2.0
Overview
smolagents is a small Python library from Hugging Face for building AI agents that think in code. Its CodeAgent writes its actions as code instead of structured tool calls. The agent logic fits in about 1,000 lines. It works with any model, including local transformers or Ollama models and providers reached through LiteLLM. Generated code can run in sandboxes such as Blaxel, E2B, Modal or Docker.
Key features
- CodeAgent that writes its actions as Python code
- Model-agnostic, from local models to hosted providers
- Tools from MCP servers, LangChain or Hub Spaces
- Sandboxed execution through Blaxel, E2B, Modal or Docker
- Share and pull tools or agents on the Hugging Face Hub
Best for
Developers who want a compact, readable agent framework and are happy to let the model write code. Running generated code safely calls for one of the supported sandboxes.
- Upstream
- huggingface/smolagents
- Fork on GitHub
- Guo-astro/smolagents
- Upstream stars
- 30k
- Category
- AI agents and LLM tools
- Language
- Python
- License
- Apache-2.0
- Forked
- 2026-09-28
- Sync status
- In syncLast synced 2026-11-08
More in AI agents and LLM tools
/last30days is an AI-agent skill for researching recent discussions across social platforms, video, news, markets, and the web. It brings scattered signals together in a synthesized brief for trend research and preparation.
Forked 2026-10-22Last synced 2026-11-08License: MITAI agents and LLM toolsGitHub
A portable C99 inference engine for running Kimi K3 on a CPU without a GPU or machine-learning framework. It streams the large checkpoint from disk to support inference with limited RAM, for batch text generation or text chat.
Forked 2026-10-21Last synced 2026-11-08License: Apache-2.0AI agents and LLM toolsGitHub
LayerFS gives AI agents writable workspaces over shared history, so they can work in parallel without copying the base. Use it to checkpoint, branch, rewind, and merge agent changes.
Forked 2026-10-21Last synced 2026-11-08License: MITAI agents and LLM toolsGitHub
Magnitude runs open models locally and tunes kernels for your hardware. Use it to connect local models to supported agents or an OpenAI-compatible client.
Forked 2026-10-19Last synced 2026-11-08License: Apache-2.0AI agents and LLM toolsGitHub