v1.7.0
huggingface/smolagentsv1.7.0Jan 31, 2025by albertvillanova
AI Summary
The platform gains CLI support for direct agent execution and introduces a memory system that enables replay functionality and improved code execution logging.
Key Highlights
- CLI commands (`smolagent` and `webagent`)
- Memory system with `replay()` function
- Improved code execution logs
- Benchmarking updates
New Features
- CLI integration
- Memory attribute
- Replay functionality
Full Release Notes
## Main changes
### Added commands to directly run agents from CLI: `smolagent` and `webagent` ✨
* Make web browser agent example a CLI script by @merveenoyan in https://github.com/huggingface/smolagents/pull/416
* Add CLI for smolagents by @aymeric-roucher in https://github.com/huggingface/smolagents/pull/431
- Now you can run `smolagent "Your task!"` from CLI to directly call a smolagent. Try it! `webagent "Find me a cheap train from Paris to Torino before Thursday"` or `smolagent "Who's the current director of La French Tech?"`
### Gave a `memory` to agents! 🧠
* Untangling Logging by @clefourrier in https://github.com/huggingface/smolagents/pull/316
* Test memory by @albertvillanova in https://github.com/huggingface/smolagents/pull/428
- This added a specific `memory` attribute to the agent!
- We used this change to introduce nice functions like an `agent.replay()` function that replays the last run (based on the memories stored, so no further LLM calls)
### Other big improvements 💪
* Improve code execution logs in case of error by showing print outputs by @aymeric-roucher in https://github.com/huggingface/smolagents/pull/446
- This makes sure that code execution outputs are stored to memory even when an error was raised later on. It should slightly improve the performance of `CodeAgents`
* Update benchmark with Hub datasets by @albertvillanova in https://github.com/huggingface/smolagents/pull/412
- This adds storing of benchmarking outputs directly to the Hub. Moving forward, we'll make benchmarking even easier!
### Fixes and small improvements
* Bump dev version: v1.7.0.dev0 by @albertvillanova in https://github.com/huggingface/smolagents/pull/390
* Fix return type of generator function in `Agent._run()` by @abidlabs in https://github.com/huggingface/smolagents/pull/409
* Update minimum Gradio version by @abidlabs in https://github.com/huggingface/smolagents/pull/408
* Support third-party Inference providers in `HfApiModel` by @julien-c in https://github.com/huggingface/smolagents/pull/422
* Minor fix for agent_from_any_llm.py example by @RolandJAAI in https://github.com/huggingface/smolagents/pull/423
* Fix `vlm_web_browser.py` example by @abidlabs in https://github.com/huggingface/smolagents/pull/410
* Fix regressions, refactor logging and improve replay function by @aymeric-roucher in https://github.com/huggingface/smolagents/pull/419
* Fix installation instruction for GradioUI in error message by @jank in https://github.com/huggingface/smolagents/pull/418
* Fix import from deleted logger module by @albertvillanova in https://github.com/huggingface/smolagents/pull/433
* Add web search tool and make prompt positional arg by @aymeric-roucher in https://github.com/huggingface/smolagents/pull/435
* Remove explicit model arg in HfApiModel - which wouldn't run without Pro by @sanjeed5 in https://github.com/huggingface/smolagents/pull/373
* Fix MultiStepAgent.planning_step message content by @albertvillanova in https://github.com/huggingface/smolagents/pull/437
* Fix and test MemoryStep by @albertvillanova in https://github.com/huggingface/smolagents/pull/432
* Fix get safe module by @antoinejeannot in https://github.com/huggingface/smolagents/pull/405
* Remove duplicate final_memory_step creation by @albertvillanova in https://github.com/huggingface/smolagents/pull/444
* Remove unused ChatMessageToolCall raw argument by @albertvillanova in https://github.com/huggingface/smolagents/pull/445
* Fix TransformersModel docstring by @August-murr in https://github.com/huggingface/smolagents/pull/447
* Test get_clean_message_list by @albertvillanova in https://github.com/huggingface/smolagents/pull/448
* Add web browser example to doc by @aymeric-roucher in https://github.com/huggingface/smolagents/pull/439
* Fix minor issue in e2b by @keetrap in https://github.com/huggingface/smolagents/pull/436
## New Contributors
* @abidlabs made their first contribution in https://github.com/huggingface/smolagents/pull/409
* @julien-c made their first contribution in https://github.com/huggingface/smolagents/pull/422
* @August-murr made their first contribution in https://github.com/huggingface/smolagents/pull/447
**Full Changelog**: https://github.com/huggingface/smolagents/compare/v1.6.0...v1.7.0