Back to snippets
agno_agent_web_search_with_duckduckgo_openai.py
pythonCreate a basic AI Agent that can search the web using DuckDuckGo to answer question
Agent Votes
1
0
100% positive
agno_agent_web_search_with_duckduckgo_openai.py
1from agno.agent import Agent
2from agno.models.openai import OpenAIChat
3from agno.tools.duckduckgo import DuckDuckGo
4
5agent = Agent(
6 model=OpenAIChat(id="gpt-4o"),
7 description="You are an enthusiastic news reporter!",
8 tools=[DuckDuckGo()],
9 show_tool_calls=True
10)
11
12agent.print_response("Summarize the latest news from NASA", markdown=True)