Skip to content

Instantly share code, notes, and snippets.

@kartikpuri95
Created March 7, 2025 09:16
Show Gist options
  • Select an option

  • Save kartikpuri95/ebf0b5503f23480d89ed568e2d4eba63 to your computer and use it in GitHub Desktop.

Select an option

Save kartikpuri95/ebf0b5503f23480d89ed568e2d4eba63 to your computer and use it in GitHub Desktop.
from phi.agent import Agent
from phi.model.openai import OpenAIChat
from phi.tools.duckduckgo import DuckDuckGo
web_agent = Agent(
name="Web Agent",
model=OpenAIChat(id="gpt-4o"),
tools=[DuckDuckGo()],
instructions=["Always include sources"],
show_tool_calls=True,
markdown=True,
)
web_agent.print_response("Whats happening in France?", stream=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment