Ploba logo

Find the right AI tool for the job: apps, agents, APIs, MCP servers and datasets, explained plainly.

Get the AI Digest

Discover

  • Explore
  • Top Charts
  • Categories
  • Agents
  • MCP servers
  • Developer tools

Learn & community

  • Learn AI
  • AI Glossary
  • Blog
  • Hackathons
  • People
  • AI Digest

For makers

  • List your tool
  • Docs
  • Claim a listing
  • Advertise
  • Write for us

Company

  • About
  • Careers
  • Changelog
  • Trust
  • Security
  • Contact

© 2026 Ploba. All rights reserved.

  • Privacy
  • Terms
  • Cookies
  • Advertising
  • All policies
llms.txt
Ploba logo
DiscoverHackathonsPeopleLearnAI Digest
Sign inGet started
HomeTop ChartsExploreCategories
TypesWeb apps1,894Agents585Plugins416APIs376Mobile apps152Datasets85
AdvertisingYour product hereReach people browsing AI tools on Ploba.Advertise hereAdvertisingYour product hereReach people browsing AI tools on Ploba.Advertise here
  1. Explore
  2. /
  3. Developer Tools
  4. /
  5. smolagents
Developer Tools
smolagents icon

smolagents

by Hugging Face

smolagents is a Python library from Hugging Face for building agents that write their actions as code. The core logic fits in roughly 1,000 lines.

API·Free

View on GitHub(opens in a new tab)

About smolagents

Key features of smolagents

  • CodeAgent that writes actions as Python code
  • ToolCallingAgent for JSON or text tool calls
  • Works with local, Hub-hosted and LiteLLM-connected models
  • Tools from MCP servers, LangChain or a Hub Space
  • Text, vision, video and audio inputs
  • Sandboxed execution through Blaxel, E2B, Modal or Docker
  • Share and load agents and tools on the Hugging Face Hub
  • smolagent and webagent command-line tools

Who smolagents is for

  • Python developers building LLM agents
  • Researchers comparing code agents with tool-calling agents
  • Teams that want a small, readable agent framework
  • Developers using open models for agent workflows

How to use smolagents

  1. 1

    Step 1: Install the package with pip install "smolagents[toolkit]".

  2. 2

    Step 2: Create a model object, such as InferenceClientModel, or switch to a LiteLLM, OpenAI-compatible, Transformers, Azure or Bedrock model.

  3. 3

    Step 3: Build a CodeAgent with the tools it needs, for example WebSearchTool.

  4. 4

    Step 4: Call agent.run with your task.

  5. 5

    Step 5: Run untrusted agent code in a sandbox such as E2B, Modal, Blaxel or Docker.

  6. 6

    Step 6: Optionally run the smolagent command for an interactive setup wizard, or share the agent with push_to_hub.

smolagents FAQ

What is a CodeAgent?

It is the library's main agent type. The model writes its actions as Python code snippets, and tool calls are executed as Python function calls.

Which models can I use?

Any LLM. The README lists local transformers and ollama models, providers on the Hub, and models from OpenAI, Anthropic and others through LiteLLM.

Is it safe to run agent code locally?

The README says to run agent code in a sandbox. The built-in LocalPythonExecutor applies some restrictions but is not a security boundary.

Is there a command-line interface?

Yes. The smolagent command runs a multi-step CodeAgent, and webagent runs a web-browsing agent built on helium.

Details

Pricing
Free
Type
API
Platforms
  • CLI
Categories
Developer ToolsAutomation
Added
Sep 16, 2026
Hugging Face iconPublisherHugging Face

Built from public sources

We put this page together from smolagents’s own website and docs so you can compare it with other tools. Ploba isn’t affiliated with smolagents.

Work at smolagents? Claim the listing to manage it yourself.

Something wrong here?

More from Hugging Face

View publisher
Open Deep Research iconOpen Deep ResearchHugging Face · FreeOpen Deep Research is Hugging Face's open-source reproduction of a web-browsing research agent, built in a 24-hour effort. It uses an agent framework that writes its actions as code.Developer Tools · Free

Related tools

See more
E2B iconE2BE2B · Usage-basedE2B gives every AI agent its own isolated cloud machine, a microVM sandbox where it can run code, browse and use tools. It runs in E2B's cloud or in your own AWS, GCP or Azure account.Developer Tools · Usage-basedmachine0 iconmachine0machine0 · Usage-basedmachine0 provides persistent cloud virtual machines built for AI agents, managed through a CLI with JSON output or a remote MCP server. VMs are billed by the minute and can be suspended and resumed.Developer Tools · Usage-basedSemantic Kernel iconSemantic KernelMicrosoft · FreeSemantic Kernel is an AI-focused api for developer tools workflows, giving users practical model-powered capabilities through a dedicated product or developer interface.Developer Tools · Free