- 
                Notifications
    
You must be signed in to change notification settings  - Fork 4.6k
 
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
I tried to run the exact same example from the docs in my environment:
from agno.agent import Agent
from agno.tools.googlesearch import GoogleSearchTools
agent = Agent(
    tools=[GoogleSearchTools()],
    description="You are a news agent that helps users find the latest news.",
    instructions=[
        "Given a topic by the user, respond with 4 latest news items about that topic.",
        "Search for 10 news items and select the top 4 unique items.",
        "Search in English and in French.",
    ],
        debug_mode=True,
)
agent.print_response("Mistral AI", markdown=True)Agno has automatically chosen the gpt-4o model to the response, as showed in the below logs. Even thought my OpenAI API key is set as a OPENAI_API_KEY env variable and the googlesearch-python and pycountry are installed in the most recent versions, the tool call does not yield any relevant results:
INFO Setting default model to OpenAI Chat                                                                                                                                                                       
DEBUG ****** Agent ID: a0698731-bd75-48f1-9f85-2c0e095d0160 ******                                                                                                                                              
DEBUG Creating new AgentSession: 11798c90-1702-4502-a3cd-6283c1ed2cf1                                                                                                                                           
DEBUG Processing tools for model                                                                                                                                                                                
DEBUG Added tool google_search from google_search_tools                                                                                                                                                         
DEBUG ** Agent Run Start: 60ff822b-2119-40ce-93bd-63d5507e85f8 ***                                                                                                                                              
DEBUG ------------------ OpenAI Response Start -------------------                                                                                                                                              
DEBUG ---------------------- Model: gpt-4o -----------------------                                                                                                                                              
DEBUG ========================== system ==========================                                                                                                                                              
DEBUG You are a news agent that helps users find the latest news.                                                                                                                                               
      <instructions>                                                                                                                                                                                            
      - Given a topic by the user, respond with 4 latest news items about that topic.                                                                                                                           
      - Search for 10 news items and select the top 4 unique items.                                                                                                                                             
      - Search in English and in French.                                                                                                                                                                        
      </instructions>                                                                                                                                                                                           
DEBUG =========================== user ===========================                                                                                                                                              
DEBUG Mistral AI                                                                                                                                                                                                
DEBUG ======================== assistant =========================                                                                                                                                              
DEBUG Tool Calls:                                                                                                                                                                                               
        - ID: 'call_FOOUmcu16ys9pw9x9WjMBBcX'                                                                                                                                                                   
          Name: 'google_search'                                                                                                                                                                                 
          Arguments: 'query: Mistral AI, max_results: 10, language: en'                                                                                                                                         
        - ID: 'call_ENTUZUVtda2vdbd9JFZCQsrr'                                                                                                                                                                   
          Name: 'google_search'                                                                                                                                                                                 
          Arguments: 'query: Mistral AI, max_results: 10, language: fr'                                                                                                                                         
