
SmolAgents
Hugging Face's minimalist agent library where agents act by writing Python code
About
SmolAgents is Hugging Face's lightweight Python library for building agents in a few lines of code. Its CodeAgent writes its actions as Python code instead of JSON tool calls, which makes multi-step reasoning and tool composition compact and capable. It is model-agnostic — Hugging Face Inference, LiteLLM, OpenAI-compatible APIs, or local models via Transformers/Ollama — and is best for developers who want a small, hackable agent framework rather than a large platform.
pip install "smolagents[toolkit]"Requires Python and, depending on your setup, an API key (e.g. a Hugging Face token or OPENAI_API_KEY) or a local model runtime. For untrusted code execution, use one of the supported sandboxes (E2B, Modal, Docker) — the built-in local executor is not a security boundary.
More in Agents & Automation
View allCraft Anything
Point Claude Code at a website, app or game and it rebuilds your own version from scratch — clean-room, comparing at three screen widths.
Claude Code Action
Anthropic's official GitHub Action — Claude Code answers @claude mentions, reviews PRs, implements fixes and triages issues in your repos.
Strix
Open-source autonomous AI pentesting: multi-agent teams find OWASP Top 10 flaws and validate each with a working PoC exploit.