Releases: huggingface/smolagents
v1.7.0
Main changes
Added commands to directly run agents from CLI: smolagent
and webagent
✨
- Make web browser agent example a CLI script by @merveenoyan in #416
- Add CLI for smolagents by @aymeric-roucher in #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"
orsmolagent "Who's the current director of La French Tech?"
- Now you can run
Gave a memory
to agents! 🧠
- Untangling Logging by @clefourrier in #316
- Test memory by @albertvillanova in #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)
- This added a specific
Other big improvements 💪
-
Improve code execution logs in case of error by showing print outputs by @aymeric-roucher in #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
- 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
-
Update benchmark with Hub datasets by @albertvillanova in #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 #390
- Fix return type of generator function in
Agent._run()
by @abidlabs in #409 - Update minimum Gradio version by @abidlabs in #408
- Support third-party Inference providers in
HfApiModel
by @julien-c in #422 - Minor fix for agent_from_any_llm.py example by @RolandJAAI in #423
- Fix
vlm_web_browser.py
example by @abidlabs in #410 - Fix regressions, refactor logging and improve replay function by @aymeric-roucher in #419
- Fix installation instruction for GradioUI in error message by @jank in #418
- Fix import from deleted logger module by @albertvillanova in #433
- Add web search tool and make prompt positional arg by @aymeric-roucher in #435
- Remove explicit model arg in HfApiModel - which wouldn't run without Pro by @sanjeed5 in #373
- Fix MultiStepAgent.planning_step message content by @albertvillanova in #437
- Fix and test MemoryStep by @albertvillanova in #432
- Fix get safe module by @antoinejeannot in #405
- Remove duplicate final_memory_step creation by @albertvillanova in #444
- Remove unused ChatMessageToolCall raw argument by @albertvillanova in #445
- Fix TransformersModel docstring by @August-murr in #447
- Test get_clean_message_list by @albertvillanova in #448
- Add web browser example to doc by @aymeric-roucher in #439
- Fix minor issue in e2b by @keetrap in #436
New Contributors
- @abidlabs made their first contribution in #409
- @julien-c made their first contribution in #422
- @August-murr made their first contribution in #447
Full Changelog: v1.6.0...v1.7.0
v1.6.0
What's Changed
- Bump version to 1.6.0.dev by @albertvillanova in #348
- Use transformers as optional dependency by @albertvillanova in #360
- Add pip install datasets to RAG example by @sanjeed5 in #371
- Update issue templates by @aymeric-roucher in #377
- TransformersModel auto-detects VLMs by @aymeric-roucher in #378
- Separate tree for Model docs is added by @touseefahmed96 in #382
- add kwargs to gradio launch by @tocab in #367
- Minor Fix in the example docs by @touseefahmed96 in #383
- Fix Extra planning by @bvantuan in #362
- Gradio chatbot: step duration, number, token count, support nested thoughts by @yvrjsharma in #384
- Gradio Chatbot looks much nicer than before! See below:
- Add Chinese translations for text-to-sql example by @FanwangM in #366
- Add Chinese translations for RAG by @FanwangM in #363
Qwen-2VL
->Qwen2-VL
model name typo fixed by @sergiopaniego in #349- chore: Fix Typo by Calling is_torch_available() in AgentAudio Class by @hironow in #379
- Additional parameters for openai client by @touseefahmed96 in #385
- DuckDuckGoSearchTool: add ddgs_kwargs parameter to constructor by @onukura in #372
- Fix final_answer issue in e2b_executor by @keetrap in #319
- Docs: Text to sql example - minor naming / dedupe by @GrahamTheCoder in #376
- Test import without extras by @albertvillanova in #370
- Add tool saving test by @aymeric-roucher in #389
- Fix blocking of os in authorized imports by @aymeric-roucher in #386
- Add test for DDGS Tool kwargs by @aymeric-roucher in #387
New Contributors
- @tocab made their first contribution in #367
- @bvantuan made their first contribution in #362
- @sergiopaniego made their first contribution in #349
- @hironow made their first contribution in #379
- @onukura made their first contribution in #372
- @GrahamTheCoder made their first contribution in #376
Full Changelog: v1.5.1...v1.6.0
v1.5.1
Bug Fixes 🐛
- Use transformers as optional dependency by @albertvillanova in #360
Full Changelog: v1.5.0...v1.5.1
v1.5.0
What's Changed
New Features 🚀
- Add VLM support by @merveenoyan in #220
Fixes 🐛
- refactor: update model type to ChatMessage in agent classes by @jank in #263
- Fixes AttributeError: 'CodeAgent' object has no attribute 'logger' #258 by @joaopauloschuler in #259
- Improve tool call argument parsing by @aymeric-roucher in #267
- Remove unused and undocumented
test_mode
parameter by @Wauplin in #273 - Fix Bug in from_langchain in tools.py by @RolandJAAI in #268
- Python interpreter: improve suggestions for possible mappings by @aymeric-roucher in #266
- Improve python executor's error logging by @aymeric-roucher in #275
- The use of BASE_PYTHON_TOOLS enables the use of compile, exec and eval by @tandiapa in #274
- Try first dunder method in evaluate_augassign by @albertvillanova in #285
- Add cool GIF of agent run inspection using Phoenix by @aymeric-roucher in #277
- Remove pickle5 package from E2BExecutor by @albertvillanova in #295
- Fuse stream and direct run calls by @clefourrier in #296
- minor fix for console in AgentLogger by @nbroad1881 in #303
- Add Azure OpenAI support by @vladiliescu in #282
- Fix arg passing to AgentExecutionError by @albertvillanova in #309
- refactor(models): restructure model parameter handling by @kingdomad in #227
- Local interpreter security: prevent builtins functions from being used if they have not been added as tools by @tandiapa in #299
- Support any and none tool types by @aymeric-roucher in #280
- Minor fix: adding a 60 seconds timeout to the visit webpage tool by @Killian-pit in #308
- Fix: source code inspection in interactive shells by @antoinejeannot in #281
- Refactor evaluate_augassign and test all operators by @albertvillanova in #313
- Unset temperature in models by @aymeric-roucher in #315
- Fix tool calls with LiteLLM and tool optional types by @aymeric-roucher in #318
- Multiple tool example by @touseefahmed96 in #293
- RAG on your huggingface_doc data using chromadb and groq api by @touseefahmed96 in #235
- Improve static tools initialization safety by @kingdomad in #324
- Append unused error message to memory by @albertvillanova in #325
Documentation and examples 📚
- Fix code examples with additional_args and num_ctx examples also in zh docs by @RolandJAAI in #260
- Update building_good_agents.md by @derekalia in #283
- Update guided_tour.md by @sanjeed5 in #287
- Added Hindi docs for smolagents by @keetrap in #279
- Update README and documentation to clarify Hub integrations with Gradio Spaces by @davidberenstein1957 in #306
- Update README.md fix quick demo code import bug by @Deng-Xian-Sheng in #327
- Add args to MultiStepAgent docstring by @albertvillanova in #332
- Fix MultiStepAgent docstring by @albertvillanova in #336
- Fix docstrings of models by @albertvillanova in #344
- docstring args for ToolCallingAgent, CodeAgent and ManagedAgent by @touseefahmed96 in #335
- Corrected tool examples in ToolCallingAgent system prompts by @RolandJAAI in #341
- Improve inference choice examples by @aymeric-roucher in #311
Maintenance 🏗️
- Add linter rules + apply make style by @Wauplin in #255
- Fix CI quality issue by @albertvillanova in #272
- Bump version to 1.5.0.dev by @aymeric-roucher in #256
- Make import time faster (optional deps + delay imports) by @Wauplin in #253
- Fix CI quality by @albertvillanova in #286
- Add huggingface-hub as required dependency by @albertvillanova in #288
- Make e2b optional dependency by @albertvillanova in #292
- Remove package json files by @albertvillanova in #314
- Update README instructions to run tests by @albertvillanova in #328
- Move torchvision to the torch extra by @nonsleepr in #297
New Contributors
- @tandiapa made their first contribution in #274
- @keetrap made their first contribution in #279
- @sanjeed5 made their first contribution in #287
- @davidberenstein1957 made their first contribution in #306
- @clefourrier made their first contribution in #296
- @nbroad1881 made their first contribution in #303
- @vladiliescu made their first contribution in #282
- @Killian-pit made their first contribution in #308
- @antoinejeannot made their first contribution in #281
- @touseefahmed96 made their first contribution in #293
- @Deng-Xian-Sheng made their first contribution in #327
- @nonsleepr made their first contribution in #297
- @merveenoyan made their first contribution in #220
Full Changelog: v1.4.1...v1.5.0
v1.4.1
What's Changed
New features 🚀
- Add support for MCP Servers tools as
ToolCollection
by @grll in #232- This enables using Model Context Protocol (MCP) servers, thus makes many, many tools compatible with
smolagents
: find a list on glama.ai or smithery.ai ✨
- This enables using Model Context Protocol (MCP) servers, thus makes many, many tools compatible with
- Allow passing kwargs to all models by @aymeric-roucher in #222
- Add Chinese translations for multi-agent example by @FanwangM in #246
Fixes 🐛
- Fix subpackage import vulnerability by @aymeric-roucher in #238
- Fix typo in building_good_agents.md by @rug in #193
- Align data types in example benchmark by @albertvillanova in #205
- Rename the split of the benchmark dataset from train to test by @albertvillanova in #216
- Fix vanilla model answer in example benchmark by @albertvillanova in #219
- Fix additional args in stream_to_gradio by @aymeric-roucher in #221
- Return textboxes on Gradio file upload errors by @stackviolator in #214
- Docs Bug - fix tool example with additional args by @RolandJAAI in #228
- Dead Link to Duck Duck Go search tool by @matterattetatte in #233
- Fix missing python modules in CodeAgent system prompt by @edbeeching in #226
Adjustments 🔧
- Clean makefile, pyproject.toml and CI by @Wauplin in #229
- Add resizeable option to Gradio UI component for better usabilty by @jank in #234
- Add trust_remote_code arg to TransformersModel by @aymeric-roucher in #240
- Make openai dependency optional by @albertvillanova in #236
- Remove dependency on _is_package_available from transformers by @albertvillanova in #247
- Update README.md by @aymeric-roucher in #208
- Set ollama context length in example to 8192 to make it work by @RolandJAAI in #252
- chore: unset console width, utilize auto detect feature by @simpletrontdip in #196
- Max length of "print" outputs as a parameter of an agent by @IlyaGusev in #209
- Small fixes in docs by @MoritzLaurer in #245
- Fixes before release by @aymeric-roucher in #254
New Contributors
- @rug made their first contribution in #193
- @RolandJAAI made their first contribution in #228
- @matterattetatte made their first contribution in #233
- @jank made their first contribution in #234
- @edbeeching made their first contribution in #226
- @Wauplin made their first contribution in #229
- @FanwangM made their first contribution in #246
- @simpletrontdip made their first contribution in #196
- @MoritzLaurer made their first contribution in #245
- @grll made their first contribution in #232
Full Changelog: v1.3.0...v1.4.1
v1.3.0
What's Changed
New features 🚀
- We now support OpenTelemetry instrumentation! Find a detailed tutorial here 📊 by @aymeric-roucher in #200
-
We now have a Chinese (mandarin) version of the doc for
smolagents
! by @Ayuilos in #156 -
Add option to upload files to GradioUI by @stackviolator in #138
-
feat: Add multi-GPU support for TransformersModel by @6643789wsx in #139
-
More flexible verbosity level: now use
verbosity_level=0/1/2
instead ofverbose=True/False
upon agent initialization by @aymeric-roucher in #150. This gives you more fine-grained control over verbosity! -
Agents can now import anything using
additional_authorized_imports=['*']
! Contributed by @joaopauloschuler in #129
Fixes and smol improvements 🔧
- Add top level docs link to README by @robtaylor in #121
- Added the right link for website button by @AngeloKiriakoulis in #159
- Tools from Spaces: Fix bug preventing use of long prompts. by @jkingston in #134
- Fix typo in dosctrings by @chloefeal in #155
- Log list of tool calls in ActionStep by @aymeric-roucher in #172
- Bug fixes on TransformersModel by @AngeloKiriakoulis in #165
- Fix wrong return value in agents.md doc by @sidtuladhar in #164
- Fix minor issues in docs by @duydl in #173
- Fix quality issues by @albertvillanova in #171
- Clean local python interpreter: propagate imports by @aymeric-roucher in #175
- Fix tool_calls parsing error in
ToolCallingAgent
when usingOpenAIServerModel
by @tanhuajie in #160 - Fix minor issues in building_good_agents docs by @albertvillanova in #170
- bugfix: Fix plan_update message display by @IlyaGusev in #179
- Make default tools more robust by @aymeric-roucher in #186
- Implemented support for ast.Pass in the interpeter. by @AngeloKiriakoulis in #189
- Support pandas' iloc indexer by @aymeric-roucher in #191
- The call.func parameter type of the local_python_executor.evaluate_call function might be ast.Subscript by @nvrxq in #194
- bug fix: fix string concatenation bug in GradioUI.log_user_message by @kingdomad in #199
- Fix import from ChatMessage in test_monitoring by @aymeric-roucher in #202
- Fix quality in gradio_ui by @albertvillanova in #206
- Pre-release fixes by @aymeric-roucher in #207
- Document OpenTelemetry usage by @aymeric-roucher in #204
New Contributors
- @robtaylor made their first contribution in #121
- @AngeloKiriakoulis made their first contribution in #159
- @jkingston made their first contribution in #134
- @chloefeal made their first contribution in #155
- @sidtuladhar made their first contribution in #164
- @Ayuilos made their first contribution in #156
- @duydl made their first contribution in #173
- @stackviolator made their first contribution in #138
- @albertvillanova made their first contribution in #171
- @tanhuajie made their first contribution in #160
- @IlyaGusev made their first contribution in #179
- @6643789wsx made their first contribution in #139
- @nvrxq made their first contribution in #194
- @kingdomad made their first contribution in #199
Full Changelog: v1.2.2...v1.3.0
v1.2.0
What's Changed
Big features:
- Add an OpenAIServerModel by @Zetaphor in #109
- This unlocks using any OpenAI-format-compatible server like TGI or vLLM.
- Enable
smolagent
tools in Hugging Chat! 🚀 in #132- Demo incoming!
- Vastly simplify Model class ✨ in #146
- Now
Model
subclasses have only one__call__
method: if argtools_to_call_from
is passed, this method will return a tool call instead of just a string.
- Now
- Halve import time by removing torch dependency in #147
- Support OpenTelemetry in #136
- This is still cooking, more stuff needs to be done, but we'll have observability!
Other important features
- Include missing pip install library in RAG example by @DarwinAnim8or in #92
- Update rag.md with missing verb by @derekalia in #95
- Small tweaks to Gradio demo by @freddyaboulton in #93
- Fixing spelling and grammar for query by @omarirfa in #98
- Fix Spelling Errors in Documentation by @ScientistIzaak in #99
- Change DuckDuckGoSearchTool output_type to string by @aymeric-roucher in #116
- Auto correct wrong assignments to final_answer by @aymeric-roucher in #123
- Adding "complex" to local_python_executor.py #78 by @joaopauloschuler in #79
- Remove dependency on LiteLLM by @aymeric-roucher in #126
- Support multiple code blobs by @aymeric-roucher in #128
- Fix several typos in docs. by @Symbolk in #140
Great thanks for everyone who participated!
v1.1.0
What's Changed
New features: 🥳
- !Breaking change: Agent initialization argument
max_iterations
changed tomax_steps
for consistency. - Add a warning towards the user when imports are missing in CodeAgent 3f79bae.
- Add code of conduct and contributing guide by @LysandreJik in #50
- feat: Add max_results kwarg to DDGS tool by @Stillerman in #40
- Add support for additional keyword arguments in LiteLLMModel by @chakib-belgaid in #29
- Add device parameter for TransformerModel in models.py by @ScientistIzaak in #49
Fixes: 🔧
- Don't pass sanitize_inputs_outputs=True to managed agents by @grrowl in #85
- Include missing pip install library in RAG example by @DarwinAnim8or in #92
- Fix issue with forward signature validation in space tool wrapper by @lelayf in #75
- fix ToolCollection usage by @Brunwo in #53
Typos: 🪶
- Update building_good_agents.md by @SHUBH4M-KUMAR in #43
- Fix example usage in HfApiModel by @balikasg in #37
- Fixing minor spelling errors in building_good_agents.md by @ScientistIzaak in #33
- chore: update local_python_executor.py by @eltociear in #64
- Add missing end of sentence to building_good_agents by @elroy-bot in #68
- Fix typos by @oliveredget in #74
- Update README.md: add link to blog post by @gary149 in #22
- e2b details by @CakeCrusher in #72
- Fixed typos and grammatical errors in building_good_agents.md tutorial by @alxfgh in #89
Full Changelog: v1.0.0...v1.1.0
v1.0.0
Bump release number for 1.0.0
v0.1.0: First ever release!
Nits in readme