v1.20.0
huggingface/smolagentsv1.20.0Jul 10, 2025by albertvillanova
AI Summary
Introduces remote execution capabilities via WasmExecutor and adds rate limiting to tools. It also enhances agent output formatting with CodeOutput and improves callback support.
Key Highlights
- Implemented remote Python WasmExecutor
- Added rate limiting to API models, ApiWebSearchTool, and DuckDuckGoSearchTool
- Implemented CodeOutput as an analog to ToolOutput
- Enhanced callback support for planning steps
New Features
- Remote WasmExecutor
- Rate limiting
- CodeOutput
- Callbacks
Full Release Notes
## New Features ✨ * **Remote Execution**: * Implement remote Python WasmExecutor by @albertvillanova in https://github.com/huggingface/smolagents/pull/1261 * **Callbacks**: * Support callbacks after planning step by @albertvillanova in https://github.com/huggingface/smolagents/pull/1445 * Support multiple callbacks per step type in step_callbacks dict by @albertvillanova in https://github.com/huggingface/smolagents/pull/1517 ## Enhancements 🛠️ * **Models**: * Implement rate limiting in all API models by @albertvillanova in https://github.com/huggingface/smolagents/pull/1516 * **Tools**: * Implement exception mechanism for final answer in remote executors by @tobiasofsn in https://github.com/huggingface/smolagents/pull/1429 * Set default api_key_name in ApiWebSearchTool by @albertvillanova in https://github.com/huggingface/smolagents/pull/1507 * Implement rate limit mechanism in ApiWebSearchTool by @albertvillanova in https://github.com/huggingface/smolagents/pull/1508 * Implement rate limit mechanism in DuckDuckGoSearchTool by @albertvillanova in https://github.com/huggingface/smolagents/pull/1515 * Enable image output for Tool.from_space by @aymeric-roucher in https://github.com/huggingface/smolagents/pull/1510 * Add adapter_kwargs parameter to MCPClient by @LucasDltg in https://github.com/huggingface/smolagents/pull/1528 * **Validation of Tool Arguments**: * Support multiple types in tool arguments validation by @duguyue100 in https://github.com/huggingface/smolagents/pull/1505 * Fix input type validation when input schema has multiple types by @duguyue100 in https://github.com/huggingface/smolagents/pull/1530 * Fix optional args toolcalling by @aymeric-roucher in https://github.com/huggingface/smolagents/pull/1538 * **Agent Output Formatting**: * Implement CodeOutput as analog to ToolOutput by @albertvillanova in https://github.com/huggingface/smolagents/pull/1496 * Allow markdown or custom formatting for code blocks by @aymeric-roucher in https://github.com/huggingface/smolagents/pull/1493 * **Other**: * Add ApiWebSearchTool to __all__ list by @albertvillanova in https://github.com/huggingface/smolagents/pull/1492 * Enforced type annotations in `ChatMessage` via `MessageRole` enum by @daavoo in https://github.com/huggingface/smolagents/pull/1479 * Check authorized imports in LocalPythonExecutor constructor by @jank in https://github.com/huggingface/smolagents/pull/265 ## Bug Fixes 🐛 * Fix `KeyError` when agent reaches max steps with image input by @robin-ede in https://github.com/huggingface/smolagents/pull/1525 * Fix when `response.usage` is `None` for some OpenRouter models by @sentienthouseplant in https://github.com/huggingface/smolagents/pull/1402 * Fix incorrect token counting in streaming TransformersModel by @albertvillanova in https://github.com/huggingface/smolagents/pull/1503 * Minor fix nested quotes that prevent execution by @vinoo-ganesh-keru in https://github.com/huggingface/smolagents/pull/1497 * Fix ChatMessage attribute access after replacing dict with dataclass by @albertvillanova in https://github.com/huggingface/smolagents/pull/1534 * Fix access of `content` field in `ChatMessage` by @mdr223 in https://github.com/huggingface/smolagents/pull/1533 * Fix parallel final answers handling by @aymeric-roucher in https://github.com/huggingface/smolagents/pull/1482 ## Documentation Improvements 📚 * **Examples & Tutorials**: * Add complete Plan Customization example by @albertvillanova in https://github.com/huggingface/smolagents/pull/1506 * Add Async App with Agent example by @albertvillanova in https://github.com/huggingface/smolagents/pull/1509 * Improve Plan Customization example with Human-in-the-Loop by @albertvillanova in https://github.com/huggingface/smolagents/pull/1513 * **API References**: * Fix docstring of WikipediaSearchTool by @albertvillanova in https://github.com/huggingface/smolagents/pull/1521 * Explain rate_limit in tools docstrings by @albertvillanova in https://github.com/huggingface/smolagents/pull/1519 * Fix Examples in AmazonBedrockServerModel docstring by @albertvillanova in https://github.com/huggingface/smolagents/pull/1522 * Split Built-in Tools from Tools in Reference docs by @albertvillanova in https://github.com/huggingface/smolagents/pull/1520 * **Other**: * Update Langfuse tracing documentation to SDK v3 by @jannikmaierhoefer in https://github.com/huggingface/smolagents/pull/1447 * Fix use of context manager agent in docs by @albertvillanova in https://github.com/huggingface/smolagents/pull/1502 ## Maintenance 🏗️ * Fix CI LiteLLM test_call_different_providers_without_key by @albertvillanova in https://github.com/huggingface/smolagents/pull/1527 * Fix test_send_tools_with_default_wikipedia_search_tool by @albertvillanova in https://github.com/huggingface/smolagents/pull/1494 * Fix DockerExecutor tests with final_answer by calling send_tools by @albertvillanova in https://github.com/huggingface/smolagents/pull/1495 * Bump dev version: v1.20.0.dev0 by @albertvillanova in https://github.com/huggingface/smolagents/pull/1477 ## New Contributors * @sentienthouseplant made their first contribution in https://github.com/huggingface/smolagents/pull/1402 * @daavoo made their first contribution in https://github.com/huggingface/smolagents/pull/1479 * @duguyue100 made their first contribution in https://github.com/huggingface/smolagents/pull/1505 * @vinoo-ganesh-keru made their first contribution in https://github.com/huggingface/smolagents/pull/1497 * @robin-ede made their first contribution in https://github.com/huggingface/smolagents/pull/1525 * @LucasDltg made their first contribution in https://github.com/huggingface/smolagents/pull/1528 * @mdr223 made their first contribution in https://github.com/huggingface/smolagents/pull/1533 **Full Changelog**: https://github.com/huggingface/smolagents/compare/v1.19.0...v1.20.0