Hugging Face · Minimal Code-First Agent Library
A barebones Python library where agents think and act by writing code, built by Hugging Face.
Best for
Minimal code-first agents with Hugging Face ecosystem
Not ideal for
Complex multi-agent orchestration or teams needing visual tooling
Who it's for
Python developers who want a lightweight, transparent agent library with minimal abstraction
Pydantic
Type-safe Python agents with validated structured outputs
FreeLangChain
Developers building production multi-agent systems that need fine-grained control over state, execution flow, and human-in-the-loop checkpoints — and who are willing to trade setup time for that control
FreeSmolagents is a deliberately minimal agent library by Hugging Face. Its core agent logic is approximately 1,000 lines of code. Its flagship CodeAgent writes and executes Python code instead of JSON tool calls — which makes its reasoning transparent and debuggable — and a conventional ToolCallingAgent is also available. The library supports multiple sandboxed execution environments (Docker, E2B, Modal, Blaxel), vision, video, and audio inputs, and any LLM provider via transformers, Ollama, Hugging Face inference providers, or LiteLLM. Tools can come from MCP servers, LangChain, or Hub Spaces, and agents and tools can be shared through the Hugging Face Hub. It also ships smolagent and webagent command-line tools. Smolagents is Apache 2.0 licensed and intended for developers who want a lightweight, unopinionated starting point for agent development rather than a heavy orchestration framework.
Are you the founder? Claim this listing →