browser_search.py
Run the Example
1
Set up your virtual environment
2
Install dependencies
3
Export your Groq API key
4
Run the example
Save the code above as
browser_search.py, then run:Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Answer live questions with Groq’s built-in browser_search tool on GPT-OSS 20B.
"""
Groq Browser Search
===================
Cookbook example for `groq/browser_search.py`.
"""
from agno.agent import Agent
from agno.models.groq import Groq
# ---------------------------------------------------------------------------
# Create Agent
# ---------------------------------------------------------------------------
agent = Agent(
model=Groq(id="openai/gpt-oss-20b"),
tools=[{"type": "browser_search"}],
)
agent.print_response("Is the Going-to-the-sun road open for public?")
# ---------------------------------------------------------------------------
# Run Agent
# ---------------------------------------------------------------------------
if __name__ == "__main__":
pass
Set up your virtual environment
uv venv --python 3.12
source .venv/bin/activate
uv venv --python 3.12
.venv\Scripts\activate
Install dependencies
uv pip install -U agno groq
Export your Groq API key
export GROQ_API_KEY="your_groq_api_key_here"
$Env:GROQ_API_KEY="your_groq_api_key_here"
Run the example
browser_search.py, then run:python browser_search.py
Was this page helpful?