I was using Agno 1.4.5 where I setup a team of agent using manager agent Gemini 2.5 Flash and members having Gemini 2.0
Everything was working perfectly fine.
I upgraded my Agno version to 1.5.2 today to add the lLangfuse tracking, but everything fell apart when I started getting this error:
787 return resp
788 else:
→ 789 self._run(
790 run_response=self.run_response,
791 run_messages=run_messages,
792 session_id=session_id,
793 user_id=user_id,
794 response_format=response_format,
795 )
797 return self.run_response
799 except ModelProviderError as e:
I have another single-agent architecture which runs completely fine with Gemini 2.0 but this team fails to run.
I went into debug mode and everything seems to be exactly how it is supposed to be but only the end cant parse it to json.
I reverted back to Agno 1.4.5 and it works fine. What happened here? I have seen this error was common in the past but was resolved.
Please update me as soon as possible!
Hey @Sharan17
thanks for reaching out and supporting Agno. I’ve shared this with the team, we’re working through all requests one by one and will get back to you soon.
If it’s urgent, please let us know. We appreciate your patience!
Hi
Thanks. It worked after upgrading the AgnoInstrumentor.
Is there more documentation available on how I control this when I have a class which initialises my team and has a function which uses the Team.run()? My class is then being class in other codes. So I want to track that all.
I want to also pass details to langfuse (env, metadata)
You just need to keep the logic to initialize the instrumentor in the class that initializes and runs the Team. That should ensure that when the Team runs, the instrumentor has already been initialized. You can see how to initialize the instrumentor in the example here: Langfuse - Agno
Currently we can’t extend what is monitored with this integration. We definitely want to extend it in the future to allow for extra fields as env or metadata, as you propose.
I ran into another issue while tracing.
I have a agent which returns a pydantic object as a response model.
So my pydantic object has a field which is a Enum. When I added the tracing for langfuse. I started getting the error saying that field is not Json Serializable. When I remove the langfuse tracking, it works smoothly, without any errors.
Just a query:
I added the instrumentation in my class which has one agent. It tracked that. But after I run this agent I run another agent which based on a condition from the previous agent and some processing. Both agents are in seperate classes but the tracker still tracked both. Is this instrumentation global? I felt it should only track the agent where I added the instrumentation.
@manu@Monali
Started getting this error after upgrading agno to 1.5.9
Using Gemini 2.5 flash as my model for my team leader. Everything is working fine in the previous version of Agno.
@manu
Hey
I rolled back to 1.5.8 and it works well, but then langfuse tracking doesnt work there.
Its a bit frustrating here, this is delaying my own production releases and making want to switch away from using Agno.
I also tried using LiteLLM instead of the Gemini directly, there the I cant pass a file/image. Even after I use this “file = File(content=file_bytes, mime_type=mime_type)” and add it to the run function, the agent never got the file context anytime.
Hey @Sharan17, sorry for the slow response! I’ll keep an eye on this thread from now on.
About using the instrumentation with multiple agents:
If you’re using the OpenInference instrumentor (AgnoInstrumentor().instrument()) the expected behavior is indeed to start tracking all calls from all agents. But notice you can stop the tracking by doing: AgnoInstrumentor().uninstrument(). Calling one or the other before running an Agent would work to track only the specific runs you want to track.
About the Gemini API error:
I am not being able to recreate this using a simple Team setup with Gemini 2.5 as leader. I will need you to share a snippet or give me some more information so I can recreate it and dive into it. How is the Team defined? How are you running?
Thanks for your patience - we will be faster in supporting you.
Hi @manu
Thank you so much. Understood the instrumentation better now.
The Gemini API error is solved now.
I have some questions:
I have a team of agents which work with documents, images etc. The team lead has a reasoning tool as well. With coordinate team mode. The expected response is a pydantic object. I get a lot of pydantic validation erros even when I see that the JSON is correct. I saw Agno added parser model to agents, when do you think you will have it for teams? Or do you suggest a better solutions?
I was trying to work with streaming on my team so that I can log events of the agent. But this doesnt seem to work for the team when there is media involved.