Welcome to smolagents on Hugging Face!

EXPLORE THE FUTURE OF AGENTS!

smolagents Documentation

Section Description
🏡 View all docs Explore all documentation.
AWS Trainium & Inferentia Learn about AWS integrations.
Amazon SageMaker Integrate with SageMaker.
Argilla Argilla integration.
AutoTrain AutoTrain functionality.
Bitsandbytes Bitsandbytes support.
Chat UI Chat UI examples.
Competitions Participate in competitions.
Dataset viewer View datasets.
Datasets Explore datasets.
Diffusers Diffusers integration.
Distilabel Distilabel integration.
Evaluate Model evaluation.
Gradio Gradio integration.
Hub Hugging Face Hub.
Hub Python Library Python Library for the Hub.
Hugging Face Generative AI Services (HUGS) Generative AI Services.
Huggingface.js JavaScript library.
Inference Endpoints (dedicated) Dedicated Inference Endpoints.
Inference Providers Inference Providers.
Leaderboards Leaderboards.
Lighteval Lighteval integration.
Optimum Optimum integration.
PEFT PEFT integration.
Safetensors Safetensors support.
Sentence Transformers Sentence Transformers.
TRL TRL integration.
Tasks Available tasks.
Text Embeddings Inference Text Embeddings Inference.
Text Generation Inference Text Generation Inference.
Tokenizers Tokenizers.
Transformers Transformers.
Transformers.js Transformers.js.

Search Documentation

Join the Hugging Face community

and get access to the augmented documentation experience

Collaborate on models, datasets and Spaces

Faster examples with accelerated inference

Switch between documentation themes

Sign Up to get started

What are Agents?

This library is the simplest framework out there to build powerful agents! By the way, wtf are “agents”? We provide our definition in this page, where you’ll also find tips for when to use them or not (spoilers: you’ll often be better off without agents).

This library offers:

Simplicity: the logic for agents fits in ~thousand lines of code. We kept abstractions to their minimal shape above raw code!

Support for any LLM: it supports models hosted on the Hub loaded in theirtransformersversion or through our inference API and Inference providers, but also models from OpenAI, Anthropic… it’s really easy to power an agent with any LLM.

First-class support for Code Agents, i.e. agents that write their actions in code (as opposed to “agents being used to write code”),read more here.

Hub integrations: you can share and load Gradio Spaces as tools to/from the Hub, and more is to come!

Guided tour

Learn the basics and become familiar with using Agents. Start here if you are using Agents for the first time!

How-to guides

Practical guides to help you achieve a specific goal: create an agent to generate and test SQL queries!

Conceptual guides

High-level explanations for building a better understanding of important topics.

Tutorials

Horizontal tutorials that cover important aspects of building agents.

Guided tour

Update on GitHub

Under Construction New! Generate your own 90s page here! Under Construction