Agent frameworks & harnesses · Hugging Face
smolagents
A small open-source Python library from Hugging Face for building agents. Its code agent writes Python to call tools and do math, instead of only returning text.
Last verified:
Features
- CodeAgent writes actions as code. ToolCallingAgent uses ordinary tool calls
- Works with many models, including Hugging Face Inference, other APIs, or a local model
- Can run code in a sandbox such as Docker, E2B, Modal, or Blaxel, as the docs describe
- The GitHub repository is Apache License 2.0
Pricing summary
The library is free under the Apache License 2.0. Hugging Face does not sell a smolagents subscription. You pay the model host you connect, if that host charges.
open-source
smolagents is a small framework. The price, if any, comes from the model provider, not from the library.