
smolagentsHugging Face's minimalistische Python-bibliotheek voor het bouwen van code-first AI-agenten in een paar regels
Overzicht
Belangrijkste functies
- CodeAgent die Python schrijft en uitvoert om taken op te lossen
- Ondersteuning voor Hugging Face, OpenAI, Anthropic en lokale modellen
- Veilig uitgevoerde code met E2B en Docker-backends
- Tool-integratie met Hub, LangChain en aangepaste Python-functies
- Ingebouwde ToolCallingAgent voor traditioneel JSON-stijl gereedschapgebruik
- Lightweight, ontwerp met minimale afhankelijkheden
Prijs
- Model
- Free
- Categorie
- Frameworks voor AI-Agents
- Beoordeling
- 5.0 / 5 (4)
Toepassingen
Bouw code-first AI-agenten snel
Ontwikkelaars kunnen agenten maken die taken oplossen door Python-code te schrijven en uit te voeren, waardoor het aantal LLM-stappen wordt verminderd in vergelijking met JSON-tool-oproepen.
Voer agenten uit met elke LLM-leverancier
Prototype agenten met Hugging Face Hub-modellen, lokale inferentieservers of APIs zoals OpenAI en Anthropic zonder het framework te wijzigen.
Voer gegenereerde code veilig uit
Gebruik E2B of Docker-sandbox-backends om door agenten gegenereerde Python uit te voeren in geïsoleerde omgevingen, waardoor beveiligingsrisico's tijdens automatische taakuitvoering worden beperkt.
Integreer bestaande tool-ecosystemen
Combineer aangepaste Python-functies met Hub Spaces en LangChain-tools om agent-mogelijkheden uit te breiden terwijl een minimale, leesbare codebasis behouden blijft.
Pluspunten & minpunten
Pluspunten
- Zeer kleine, leesbare codebasis die gemakkelijk uit te breiden is
- Code-gebaseerde acties verminderen stappen en verhogen agent-expressiviteit
- Werkt met veel LLM-leveranciers en lokale modellen
- Veilig uitgevoerde code via E2B of Docker voor veiliger code-uitvoering
- Gratis en volledig open source
Minpunten
- Vereist Python-kennis om effectief te gebruiken
- Minder ingebouwde integraties dan grotere agentframeworks
- Code-uitvoering introduceert beveiligingsoverwegingen om te beheren
- Minder geschikt voor complexe multi-agent-orkestratie out of the box
Recensies
Gemiddelde van 4 beoordelingen.
Log in om een review te schrijven.
Use it every day
Honestly didn't expect to like it this much. Tool integration with Hub, LangChain, and custom Python functions is exactly what I needed, and code-based actions reduce steps and boost agent expressiveness. I do wish requires Python knowledge to use effectively, but I reach for it almost every day now and it just clicks.
Does the job
Pretty happy overall. Tool integration with Hub, LangChain, and custom Python functions just works and very small, readable codebase that is easy to extend. Code execution introduces security considerations to manage can be annoying, but no dealbreakers — I'd recommend it to a friend without hesitating.
Does the job
Pretty happy overall. Sandboxed code execution with E2B and Docker backends just works and sandboxed execution via E2B or Docker for safer code running. but no dealbreakers — I'd recommend it to a friend without hesitating.
Skeptical, then convinced
I went in skeptical — most tools in this space overpromise. It actually delivers on codeAgent that writes and executes Python to solve tasks, and code-based actions reduce steps and boost agent expressiveness caught me off guard. still, I'd recommend giving it a real trial.
Vragen
How strong are open models for agentic workflows?
We've created CodeAgent instances with some leading models, and compared them on this benchmark that gathers questions from a few different benchmarks to propose a varied blend of challenges. Find the benchmarking code here for more detail on the agentic setup used, and see a comparison of using LLMs code agents compared to vanilla (spoilers: code agents works better). This comparison shows that open-source models can now take on the best closed models!
Asked by Diego Fernández · Feb 16, 2026
How smol is this library?
We strived to keep abstractions to a strict minimum: the main code in agents.py has <1,000 lines of code. Still, we implement several types of agents: CodeAgent writes its actions as Python code snippets, and the more classic ToolCallingAgent leverages built-in tool calling methods. We also have multi-agent hierarchies, import from tool collections, remote code execution, vision models... By the way, why use a framework at all? Well, because a big part of this stuff is non-trivial. For instance, the code agent has to keep a consistent format for code throughout its system prompt, its parser, the execution. So our framework handles this complexity for you. But of course we still encourage you to hack into the source code and use only the bits that you need, to the exclusion of everything else!
Asked by Ludovic Girard · Nov 27, 2025
How do Code agents work?
Our CodeAgent works mostly like classical ReAct agents - the exception being that the LLM engine writes its actions as Python code snippets. Actions are now Python code snippets. Hence, tool calls will be performed as Python function calls. For instance, here is how the agent can perform web search over several websites in one single action: Writing actions as code snippets is demonstrated to work better than the current industry practice of letting the LLM output a dictionary of the tools it wants to call: uses 30% fewer steps (thus 30% fewer LLM calls) and reaches higher performance on difficult benchmarks. Head to our high-level intro to agents to learn more on that. Since code execution can be a serious security concern (arbitrary code execution!), you should run agent code in a sandbox. We support several options: E2B, Blaxel, Modal — managed cloud sandboxes, simplest to set up Docker — self-hosted container isolation The built-in LocalPythonExecutor is not a security sandbox. It applies some restrictions but can be bypassed and must not be used as a security boundary. Alongside CodeAgent, we also provide the standard ToolCallingAgent which writes actions as JSON/text blobs. You can pick whichever style best suits your use case.
Asked by Greta Nowak · Oct 31, 2025
Stel een vraag
Alternatieven voor Frameworks voor AI-Agents
Mini LLM Flow
Frameworks voor AI-Agents
Minimalistische 100-regels LLM-framework voor het bouwen van zelfprogrammerende agent-workflows
upsonicAI
Frameworks voor AI-Agents
Open-source agent framework for building task-focused digital workers and vertical AI agents.
AI-Powered RAG Workflow for n8n
Frameworks voor AI-Agents
Stel vragen en krijg antwoorden gebaseerd op je Google Drive-bestanden met behulp van n8n.
ControlFlow
Frameworks voor AI-Agents
Python-framework voor het bouwen van agentische AI-workflows met een taakgerichte aanpak.
roboneo art
Frameworks voor AI-Agents
AI-beeldgenerator die tekstprompts in seconden omzet in hoogwaardige afbeeldingen.
Agent Genesis
Frameworks voor AI-Agents
Open source, copy‑paste code snippets voor snelle ontwikkeling van AI‑agents.
Eclat Institute
Frameworks voor AI-Agents
IP‑ en JC‑onderwijs gericht op het opbouwen van blijvende vakkennis
Remove Watermark
Frameworks voor AI-Agents
Gratis AI-tool voor direct verwijderen van watermerken en logo's uit foto's
Trending now
Reducto AI
Platformen voor ontwikkeling van AI Agents
Document intelligence-API die pdf's, Presentaties en spreadsheets analyseert, splijt en extraheren van complexe gestructureerde gegevens.
AdCrier
Marketing & Adverteren
Gesponsorde antwoorden, betaald per klik.
Biology AI
Onderwijs AI
Nauwkeurige Huiswerkhulp met Volledige Uitleg
Pin AI
Werkstroom automatisering
AI-recruiter die sourcing, screening en outreach automatiseert om het inhuren te versnellen.












