smolagents
Hugging Face’s lightweight agent library — minimal, readable code for building tool-using LLM agents with support for any model via the Transformers ecosystem
Visit smolagents →smolagents is deliberately minimal — Hugging Face built it as a small, readable alternative to heavier agent frameworks, with agents that write and execute Python code directly to use tools rather than going through a more elaborate tool-calling abstraction layer.
Works with any model via Hugging Face’s Transformers ecosystem or an external API, and is worth reaching for specifically when you want to understand or modify the agent loop itself — the whole library is small enough to read in one sitting, unlike larger frameworks like LangChain. See What Is Smolagents? for the full picture.