Repository navigation
Migrate multi-agent cookbooks to modern smolagents API (Fixes #316, #291) - #378
Closed
ahmedshahrukhali wants to merge 1 commit into
Closed
ahmedshahrukhali wants to merge 1 commit into
ahmedshahrukhali wants to merge 1 commit into
Conversation
…ggingface#316, huggingface#291) In smolagents >= 1.8.0, ManagedAgent was removed in favor of configuring sub-agents directly with name and description and passing them into managed_agents. Fixes huggingface#316 Fixes huggingface#291
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
ahmedshahrukhali
marked this pull request as draft
September 28, 2026 18:15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
In
smolagents >= 1.8.0, theManagedAgentwrapper class was deprecated and removed. Modernsmolagentsconfigures sub-agents by defining theirnameanddescriptiondirectly on the agent instance and passing them directly intomanaged_agents=[...].Because of this removal, running these multi-agent recipes resulted in:
This PR migrates all three multi-agent cookbooks to the modern
smolagentsAPI:notebooks/en/multiagent_web_assistant.ipynb(Fixes Execution Error in Agents recipes #316):ManagedAgentfrom imports.nameanddescriptiondirectly toweb_agent.web_agentdirectly intomanager_agent'smanaged_agents.notebooks/en/mongodb_smolagents_multi_micro_agents.ipynb(Fixes mongodb_smolagents_multi_micro_agents.ipynb #291):ManagedAgentfrom imports.nameanddescriptiondirectly oninventory_agent,order_agent, anddelivery_agent.self.managed_agents.notebooks/en/multiagent_rag_system.ipynb:ManagedAgentfrom imports and wrapper instantiations.nameanddescriptiondirectly toweb_agent,retriever_agent, andimage_generation_agent.manager_agent'smanaged_agents.Fixes #316
Fixes #291
Who can review?
@merveenoyan @stevhliu