Reasoning Tool showing Error

WARNING  Could not run function analyze(next_action=final_answer, result=Ready to build the JSON response.,      
         confidence=1, analysis=...)                                                                             
ERROR    1 validation error for ReasoningTools.analyze                                                           
         title                                                                                                   
           Missing required argument [type=missing_argument, input_value=ArgsKwargs((), {'agent': ...ct the JSON 
         response.'}), input_type=ArgsKwargs]                                                                    
             For further information visit https://errors.pydantic.dev/2.10/v/missing_argument                   
         Traceback (most recent call last):                                                                      
           File "/Users/muhammadgulfamtahir/Desktop/GitHub                                                       
         Projects/.conda/lib/python3.11/site-packages/agno/tools/function.py", line 554, in execute              
             result = self.function.entrypoint(**arguments)                                                      
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                      
           File "/Users/muhammadgulfamtahir/Desktop/GitHub                                                       
         Projects/.conda/lib/python3.11/site-packages/pydantic/_internal/_validate_call.py", line 38, in         
         wrapper_function                                                                                        
             return wrapper(*args, **kwargs)                                                                     
                    ^^^^^^^^^^^^^^^^^^^^^^^^                                                                     
           File "/Users/muhammadgulfamtahir/Desktop/GitHub                                                       
         Projects/.conda/lib/python3.11/site-packages/pydantic/_internal/_validate_call.py", line 111, in        
         __call__                                                                                                
             res = self.__pydantic_validator__.validate_python(pydantic_core.ArgsKwargs(args, kwargs))           
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^           
         pydantic_core._pydantic_core.ValidationError: 1 validation error for ReasoningTools.analyze             
         title                                                                                                   
           Missing required argument [type=missing_argument, input_value=ArgsKwargs((), {'agent': ...ct the JSON 
         response.'}), input_type=ArgsKwargs]                                                                    
             For further information visit https://errors.pydantic.dev/2.10/v/missing_argument 

I am trying to run my agent with the model Gemini = gemini-2.0-flash-exp , just to get the output , sometimes it is showing me this error and sometimes it is not , I have upgrade the reasoning library as well. But the error is still there.

Any lead how to solve this ?

Thanks

Hi @gulfamtahir535 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 @gulfamtahir535 , This error can be model specific and we have seen Gemini giving error with tools. But Can you please share your agent configuration so that i can replicate the issue ?
Meanwhile you can try with a different model like OpenAI gpt-4o and see you are facing the same issue?

Yes sure here is my Agent configuration:

agent = Agent(model=Gemini(id='gemini-2.0-flash-001'),
            storage=SqliteStorage(table_name="user_chat_sessions", db_file="chat_tmp/user_data.db", auto_upgrade_schema=True),
            show_tool_calls=True,
            add_state_in_messages=True,
            tools=[ReasoningTools(add_instructions=True)],
            session_state={'chat_list' : []},
            instructions=dedent("""\
            You are an intelligent assistant that analyzes chat conversations and structures them into JSON format.
            your primary tasks are : 
            1) Go through the input chat history, make your understanding about the chat data
            2) After making the understanding of the chat data , structure it in the JSON format.
            3) Here is the example of it in which format you need to store the data:
            [
            {
            "speaker": "<name>",
            "timestamp" : "<time>"
            "message": "<message content>"
          },
          ...                                                                                                       
            ]
            4) The current (chat list) is : {chat_list}
        Important:
        - Maintain the exact original format of timestamps
        - Don't reorder messages - keep them in the same sequence as provided
        - Include all emojis and special characters in messages
            """),
            add_history_to_messages=True,
            add_datetime_to_instructions=True,
            num_history_runs=5,
            read_chat_history=True,
            enable_agentic_memory=True,
            enable_session_summaries=True,
            use_json_mode=True,
)

Hi @gulfamtahir535,
I was able to generate a response without any errors using both Gemini = gemini-2.0-flash-exp and gpt-4o.
Please note that behavior can vary between models — it’s quite model-specific and non-deterministic.

I’d recommend trying it with gpt-4o on your end and letting me know if you encounter any issues.

1 Like