{"slug": "smolagents", "name": "smolagents", "category": "dev-libs", "category_name": "Libraries and frameworks", "description": "", "recommenders": 4, "commenters": 9, "warners": 0, "score": 4.471, "rising": -1.31, "first": "2025-11-22", "latest": "2026-09-11", "why": "smolagents by Hugging Face tackles your issues with MCP tools.", "why_is_quote": true, "has_verdict": false, "sentiment": {"recommend": 3, "neutral": 5, "compare": 1, "warn": 0}, "spark": [2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "listed": true, "loved": [], "caveat": "", "short_quote": "smolagents by Hugging Face tackles your issues with MCP tools.", "kind": "", "icon": false, "domain": null, "github_repo": "github.com/huggingface/smolagents", "official_url": "https://huggingface.co/docs/smolagents", "pricing": "", "aliases": ["smolagents", "Smolagents"], "verdict": null, "praise": [{"label": "", "summary": "", "quotes": [{"id": 739367120, "item_id": 46210445, "url": "https://news.ycombinator.com/item?id=46210445", "by": "gzalo", "date": "2025-12-09", "version": null, "stance": "recommend", "quote": "Something like https://github.com/huggingface/smolagents", "excerpt": "Something like https://github.com/huggingface/smolagents Needs a sandbox, otherwise blindly executing generated code is not acceptable", "context": "", "use_case": "", "switched_from": "", "story": "Donating the Model Context Protocol and establishing the Agentic AI Foundation"}, {"id": 736655489, "item_id": 46040968, "url": "https://news.ycombinator.com/item?id=46040968", "by": "sbinnee", "date": "2025-11-24", "version": null, "stance": "recommend", "quote": "programmatic tool calling (smolagents.CodeAgent by HF)", "excerpt": "As much as I am excited by the price, the tools they called \"the advanced tool\"[1] look so useful to me; Tool search, programmatic tool calling (smolagents.CodeAgent by HF), and tool use examples (in-context learning). They said that they have seen 134K tokens for tool definition alone. That is insane. I also really liked the puzzle game video. [1] https://www.anthropic.com/engineering/advanced-tool-use", "context": "", "use_case": "", "switched_from": "", "story": "Claude Opus 4.5"}, {"id": 736635808, "item_id": 46039738, "url": "https://news.ycombinator.com/item?id=46039738", "by": "menix", "date": "2025-11-24", "version": null, "stance": "recommend", "quote": "smolagents by Hugging Face tackles your issues with MCP tools.", "excerpt": "smolagents by Hugging Face tackles your issues with MCP tools. They added support for the output schema and structured output provided by the latest MCP spec. This way print and inspect is no longer necessary. https://huggingface.co/blog/llchahn/ai-agents-output-schema", "context": "", "use_case": "Agent tool calling", "switched_from": "", "story": "Claude Advanced Tool Use"}, {"id": 736268544, "item_id": 46016784, "url": "https://news.ycombinator.com/item?id=46016784", "by": "moinism", "date": "2025-11-22", "version": null, "stance": "recommend", "quote": "Dude, it looks great, but I just spent half an hour learning about its 'CodeAgents' feature.", "excerpt": "Dude, it looks great, but I just spent half an hour learning about its 'CodeAgents' feature. Which essentially is 'actions written as code'. This idea has been floating around in my head, but it wasn't refined enough to implement. It's so wild that what you're thinking of may have already been done by someone else on the internet. https://huggingface.co/docs/smolagents/conceptual_guides/intro_agents#code-agents For t", "context": "", "use_case": "", "switched_from": "", "story": "Agent design is still hard"}]}], "caveats": [], "who": [], "tags": [], "use_cases": ["code-based tool calls", "agent framework learning", "agent tool calling"], "compared": [], "makers": [], "threads": [{"url": "https://news.ycombinator.com/item?id=46038047", "title": "Claude Advanced Tool Use", "mentions": 3}, {"url": "https://news.ycombinator.com/item?id=46524178", "title": "Making Tool Calling 75% More Efficient via Code", "mentions": 2}, {"url": "https://news.ycombinator.com/item?id=49654229", "title": "Astra for Coding: Why Are We Doing This Again?", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=49243397", "title": "Mistral Patent for \"Code implemented tool calls\"", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=46674416", "title": "The Code-Only Agent", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=46207425", "title": "Donating the Model Context Protocol and establishing the Agentic AI Foundation", "mentions": 1}], "sentiment_by_month": {"2025-11": {"recommend": 2, "neutral": 1}, "2025-12": {"recommend": 1}, "2026-01": {"neutral": 2, "compare": 1}, "2026-02": {}, "2026-03": {}, "2026-04": {}, "2026-05": {}, "2026-06": {}, "2026-07": {}, "2026-08": {"neutral": 1}, "2026-09": {"neutral": 1}, "2026-10": {}}, "versions": [], "version_unnamed": 0, "quotes": [{"id": 794504368, "item_id": 49656523, "url": "https://news.ycombinator.com/item?id=49656523", "by": "amai", "date": "2026-09-11", "version": null, "stance": "neutral", "quote": "The idea to use python code instead of other kinds of tool calls is taken from smolagents", "excerpt": "The idea to use python code instead of other kinds of tool calls is taken from smolagents: https://huggingface.co/blog/smolagents It is based on this paper https://huggingface.co/papers/2402.01030 and calls this idea CodeAct. The paper is actually from Apple: https://machinelearning.apple.com/research/codeact So Astra and Fable seem to take this idea to the extreme causing some unwanted side-effects.", "context": "", "use_case": "", "switched_from": "", "story": "Astra for Coding: Why Are We Doing This Again?"}, {"id": 787910624, "item_id": 49244414, "url": "https://news.ycombinator.com/item?id=49244414", "by": "skeledrew", "date": "2026-08-10", "version": null, "stance": "neutral", "quote": "Isn't that what smolagents[0] has done from the beginning?", "excerpt": "But... why? Isn't that what smolagents[0] has done from the beginning? Also this move is blackening Mistral in my book. [0] https://github.com/huggingface/smolagents", "context": "", "use_case": "code-based tool calls", "switched_from": "", "story": "Mistral Patent for \"Code implemented tool calls\""}, {"id": 746809840, "item_id": 46675615, "url": "https://news.ycombinator.com/item?id=46675615", "by": "alexsmirnov", "date": "2026-01-18", "version": null, "stance": "neutral", "quote": "I did use them, with evaluations.", "excerpt": "This was implemented far ago, at least by huggingface \"smolagents\". https://huggingface.co/docs/smolagents/index . I did use them, with evaluations. For the most cases, modern models tool call outperforms code agent. They just trained to use tools, not a code", "context": "", "use_case": "", "switched_from": "", "story": "The Code-Only Agent"}, {"id": 744394144, "item_id": 46524634, "url": "https://news.ycombinator.com/item?id=46524634", "by": "zekejohn", "date": "2026-01-07", "version": null, "stance": "compare", "quote": "that smolagents prioritizes", "excerpt": "Interesting! First time im seeing this course, thanks for the link. From a high level it\u2019s definitely in the same code first agents family then. After reading about smolagents for a bit i think the main things Codecall adds are TypeScript + generated SDKs, progressive tool discovery (readFile + executeCode instead of exposing every tool directly), and the single script sandboxed execution first flow w/ learned constr", "context": "", "use_case": "", "switched_from": "", "story": "Making Tool Calling 75% More Efficient via Code"}, {"id": 744388464, "item_id": 46524279, "url": "https://news.ycombinator.com/item?id=46524279", "by": "l1am0", "date": "2026-01-07", "version": null, "stance": "neutral", "quote": "This is basically what you learn in the huggingface smolagents course", "excerpt": "This is basically what you learn in the huggingface smolagents course (months ago)... They call it CodeAct https://huggingface.co/learn/agents-course/en/unit2/smolagents/why_use_smolagents", "context": "", "use_case": "Agent framework learning", "switched_from": "", "story": "Making Tool Calling 75% More Efficient via Code"}, {"id": 739367120, "item_id": 46210445, "url": "https://news.ycombinator.com/item?id=46210445", "by": "gzalo", "date": "2025-12-09", "version": null, "stance": "recommend", "quote": "Something like https://github.com/huggingface/smolagents", "excerpt": "Something like https://github.com/huggingface/smolagents Needs a sandbox, otherwise blindly executing generated code is not acceptable", "context": "", "use_case": "", "switched_from": "", "story": "Donating the Model Context Protocol and establishing the Agentic AI Foundation"}, {"id": 736655489, "item_id": 46040968, "url": "https://news.ycombinator.com/item?id=46040968", "by": "sbinnee", "date": "2025-11-24", "version": null, "stance": "recommend", "quote": "programmatic tool calling (smolagents.CodeAgent by HF)", "excerpt": "As much as I am excited by the price, the tools they called \"the advanced tool\"[1] look so useful to me; Tool search, programmatic tool calling (smolagents.CodeAgent by HF), and tool use examples (in-context learning). They said that they have seen 134K tokens for tool definition alone. That is insane. I also really liked the puzzle game video. [1] https://www.anthropic.com/engineering/advanced-tool-use", "context": "", "use_case": "", "switched_from": "", "story": "Claude Opus 4.5"}, {"id": 736635808, "item_id": 46039738, "url": "https://news.ycombinator.com/item?id=46039738", "by": "menix", "date": "2025-11-24", "version": null, "stance": "recommend", "quote": "smolagents by Hugging Face tackles your issues with MCP tools.", "excerpt": "smolagents by Hugging Face tackles your issues with MCP tools. They added support for the output schema and structured output provided by the latest MCP spec. This way print and inspect is no longer necessary. https://huggingface.co/blog/llchahn/ai-agents-output-schema", "context": "", "use_case": "Agent tool calling", "switched_from": "", "story": "Claude Advanced Tool Use"}, {"id": 736628704, "item_id": 46039294, "url": "https://news.ycombinator.com/item?id=46039294", "by": "menix", "date": "2025-11-24", "version": null, "stance": "neutral", "quote": "Smolagents makes use of this and handles tool output as objects", "excerpt": "The latest MCP specifications (2025-06-18+) introduced crucial enhancements like support for Structured Content and the Output Schema. Smolagents makes use of this and handles tool output as objects (e.g. dict). Is this what you are thinking about? Details in a blog post here: https://huggingface.co/blog/llchahn/ai-agents-output-schema", "context": "", "use_case": "", "switched_from": "", "story": "Claude Advanced Tool Use"}, {"id": 736628240, "item_id": 46039265, "url": "https://news.ycombinator.com/item?id=46039265", "by": "menix", "date": "2025-11-24", "version": null, "stance": "neutral", "quote": "was implemented in smolagents for some time", "excerpt": "Wrapping tool calls in code together with using the benefits of the MCP output schema was implemented in smolagents for some time. Think that\u2019s even one step further conceptually. https://huggingface.co/blog/llchahn/ai-agents-output-schema", "context": "", "use_case": "", "switched_from": "", "story": "Claude Advanced Tool Use"}, {"id": 736268544, "item_id": 46016784, "url": "https://news.ycombinator.com/item?id=46016784", "by": "moinism", "date": "2025-11-22", "version": null, "stance": "recommend", "quote": "Dude, it looks great, but I just spent half an hour learning about its 'CodeAgents' feature.", "excerpt": "Dude, it looks great, but I just spent half an hour learning about its 'CodeAgents' feature. Which essentially is 'actions written as code'. This idea has been floating around in my head, but it wasn't refined enough to implement. It's so wild that what you're thinking of may have already been done by someone else on the internet. https://huggingface.co/docs/smolagents/conceptual_guides/intro_agents#code-agents For t", "context": "", "use_case": "", "switched_from": "", "story": "Agent design is still hard"}]}