← Registry
Agent Official

smolagents

A barebones Python library for building agents that think and act in code, with the `smolagent` and `webagent` CLIs for running multi-step and web-browsing agents.

Install

pip install "smolagents[toolkit]"
$

An Apache-2.0 Python library whose CodeAgent writes its actions as Python code snippets rather than JSON tool calls, an approach the docs cite as using around 30% fewer steps than classic ReAct. It is model-, modality-, and tool-agnostic, working with local models, Hub providers, OpenAI, Anthropic, MCP servers, and LangChain. The smolagent CLI runs a configurable multi-step agent and webagent drives browsing via helium; for untrusted code, pair it with E2B, Modal, or Docker sandboxing since the local executor is not a security boundary.