Skip to content

Smolagents

FieldValue
DeveloperHugging Face
LanguagePython
LicenseApache 2.0
GitHubhuggingface/smolagents

Smolagents is Hugging Face’s minimalist agent framework. Agents write Python code as their action space (instead of JSON tool calls), making them more flexible and debuggable. It’s designed to be simple — under 1000 lines of core code.

  • Code-as-action — Agents write Python code to act
  • Lightweight — Minimal abstraction, easy to understand
  • MCP support — Model Context Protocol integration
  • Multi-agent — Managed agent orchestration
  • HF Hub integration — Share and load tools from the Hub

✅ Want minimal framework overhead ✅ Prefer code-as-action over JSON tool calls ✅ Using Hugging Face models ✅ Prototyping and research