huggingface/smolagents

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

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 39 minutes ago
Added to GitGenius on September 1st, 2026
Created on December 5th, 2024
Open Issues & Pull Requests: 789 (+0)
GitHub issues: Enabled
Number of forks: 2,937
Total Stargazers: 29,217 (+0)
Total Subscribers: 140 (+0)

Repository Insights (GitGenius)

Most active contributors

Sign in to see contributor activity.

Related repositories by overlapping contributors

No overlapping-contributor repos identified yet.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Issue API getrepoissuespagesummary failed: 429 Rate limit exceeded. Please try again later.

Detailed Description

smolagents is a library for building and running agents that execute actions by writing code.

The library addresses the challenge of creating autonomous agents that can reason and act by having them generate executable code rather than following predefined action schemas. This approach allows agents to think through problems more flexibly. The tool handles execution securely through optional sandboxed environments provided by services like Blaxel, E2B, Modal, or Docker, making it safe to run agent-generated code. The core implementation is intentionally minimal, with the agent logic contained in approximately one thousand lines of code, keeping abstractions lean and close to raw implementation.

smolagents suits developers building autonomous systems who want a lightweight, code-first agent framework without heavy abstraction layers. It works well for projects requiring flexibility in how agents reason and act, particularly those that benefit from agents writing code to solve problems. The tool is model-agnostic, supporting local models via transformers or ollama, inference providers on the Hugging Face Hub, and commercial APIs from OpenAI and Anthropic through LiteLLM integration. It also handles multimodal inputs including text, vision, video, and audio. The library integrates with the Hugging Face Hub, allowing agents and tools to be shared and discovered as reusable components.

The project maintains a focused scope with minimal dependencies and straightforward abstractions. Development activity shows consistent engagement with documentation and examples, including tutorials for specialized use cases like vision-based web browsing. The codebase emphasizes transparency by keeping core logic readable and compact rather than distributed across numerous abstraction layers.