
smolagentsМінімалістична бібліотека Python від Hugging Face для створення AI‑агентів через код за кількома рядками
Огляд
Ключові функції
- CodeAgent, що пише та виконує Python для вирішення завдань
- Підтримка Hugging Face, OpenAI, Anthropic та локальних моделей
- Виконання коду у песочниці з E2B та Docker
- Інтеграція інструментів з Hub, LangChain та власними Python‑функціями
- Вбудований ToolCallingAgent для традиційного використання інструментів у стилі JSON
- Легка конструкція без зайвих залежностей
Ціни
- Модель
- Free
- Категорія
- Фреймворки інтелектуальних агентів
- Рейтинг
- 5.0 / 5 (4)
Кейси використання
Швидке створення AI‑агентів, орієнтованих на код
Розробники можуть створювати агентів, що вирішують завдання, написуючи і виконуючи Python‑код, що зменшує кількість кроків LLM у порівнянні з підходами з викликом інструментів JSON.
Запуск агентів з будь-яким провайдером LLM
Прототипуйте агентів, використовуючи моделі Hugging Face Hub, локальні сервери інференсу або API, такі як OpenAI і Anthropic, не змінюючи фреймворк.
Безпечне виконання згенерованого коду
Використовуйте бекенди песочниці E2B або Docker для запуску Python‑коду, згенерованого агентом, у ізольованих середовищах, що зменшує ризики безпеки під час автоматизованого виконання завдань.
Інтеграція існуючих екосистем інструментів
Об'єднуйте власні Python‑функції з Hub Spaces та інструментами LangChain, щоб розширити можливості агента, зберігаючи мінімальний, читабельний код.
Плюси і мінуси
Плюси
- Надзвичайно маленька, читабельна кодова база, яка легко розширюється
- Дії на основі коду зменшують кількість кроків і підвищують виразність агента
- Працює з багатьма провайдерами LLM та локальними моделями
- Виконання у песочниці через E2B або Docker для безпечнішого запуску коду
- Безкоштовно і повністю відкритий код
Мінуси
- Вимагає знань Python для ефективного використання
- Менше вбудованих інтеграцій порівняно з більш великими фреймворками агентів
- Виконання коду створює питання безпеки, які потрібно керувати
- Менш підходить для складної многоагентної оркестрації «з коробки»
Відгуки
Середнє з 4 оцінок.
Увійди, щоб залишити відгук.
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.
Питання
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
Постав питання
Альтернативи Фреймворки інтелектуальних агентів
Mini LLM Flow
Фреймворки інтелектуальних агентів
Мінімалістична структура LLM на 100 рядків для побудови робочих процесів агентів із само програмуванням
upsonicAI
Фреймворки інтелектуальних агентів
Фреймворк відкритого коду для побудови цифрових працівників, орієнтованих на конкретні задачі, та вертикальних AI‑агентів.
AI-Powered RAG Workflow for n8n
Фреймворки інтелектуальних агентів
Питайте питання та отримуйте відповіді, ґрунтуючись на файлах вашого Google Drive за допомогою n8n.
ControlFlow
Фреймворки інтелектуальних агентів
Фреймворк Пайтон для створення агенційованих потоків AI із завдання-орієнтованою розробкою.
roboneo art
Фреймворки інтелектуальних агентів
Генератор AI-арту, який перетворює текстові запити у високоякісні зображення за кілька секунд.
Agent Genesis
Фреймворки інтелектуальних агентів
Відкритий код, швидкі сегменти для швидкої розробки агентів AI.
Eclat Institute
Фреймворки інтелектуальних агентів
Курсове навчання IP та JC з фокусом на побудові довгострокового володіння предметом
Remove Watermark
Фреймворки інтелектуальних агентів
Безкоштовний інструмент AI для миттєвого видалення водяних знаків і логотипів з фотографій
Trending now
Reducto AI
Платформи розробки штучного інтелекту та агентів
API розумного документу, що парсить, розділяє, виконує OCR і видобуває структуру даних з комплексних PDF, презентацій та електронних таблиць.
AdCrier
Ринок реклами та маркетингу
Спонсорські відповіді за гроші за клік
Biology AI
Освітня технологія AI
Довірена Поміч із Поясненнями по Біології
Pin AI
Автоматизація робочих завдань
Agentic AI рекрутер, що автоматизує пошук, відбір та комунікацію, прискорюючи найм.












