Copy
Ask AI
"""
Groq Reasoning Agent
====================
Cookbook example for `groq/reasoning_agent.py`.
"""
from agno.agent import Agent
from agno.models.groq import Groq
# ---------------------------------------------------------------------------
# Create Agent
# ---------------------------------------------------------------------------
# Create a reasoning agent that uses:
# - `deepseek-r1-distill-llama-70b` as the reasoning model
# - `llama-3.3-70b-versatile` to generate the final response
reasoning_agent = Agent(
model=Groq(id="llama-3.3-70b-versatile"),
reasoning_model=Groq(
id="deepseek-r1-distill-llama-70b", temperature=0.6, max_tokens=1024, top_p=0.95
),
)
# Prompt the agent to solve the problem
reasoning_agent.print_response("Is 9.11 bigger or 9.9?", stream=True)
# ---------------------------------------------------------------------------
# Run Agent
# ---------------------------------------------------------------------------
if __name__ == "__main__":
pass
Run the Example
Copy
Ask AI
# Clone and setup repo
git clone https://github.com/agno-agi/agno.git
cd agno/cookbook/90_models/groq
# Create and activate virtual environment
./scripts/demo_setup.sh
source .venvs/demo/bin/activate
python reasoning_agent.py