All open source
Open SourceAgents23k

smolagents

Hugging Face's minimal library where agents write their actions as Python code.

smolagents is a barebones agent library from Hugging Face built around the idea that agents should express actions as executable Python code rather than JSON tool calls. The entire core logic fits in roughly a thousand lines, it is model-agnostic across Hugging Face, OpenAI, Anthropic, and others, and it supports sandboxed code execution and Hub-shared tools. It is favored for its simplicity and the CodeAgent pattern of generating and running code.

Repository

huggingface/smolagents

Language

Python

What you'd build with it

  • Build code-writing agents that execute Python actions in a sandbox
  • Run agents against any backend model from Hugging Face, OpenAI, or local servers
  • Share and load reusable tools directly from the Hugging Face Hub

Tags

huggingfacecode-agentminimalsandbox