smolagents

A minimalist agent library where agent code is only dozens of lines

What it is

A lightweight open-source agent library compressing core logic into very little code, advocating that models write Python directly to call tools instead of relying on complex JSON conventions.

Highlights

  • Core logic minimal, source easy to read
  • Models write code directly to call tools
  • Seamless with community models
  • Great for learning and quick prototypes

Who it is for

Developers wanting to understand agent internals or build lightweight prototypes.

Caveats

  • Install with pip and define a tool-calling agent in a few lines.