smolagents

Active
GitHub Python Apache-2.0

Description

smolagents is a lightweight agent framework from Hugging Face for quickly building tool-using LLM agents.

Key Features

  • Code-generating agent — CodeAgent writes and executes Python code directly as tool calls, not JSON
  • Sandboxed execution — Secure code running via Blaxel, E2B, Modal, Docker sandboxes
  • Hub integration — One-click share/pull agents and tools from Hugging Face Hub
  • Model-agnostic architecture — Supports 100+ models including transformers, Ollama, OpenAI, Anthropic
  • Multi-modal support — Agents handle text, vision, video, and audio inputs
  • CLI tools — smolagent and webagent commands to run agents directly from terminal

Use Cases

💡 Quickly build automated data analysis agents that write and execute code
💡 Share custom agent tools via Hub for team member reuse
💡 Build multi-modal agents for image understanding and video content analysis tasks
💡 Connect external services via MCP tool servers to extend agent capabilities

Strengths & Limitations

Strengths

  • Actively maintained, recent updates
  • High community interest (28.8k stars)
  • Permissive open-source license (Apache-2.0)

Quick Start

pip install "smolagents[toolkit]"

```python
from smolagents import CodeAgent, WebSearchTool, InferenceClientModel

model = InferenceClientModel()
agent = CodeAgent(tools=[WebSearchTool()], model=model, stream_outputs=True)

agent.run("How many seconds would it take for a leopard at full speed to run through Pont des Arts?")
```

Related Projects

XAgent

8.5k · Python
Active A

An autonomous LLM agent framework for complex task solving with automatic task decomposition, tool usage, and multi-step reasoning from the OpenBMB team

task-decompositionautonomous-agenttool-use +3
  • · Autonomous task decomposition and planning: Planner automatically breaks complex tasks into subtasks with execution milestones
  • · Secure sandbox execution: all operations run inside Docker containers for environment isolation and safety
  • · Extensible tool set: ToolServer provides file editing, Python Notebook, web browser, shell, and Rapid API tools

Atomic Agents

6.2k · Python
Active A+

Atomic Agents is a modular AI agent building framework with an atomic design philosophy, providing composable components including tools, pipelines, and memory management for constructing agent systems.

frameworkpythonagent +2
  • · Atomic design philosophy with single-purpose, reusable, composable components
  • · Built on Instructor and Pydantic for type-safe, predictable agent behavior
  • · Multi-provider support including OpenAI, Anthropic, Groq, Gemini, and more

AutoChain

1.9k · Python
Stale C

AutoChain is a lightweight, extensible, and testable LLM Agent framework by Forethought, providing clean abstractions for agent building with automatic tool selection, conversation history management, and automated testing workflows.

frameworkagentpython +3
  • · Lightweight and extensible generative agent pipeline with minimal abstraction layers
  • · Support for custom tools and OpenAI function calling with automatic spec conversion
  • · Simple memory tracking for conversation history and tool outputs with BufferMemory

Awesome LLM Skills

1.5k · Python
Normal C

A curated list of awesome LLM and AI Agent Skills, resources and tools for customising AI Agent workflows. Works with Claude Code, Codex, Gemini CLI and custom agents.

agenttoolsmcp +2
  • · Curated collection of LLM skills for Claude Code, Codex, Gemini CLI, and more
  • · Covers document processing (docx, pdf, pptx, xlsx), development tools, and research workflows
  • · Cross-platform compatibility with Anthropic, OpenAI, Google, and Alibaba AI tools

Related Articles