DEBUG ************************  METRICS  *************************                                                                                                                                              
DEBUG * Tokens:                      input=164, output=68, total=232                                                                                                                                            
DEBUG * Duration:                    1.4372s                                                                                                                                                                    
DEBUG * Tokens per second:           47.3152 tokens/s                                                                                                                                                           
DEBUG ************************  METRICS  *************************                                                                                                                                              
DEBUG Running: google_search(query=Mistral AI, max_results=10, language=en)                                                                                                                                     
DEBUG Searching Google [en] for: Mistral AI                                                                                                                                                                     
DEBUG Running: google_search(query=Mistral AI, max_results=10, language=fr)                                                                                                                                     
DEBUG Searching Google [fr] for: Mistral AI                                                                                                                                                                     
DEBUG =========================== tool ===========================                                                                                                                                              
DEBUG Tool call Id: call_FOOUmcu16ys9pw9x9WjMBBcX                                                                                                                                                               
DEBUG []                                                                                                                                                                                                        
DEBUG **********************  TOOL METRICS  **********************                                                                                                                                              
DEBUG * Duration:                    0.3097s                                                                                                                                                                    
DEBUG **********************  TOOL METRICS  **********************                                                                                                                                              
DEBUG =========================== tool ===========================                                                                                                                                              
DEBUG Tool call Id: call_ENTUZUVtda2vdbd9JFZCQsrr                                                                                                                                                               
DEBUG []                                                                                                                                                                                                        
DEBUG **********************  TOOL METRICS  **********************                                                                                                                                              
DEBUG * Duration:                    0.2843s                                                                                                                                                                    
DEBUG **********************  TOOL METRICS  **********************                                                                                                                                              
DEBUG ======================== assistant =========================                                                                                                                                              
DEBUG I wasn't able to find the latest news about Mistral AI at the moment. Please try again later or explore other ways to get updates.                                                                        
DEBUG ************************  METRICS  *************************                                                                                                                                              
DEBUG * Tokens:                      input=246, output=30, total=276                                                                                                                                            
DEBUG * Duration:                    1.4287s                                                                                                                                                                    
DEBUG * Tokens per second:           20.9984 tokens/s                                                                                                                                                           
DEBUG ************************  METRICS  *************************                                                                                                                                              
DEBUG ------------------- OpenAI Response End --------------------                                                                                                                                              
DEBUG Added RunOutput to Agent Session                                                                                                                                                                          
DEBUG *** Agent Run End: 60ff822b-2119-40ce-93bd-63d5507e85f8 ****                                                                                                                                              
┏━ Message ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃                                                                                                                                                                                                              ┃
┃ Mistral AI                                                                                                                                                                                                   ┃
┃                                                                                                                                                                                                              ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
┏━ Tool Calls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃                                                                                                                                                                                                              ┃
┃ • google_search(query=Mistral AI, max_results=10, language=en)                                                                                                                                               ┃
┃ • google_search(query=Mistral AI, max_results=10, language=fr)                                                                                                                                               ┃
┃                                                                                                                                                                                                              ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
┏━ Response (4.6s) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃                                                                                                                                                                                                              ┃
┃ I wasn't able to find the latest news about Mistral AI at the moment. Please try again later or explore other ways to get updates.                                                                           ┃
┃                                                                                                                                                                                                              ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
Package versions installed
agno==2.2.5
googlesearch-python==1.3.0
pycountry==24.6.1Steps to Reproduce
- Replicate the exact example shown in the docs
 - Run it with the exact same dependencies installed above and a OpenAI API key set
 
Agent Configuration (if applicable)
agent = Agent(
    tools=[GoogleSearchTools()],
    description="You are a news agent that helps users find the latest news.",
    instructions=[
        "Given a topic by the user, respond with 4 latest news items about that topic.",
        "Search for 10 news items and select the top 4 unique items.",
        "Search in English and in French.",
    ],
    debug_mode=True,
)Expected Behavior
The GoogleSearchTools Toolkit should return relevant results from the Mistral AI query
Actual Behavior
No results are returned from the Toolkit
Screenshots or Logs (if applicable)
INFO Setting default model to OpenAI Chat                                                                                                                                                                       
DEBUG ****** Agent ID: a0698731-bd75-48f1-9f85-2c0e095d0160 ******                                                                                                                                              
DEBUG Creating new AgentSession: 11798c90-1702-4502-a3cd-6283c1ed2cf1                                                                                                                                           
DEBUG Processing tools for model                                                                                                                                                                                
DEBUG Added tool google_search from google_search_tools                                                                                                                                                         
DEBUG ** Agent Run Start: 60ff822b-2119-40ce-93bd-63d5507e85f8 ***                                                                                                                                              
DEBUG ------------------ OpenAI Response Start -------------------                                                                                                                                              
DEBUG ---------------------- Model: gpt-4o -----------------------                                                                                                                                              
DEBUG ========================== system ==========================                                                                                                                                              
DEBUG You are a news agent that helps users find the latest news.                                                                                                                                               
      <instructions>                                                                                                                                                                                            
      - Given a topic by the user, respond with 4 latest news items about that topic.                                                                                                                           
      - Search for 10 news items and select the top 4 unique items.                                                                                                                                             
      - Search in English and in French.                                                                                                                                                                        
      </instructions>                                                                                                                                                                                           
