LibreAI / KI-Agenten / smolagents
// agents · huggingface/smolagents

smolagents

smolagents ist ein Open-Source-Projekt aus der Kategorie KI-Agenten von huggingface (huggingface/smolagents auf GitHub). Es hat 29.927 Sterne auf GitHub und 3.106 Forks, wird unter der Lizenz Apache-2.0 veröffentlicht und wurde zuletzt am 6. Oktober 2026 auf GitHub aktualisiert.

smolagents — Hugging Face's barebones agent library where agents think in code: a CodeAgent that writes its actions as Python, model-agnostic, Apache-2.0

★ 29,9 Tsd. Sterne⑂ 3,1 Tsd. ForksApache-2.0aktualisiert Okt 2026
▦ Visual — das README dieses Projekts enthält keinen einbettbaren Screenshot,
darum hier ein Platzhalter. Die Anleitung unten ist trotzdem vollständig.
// projektdaten

Projektdaten

GitHub-Sterne
29.927
Forks
3.106
Lizenz
Apache-2.0
Zuletzt auf GitHub aktualisiert
6. Oktober 2026
Kategorie
KI-Agenten
Eintragstyp
Vollständige Installationsanleitung
Offizielle Website
Documentation
// so funktioniert es

So funktioniert es

  1. Install the package

    Per the README: pip install "smolagents[toolkit]" for the package with the default tool set.

  2. Pick a model

    Create a model object — InferenceClientModel for Hub inference providers, or a local transformers/Ollama model, or another provider model.

  3. Define and run an agent

    Give a CodeAgent your tools (e.g. WebSearchTool) and the model, then call agent.run() with a task in plain language.

// funktionen

Warum es so beliebt ist

Agents that act in code

CodeAgent writes executable Python actions instead of JSON blobs — plans, loops and tool chaining come naturally and traces stay readable.

Model-agnostic

HF Inference Providers, local transformers/Ollama models and major hosted providers all plug into the same agent code.

Barebones by design

A small, hackable codebase you can actually read end to end — the anti-framework agent library.

Hub-native tools

Tools are Python functions you can share on and pull from the Hugging Face Hub, alongside the bundled toolkit.

Advertisement
// selbst ausführen

Führe es selbst aus

  1. Install

    The README quick install with the default toolkit.

    pip install "smolagents[toolkit]"
  2. First agent

    The README example: a CodeAgent with web search on a Hub model.

    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?")
  3. Go local

    Swap InferenceClientModel for a local transformers or Ollama model class from the docs — the agent code does not change.

    https://huggingface.co/docs/smolagents
// anwendungsfälle

Was du damit bauen kannst

Advertisement
// häufige fragen

Häufige Fragen

Who makes smolagents?

The Hugging Face team (huggingface/smolagents on GitHub).

Is smolagents free?

Yes — Apache-2.0 licensed. Model usage follows whatever provider or local model you plug in.

Why code actions instead of tool calls?

Code is more expressive than one-tool-per-step JSON: the agent can loop, branch, store intermediate results and compose tools in a single action, and the trace reads like a program you can debug. Execution is sandboxed per the library docs — still review what you let it run.

How does it compare to a well-known alternative?

Against LangChain/LangGraph, smolagents is intentionally minimal — far less surface area, no graph DSL, quicker to learn and hack. Against AutoGen or CrewAI, it is a library for building your agent, not a multi-agent role-play system.

How do I get started?

pip install "smolagents[toolkit]", then run the README CodeAgent example with InferenceClientModel and WebSearchTool.

// weiter entdecken

Ähnliche Tools

KI-Agenten

tons-of-skills-marketplace

Model-agnostic marketplace of agent skills with a harness-free canonical layer.

★ 2,8 Tsd. SterneMIT
Anleitung ansehen →
KI-Agenten

hermes-agent

The agent that grows with you — a Python framework for adaptive AI agents.

★ 252,0 Tsd. SterneMIT
Anleitung ansehen →
KI-Agenten

openclaude

A Claude Code-style coding agent that runs anywhere and works with almost any model provider

★ 33,7 Tsd. SterneMIT
Anleitung ansehen →
KI-Agenten

E2B

Secure sandboxes where AI agents run real code.

★ 14,2 Tsd. SterneApache-2.0
Anleitung ansehen →
KI-Agenten

OmAgent

Python library for building multimodal language agents — VLM, video and mobile, fast to prototype and ship

★ 2,7 Tsd. SterneApache-2.0
Anleitung ansehen →
KI-Agenten

CoreCoder

Self-hosted ai agents: minimal ai coding agent (~1,000 lines of python) inspir.

★ 1,8 Tsd. SterneMIT
Anleitung ansehen →
// alternativen

Alternativen im Bereich KI-Agenten

Die anderen Projekte der Kategorie KI-Agenten mit den meisten Sternen im LibreAI-Katalog — die realistische Auswahl, falls smolagents nicht das Richtige ist.

// mehr in agents

Mehr in KI-Agenten

Verwandte Projekte der Kategorie KI-Agenten im Katalog, die smolagents bei den Sternen am nächsten stehen — zum Weiterstöbern auf beiden Seiten.

Hol dir smolagents

Kostenlos und offen — hol dir den Quellcode, gib dem Repository einen Stern und leg los.