From the archive

Hugging Face introduces smolagents for tool-using AI applications

A compact Python library connects language models with tools and lets them express actions as code.

By Chat Overview Published Updated

Hugging Face launched smolagents, a Python library for applications in which a language model chooses and carries out a sequence of actions. The library provides a small starting point for connecting models with tools such as search functions.

Actions expressed as code

Its code-agent approach lets the model generate Python that calls the available tools. A task can include several steps, with the result of one action feeding into the next. That differs from a fixed workflow where every step is decided before the model runs.

The library supports model choices beyond a single hosted provider. This gives teams a way to experiment with an agent's tools and model separately.

Use an agent where the path varies

The launch also explains when a fixed program is simpler: if the required steps are already known, adding an agent can introduce unnecessary variability. smolagents is the successor to the earlier transformers.agents tooling. The Hugging Face profile covers its model hub, development libraries, and hosted services.

Source