from agno.agent import Agent from agno.tools.serper import SerperTools agent = Agent( tools=[SerperTools()], show_tool_calls=True, ) agent.print_response( "Search for the latest news about artificial intelligence developments", markdown=True, )
Create a virtual environment
Terminal
python3 -m venv .venv source .venv/bin/activate
Set your API key
export SERPER_API_KEY=xxx export OPENAI_API_KEY=xxx
Install libraries
pip install -U requests openai agno
Run Agent
python cookbook/tools/serper_tools.py
agent.print_response( "Find recent academic papers about large language model safety", markdown=True, )
agent.print_response( "Analyze reviews for this Google Place ID: ChIJ_Yjh6Za1j4AR8IgGUZGDDTs", markdown=True )
agent.print_response( "Scrape and summarize content from https://openai.com/index/gpt-4/", markdown=True )
Was this page helpful?