DEBUG =========================== user ===========================                                                                                                                                              
DEBUG Mistral AI                                                                                                                                                                                                
DEBUG ======================== assistant =========================                                                                                                                                              
DEBUG Tool Calls:                                                                                                                                                                                               
        - ID: 'call_FOOUmcu16ys9pw9x9WjMBBcX'                                                                                                                                                                   
          Name: 'google_search'                                                                                                                                                                                 
          Arguments: 'query: Mistral AI, max_results: 10, language: en'                                                                                                                                         
        - ID: 'call_ENTUZUVtda2vdbd9JFZCQsrr'                                                                                                                                                                   
          Name: 'google_search'                                                                                                                                                                                 
          Arguments: 'query: Mistral AI, max_results: 10, language: fr'                                                                                                                                         
DEBUG ************************  METRICS  *************************                                                                                                                                              
DEBUG * Tokens:                      input=164, output=68, total=232                                                                                                                                            
DEBUG * Duration:                    1.4372s                                                                                                                                                                    
DEBUG * Tokens per second:           47.3152 tokens/s                                                                                                                                                           
DEBUG ************************  METRICS  *************************                                                                                                                                              
DEBUG Running: google_search(query=Mistral AI, max_results=10, language=en)                                                                                                                                     
DEBUG Searching Google [en] for: Mistral AI                                                                                                                                                                     
DEBUG Running: google_search(query=Mistral AI, max_results=10, language=fr)                                                                                                                                     
DEBUG Searching Google [fr] for: Mistral AI                                                                                                                                                                     
DEBUG =========================== tool ===========================                                                                                                                                              
DEBUG Tool call Id: call_FOOUmcu16ys9pw9x9WjMBBcX                                                                                                                                                               
DEBUG []                                                                                                                                                                                                        
DEBUG **********************  TOOL METRICS  **********************                                                                                                                                              
DEBUG * Duration:                    0.3097s                                                                                                                                                                    
DEBUG **********************  TOOL METRICS  **********************                                                                                                                                              
DEBUG =========================== tool ===========================                                                                                                                                              
DEBUG Tool call Id: call_ENTUZUVtda2vdbd9JFZCQsrr                                                                                                                                                               
DEBUG []                                                                                                                                                                                                        
DEBUG **********************  TOOL METRICS  **********************                                                                                                                                              
DEBUG * Duration:                    0.2843s                                                                                                                                                                    
DEBUG **********************  TOOL METRICS  **********************                                                                                                                                              
DEBUG ======================== assistant =========================                                                                                                                                              
DEBUG I wasn't able to find the latest news about Mistral AI at the moment. Please try again later or explore other ways to get updates.                                                                        
DEBUG ************************  METRICS  *************************                                                                                                                                              
DEBUG * Tokens:                      input=246, output=30, total=276                                                                                                                                            
DEBUG * Duration:                    1.4287s                                                                                                                                                                    
DEBUG * Tokens per second:           20.9984 tokens/s                                                                                                                                                           
DEBUG ************************  METRICS  *************************                                                                                                                                              
DEBUG ------------------- OpenAI Response End --------------------                                                                                                                                              
DEBUG Added RunOutput to Agent Session                                                                                                                                                                          
DEBUG *** Agent Run End: 60ff822b-2119-40ce-93bd-63d5507e85f8 ****                                                                                                                                              
┏━ Message ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃                                                                                                                                                                                                              ┃
┃ Mistral AI                                                                                                                                                                                                   ┃
┃                                                                                                                                                                                                              ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
┏━ Tool Calls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃                                                                                                                                                                                                              ┃
┃ • google_search(query=Mistral AI, max_results=10, language=en)                                                                                                                                               ┃
┃ • google_search(query=Mistral AI, max_results=10, language=fr)                                                                                                                                               ┃
┃                                                                                                                                                                                                              ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
┏━ Response (4.6s) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃                                                                                                                                                                                                              ┃
┃ I wasn't able to find the latest news about Mistral AI at the moment. Please try again later or explore other ways to get updates.                                                                           ┃
┃                                                                                                                                                                                                              ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
Environment
- OS: [Windows 11 running WSL 2 with Ubuntu 24.04.3 LTS]
- Agno Version: [v2.2.5]
- External Dependency Versions: [googlesearch-python 1.3.0, pycountry 24.6.1]
- Additional Environment Details: [Python 3.12.3]Possible Solutions (optional)
No response
Additional Context
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working