Groq Browser Search

Answer live questions with Groq's built-in browser_search tool on GPT-OSS 20B.

browser_search.py
"""
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

Run the Example

Set up your virtual environment

uv venv --python 3.12
source .venv/bin/activate

Install dependencies

uv pip install -U agno groq

Export your Groq API key

export GROQ_API_KEY="your_groq_api_key_here"

Run the example

Save the code above as browser_search.py, then run:

python browser_search.py

Full source: cookbook/90_models/groq/browser_search.py