Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi agent example not working #420

Open
tocab opened this issue Jan 29, 2025 · 1 comment
Open

Multi agent example not working #420

tocab opened this issue Jan 29, 2025 · 1 comment

Comments

@tocab
Copy link
Contributor

tocab commented Jan 29, 2025

Hi, I tried out the following code from the example here.

model = LiteLLMModel(model_id="ollama/deepseek-r1:8b", num_ctx=10000)
web_agent = CodeAgent(tools=[DuckDuckGoSearchTool()], model=model)

managed_web_agent = ManagedAgent(
    agent=web_agent,
    name="web_search",
    description="Runs web searches for you. Give it your query as an argument."
)

manager_agent = CodeAgent(
    tools=[], model=model, managed_agents=[managed_web_agent]
)

manager_agent.run("Who is the CEO of Hugging Face?")

And get the same response for 5 iterations:

hugging_face_ceo = web_search(query="CEO of Hugging Face 2023")                                                  
print(f"The CEO of Hugging Face is {hugging_face_ceo}.")                                                         
final_answer(hugging_face_ceo)  

The agent is called in the wrong way and therefore this results in that error:

Code execution failed at line 'hugging_face_ceo = web_search(query="CEO of Hugging Face 2023")' due to: 
TypeError:ManagedAgent.__call__() missing 1 required positional argument: 'request'

What could be the reason? Is the model too weak to understand how to call the managed agent?

@elsolo5000-2
Copy link

elsolo5000-2 commented Feb 2, 2025

The llm did not put the correct argument in the response while calling for the managed agent.?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants