Groq with Reasoning Tools

Run GPT-OSS 120B on Groq with ReasoningTools and WebSearchTools to compare NVDA and TSLA.

Use a currently available model for your Groq account. This sample uses GPT-OSS reasoning; the former Qwen3-32B and Scout examples are retired on ordinary developer tiers.

Add the following code to your Python file

groq_llama_finance_agent.py
from textwrap import dedent

from agno.agent import Agent
from agno.models.groq import Groq
from agno.tools.reasoning import ReasoningTools
from agno.tools.websearch import WebSearchTools

thinking_llama = Agent(
    model=Groq(id="openai/gpt-oss-120b"),
    tools=[
        ReasoningTools(),
        WebSearchTools(),
    ],
    instructions=dedent("""\
    ## General Instructions
    - Always start by using the think tool to map out the steps needed to complete the task.
    - After receiving tool results, use the think tool as a scratchpad to validate the results for correctness
    - Before responding to the user, use the think tool to jot down final thoughts and ideas.
    - Present final outputs in well-organized tables whenever possible.

    ## Using the think tool
    At every step, use the think tool as a scratchpad to:
    - Restate the object in your own words to ensure full comprehension.
    - List the  specific rules that apply to the current request
    - Check if all required information is collected and is valid
    - Verify that the planned action completes the task\
    """),
    markdown=True,
)
thinking_llama.print_response("Write a report comparing NVDA to TSLA", stream=True)

Set up your virtual environment

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

Install dependencies

uv pip install -U agno groq ddgs

Export your Groq API key

  export GROQ_API_KEY="your_groq_api_key_here"

Run Agent

python groq_llama_finance_agent.py