# smolagents

> Creates Python agents that call tools through generated code or structured tool requests.

- Canonical HTML: https://youragents.me/en/agents/4123-smolagents
- Markdown: https://youragents.me/en/agents/4123-smolagents.md
- Type: Self-hosted
- Author: Hugging Face
- Available in Russia: no
- Pricing: Free
- Categories: Coding
- Official URL: https://huggingface.co/docs/smolagents

## Description

smolagents is an open-source Python library from Hugging Face for building agents with few abstractions. It supports tasks in which a language model selects actions and uses tools across several steps.

CodeAgent expresses tool calls as Python code, while ToolCallingAgent uses structured tool requests. Developers can connect models, define custom tools, and share components through the Hugging Face Hub.

The library can be used for prototypes, research workflows, and coding assistants. Executing model-generated code calls for isolation; supported options include Docker and external sandbox services.

The library is free under the Apache 2.0 license. Model providers and execution environments may charge separately. Its agent API is marked experimental and can change between releases.
