$npx skillfedfor your agent

smolagents

🤗 smolagents: a barebones library for agents. Agents write python code to call tools or orchestrate other agents.

With conditionsPyPI Artificial IntelligenceReleased May 2026626.8K downloads / moPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — smolagents-1.26.0-py3-none-any.whl
v1.26.0 · released 2026-05-29 · Python >=3.10 · 6 runtime deps: huggingface-hub, requests, rich, jinja2, pillow, python-dotenv

Yes, if you want to build code-writing agents with minimal boilerplate and flexibility across LLM providers. The low install friction, active maintenance, and zero known vulnerabilities make it safe to try. The young release history (first release 2024-12-27) means the API may evolve, but the design is intentionally minimal. Start with the quick demo to verify it fits your use case.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python >= 3.10.
  • Sandboxed execution backends (Blaxel, E2B, Modal, Docker) may require additional setup or API keys.
  • Low install friction with a pure-Python wheel and six common runtime dependencies.

License · maintenance · safety

(unclear)

last release 2026-05-29 (77 days)

0 known vulnerabilities (OSV.dev, 2026-08-14) · 626,778 downloads/mo, #5,687 on PyPI

Verify before relying

pip install 'smolagents[toolkit]'

from smolagents import CodeAgent, WebSearchTool, InferenceClientModel

model = InferenceClientModel()
agent = CodeAgent(tools=[WebSearchTool()], model=model)
agent.run("How many seconds would it take for a leopard at full speed to run through Pont des Arts?")
  • Whether the sandboxed execution backends (Blaxel, E2B, Modal, Docker) are included or require separate installation.
  • Performance characteristics and latency for typical multi-step agent workflows.
  • Whether the library's ~1,000 lines of code claim remains accurate at version 1.26.0.
Same gist for agents: .md · .json

What it is and what it does

smolagents is a lightweight agent framework that lets you build autonomous agents in a few lines of code. Unlike traditional agents that generate tool-call descriptions, smolagents agents write actual Python code to invoke tools and coordinate multi-step workflows. The library is model-agnostic—it works with local transformers, Ollama, OpenAI, Anthropic, and many other providers via LiteLLM or Hugging Face's inference API. It also supports multiple modalities (text, vision, video, audio) and can pull tools from MCP servers, LangChain, or Hugging Face Spaces.

The core agent type, CodeAgent, follows a ReAct loop: it receives a task, generates Python code snippets that call tools as functions, executes that code, stores the results in memory, and repeats until it calls a final_answer function. For security, you can run agents in sandboxed environments. The library integrates with Hugging Face Hub for sharing agents and tools as Space repositories, making it easy to collaborate and reuse agent configurations.

Use it for

  • Build a multi-step research agent that searches the web, extracts information, and synthesizes answers without manual orchestration.
  • Create a vision-enabled agent that browses websites, clicks elements, and extracts product details or prices from e-commerce sites.
  • Share reusable agents and tool collections on Hugging Face Hub for team collaboration and instant deployment.
  • Run agents locally with transformers or connect to any LLM provider (OpenAI, Anthropic, Together AI) by changing one configuration.
  • Orchestrate complex workflows where agents coordinate with other agents or call specialized tools from MCP servers.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you want to build code-writing agents with minimal boilerplate and flexibility across LLM providers.

The low install friction, active maintenance, and zero known vulnerabilities make it safe to try. The young release history (first release 2024-12-27) means the API may evolve, but the design is intentionally minimal. Start with the quick demo to verify it fits your use case.

Install

smolagents on PyPI

Before you install

Low install friction with a pure-Python wheel and six common runtime dependencies. Active maintenance with a recent release (77 days ago), though the project is young (first release 2024-12-27).

Requires Python >= 3.10. Sandboxed execution backends (Blaxel, E2B, Modal, Docker) may require additional setup or API keys.

Quickstart

pip install 'smolagents[toolkit]'

from smolagents import CodeAgent, WebSearchTool, InferenceClientModel

model = InferenceClientModel()
agent = CodeAgent(tools=[WebSearchTool()], model=model)
agent.run("How many seconds would it take for a leopard at full speed to run through Pont des Arts?")

Verify before relying

  • Whether the sandboxed execution backends (Blaxel, E2B, Modal, Docker) are included or require separate installation.
  • Performance characteristics and latency for typical multi-step agent workflows.
  • Whether the library's ~1,000 lines of code claim remains accurate at version 1.26.0.

Package facts

LicenseNot declared unclear
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
6 packages
huggingface-hubrequestsrichjinja2pillowpython-dotenv
MaintenanceActively maintained 77 days since the last release
First released
Downloads626,778 / month, #5,687 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14

Evidence: smolagents-1.26.0-py3-none-any.whl

Tags

Capabilities
code-writing agentsLLM agent frameworktool-calling agentsmulti-step AI orchestrationsandboxed agent executionhuggingface agent libraryReAct agents with code
Topics
agent-frameworkllm-orchestrationcode-execution

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “code-writing agents”

Give your agent the search over MCP, or paste the wish link into any chat.

More Artificial Intelligence packages

litellm With conditions
PyPI · Artificial Intelligence · released Aug 2026

LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.

Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.

MITcompiled wheel
682.8Mdownloads / mo
huggingface-hub Worth it
PyPI · Artificial Intelligence · released Aug 2026

Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.

Install it if you work with Hugging Face Hub models or datasets.

Apache-2.0pure Python · 3.10.0+
442.4Mdownloads / mo
langchain Worth it
PyPI · Python Modules · released Aug 2026

LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.

MITpure Python
315.4Mdownloads / mo
hf-xet With conditions
PyPI · Artificial Intelligence · released Aug 2026

hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.

Apache-2.0compiled wheel · 3.8+
258.4Mdownloads / mo
tokenizers Worth it
PyPI · Artificial Intelligence · released Apr 2026

Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.

Apache-2.0compiled wheel · 3.10+
222.9Mdownloads / mo
transformers Worth it
PyPI · Artificial Intelligence · released Aug 2026

Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.

Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.

permissive licensepure Python · 3.10.0+
186.6Mdownloads / mo

See also openai-agents · mcpadapt · strands-agents · praisonaiagents · agentops · agent-framework-core · agentscope · qwen-agent · baml-py · stirrup

Further reading