
smolagentsHugging Faceの最小限のPythonライブラリであり、コードで前提のAIエージェントを短く簡単に作成する
概要
主な機能
- CodeAgentによって、タスクを解決するためにPythonコードを書き出して動作させる
- サポートのHugging Face、OpenAI、Anthropic、ローカルモデル
- E2BやDockerのバックエンドを使ったsandboxedコードエグゼキューション
- HUB、LangChain、カスタムPython関数とのツール組込み
- Built-inのToolCallingAgentに伝統的なJSONスタイルツール使用用
- 軽量で依存関係の最小限の設計
料金
- モデル
- Free
- カテゴリー
- アジェナルバームンーグル
- 評価
- 5.0 / 5 (4)
ユースケース
コードで前提のAIエージェントを短く簡単に作成
開発者はタスクの解決をPythonコードによって書き出すか、Pythonに動作させることで、LLMのステップ数が減るJSONツールコールのアプローチよりもエージェントを作成する
任意のLLMプロバイダーでエージェントを実行
Hugging Face Hubモデルの開発者、ローカルインフルエンスサーバー、OpenAIやAnthropicのAPIを使用してエージェントをプロトタイピングすることなく、そのフレームワークを変更することなく
安全に生成されたコードを実行
E2BまたはDocker sandboxバックエンドを使用してエクササイズ時における安全にコードを実行し、セキュリティリスクを軽減する
既存のツールエコシステムの組込み
最小限のコードベースのまま、HUBスペースやLangChainツールと組み合わせてカスタムのPython関数を使ってエージェントの機能を拡張することによって
メリット & デメリット
メリット
- 非常に小さく読みやすいコードベースで拡張が簡単
- コードベースアクションによってステップ数が少なくなってエクササイズが向上する
- 多くのLLMプロバイダーとローカルモデルに対応
- sandboxedエグゼキューションにより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.
Q&A
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
アジェナルバームンーグル
最適 sized LLM フレームワークを使用して自律的プログラムを含むフローの作成
upsonicAI
アジェナルバームンーグル
オープンソースエージェントフレームワーク: タスクにフォーカスしたデジタルワーカーと垂直AIエージェントビルドのため
AI-Powered RAG Workflow for n8n
アジェナルバームンーグル
Google Driveファイルに含まれている情報に基づいて、質問に対して回答を受け取ることができる
ControlFlow
アジェナルバームンーグル
Pythonで構築するエージェントAIワークフローのフレームワーク
roboneo art
アジェナルバームンーグル
テキスト入力を元に、高品質の画像を僅か数秒で生成します。
Agent Genesis
アジェナルバームンーグル
オープンソースによるクイックなAIエージェント構築コードスニペット
Eclat Institute
アジェナルバームンーグル
IPとJC学業に特長を持った最終的な科目マスターの構築にフォーカス
Remove Watermark
アジェナルバームンーグル
無料のAIツールで写真に附帯印象などの水印とロゴを即時でなくす












