Lagent provides a lightweight framework for building agents powered by large language models.
smolagents
The smolagents library provides a lightweight foundation for building code based AI agents.

About smolagents
smolagents is an open source Python library for building agents that write their actions as code. A CodeAgent can be defined in a few lines, given tools such as web search, and run with a selected language model.
It works with local transformers and Ollama models, Hub inference providers, and models from OpenAI, Anthropic and others via LiteLLM, and handles text, vision, video and audio inputs. Code can be executed in sandboxed environments via Blaxel, E2B, Modal or Docker, and agents and tools can be shared to and loaded from the Hugging Face Hub. It includes smolagent and webagent commands for running agents from the CLI.
Key features
- CodeAgent writes agent actions as executable code
- Run code in sandboxed environments via Docker, E2B, Modal, Blaxel
- Work with local transformers, ollama, Hub, OpenAI, and Anthropic models
- Use tools from MCP servers, LangChain, or Hub Spaces
- Support text, vision, video, and audio inputs
- Share and load agents and tools via Hugging Face Hub
- Small codebase with minimal abstractions above raw code
- Works with many models, tools, and input modalities
- Supports sandboxed code execution and Hub sharing
smolagents at a glance
- Category
- AI & Machine Learning › AI Agent Frameworks
- Type
- Open-source project
- Pricing
- Not confirmed. Check the site
- Open source
- Yes · Source code
- Language
- English
- Last checked
- Oct 6, 2026 · Online when checked
- Listed
- Oct 5, 2026
smolagents alternatives
Tools and sites you could use instead, ranked by how closely they match.
Educational framework exploring ergonomic, lightweight multi-agent orchestration. Managed by OpenAI Solution team.
A fast and lightweight framework for creating decentralized agents with ease.
Strands Agents SDK provides an open source toolkit for building and controlling production agents in Python and TypeScript.
SuperAGI provides tools for developers to build, manage, and run autonomous AI agent systems.
ConnectOnion provides command line tools for building and running AI agents.
Popular in AI Agent Frameworks
Well-known listings from the same topic.
smolagents FAQ
How do I install smolagents with default tools?
How can code execution be isolated?
How do I share or reuse an agent?
Tell us and an editor will check it.
Claim the listing and suggest updates yourself. An editor checks every claim first.












