# huggingface/smolagents

🤗 smolagents: a barebones library for agents that think in code.

Repository: https://github.com/huggingface/smolagents
Canonical: https://ross.abutalabs.com/products/smolagents
Homepage: https://huggingface.co/docs/smolagents
Language: Python
License: Apache-2.0
License Family: permissive
Last push: 2026-08-25T18:36:00+00:00

## Health v2 (maintenance only)
Score: 84/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 86, longevity 45
- inputs: {"age_days": 636, "days_push": 8, "days_rel": 96, "gap_med": 8, "n_releases_24m": 36}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 29005, forks 2895 (observed 2026-08-28T04:11:53.005767+00:00)

## What it is
smolagents is a lightweight Python library from Hugging Face for building LLM-powered agents in a few lines of code, with first-class support for Code Agents that write their actions as Python code. It is model-agnostic, supports tool-calling agents, Hub sharing of tools/agents, and sandboxed code execution via E2B, Modal, Blaxel, or Docker.

## Use cases
- build an ai agent in python with a few lines of code
- run llm agents that write and execute code
- create tool-calling agents with any llm provider
- sandbox agent code execution securely
- share and reuse agent tools via the hugging face hub
- monitor and debug agent runs with opentelemetry

## When to choose
- you want a minimal, simple agent framework with little abstraction
- you prefer code-writing agents over JSON tool calling for composability
- you need model-agnostic agent support across LLM providers
- you want to share or pull tools and agents from the Hugging Face Hub

## When to avoid
- you need a full-featured multi-agent orchestration framework with heavy abstractions
- you cannot run generated code safely and lack a sandbox option
- your workflow is fully deterministic and doesn't need LLM agency

## Facets
- artifact type: library
- maturity: active
- function: agent-framework, llm-inference, sdk, developer-tools
- domain: large-language-models, artificial-intelligence, developer-tools
- platform: python, cloud, cross-platform
- tags: code-agents, tool-calling, hugging-face, sandboxed-execution, opentelemetry, llm-agents, ai-agents, docker

## Member repositories
- huggingface/smolagents (main) score 84

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:53.005767+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T16:53:15.759249+00:00, confidence not recorded.
  - readme: https://github.com/huggingface/smolagents (fetched 2026-08-28T04:11:53.005767+00:00, sha 6fd08c57e5ea)
  - homepage: https://huggingface.co/docs/smolagents (fetched 2026-08-29T07:50:29.430095+00:00, sha 2b30560b672d)
  - site_page: https://huggingface.co/docs/smolagents/guided_tour (fetched 2026-08-29T07:50:29.447077+00:00, sha ee07d8c229f8)
  - site_page: https://huggingface.co/docs/smolagents/tutorials/building_good_agents (fetched 2026-08-29T07:50:29.449800+00:00, sha ce46878a0f5d)
  - site_page: https://huggingface.co/docs/smolagents/tutorials/inspect_runs (fetched 2026-08-29T07:50:29.452285+00:00, sha 42f6f7f7e22d)
  - site_page: https://huggingface.co/docs/smolagents/tutorials/tools (fetched 2026-08-29T07:50:29.454317+00:00, sha 856048a0ced8)
  - site_page: https://huggingface.co/docs/smolagents/tutorials/secure_code_execution (fetched 2026-08-29T07:50:29.456569+00:00, sha fbb2a72d4753)
  - site_page: https://huggingface.co/docs (fetched 2026-08-29T07:50:29.439712+00:00, sha bdec26667b98)
  - site_page: https://huggingface.co/docs/smolagents/installation (fetched 2026-08-29T07:50:29.444773+00:00, sha 206a3c8ed60c)
  - site_page: https://huggingface.co/pricing (fetched 2026-08-29T07:50:29.441819+00:00, sha de6b7a178be5)
- Data as of 2026-08-30T08:39:29.467469+00:00.
