> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Fast Reasoning

> Time Llama 3.3 70B on Groq answering a math problem and check its reasoning depth.

Compares Groq speed with and without a reasoning model.

```python fast_reasoning.py theme={null}
"""
Fast Reasoning
==============

Compares Groq speed with and without a reasoning model.
"""

import time

from agno.agent import Agent
from agno.models.deepseek import DeepSeek
from agno.models.groq import Groq
from rich.console import Console

# ---------------------------------------------------------------------------
# Create Agents
# ---------------------------------------------------------------------------
console = Console()

task = "What is 23 x 47? Show your step-by-step reasoning."

# Fast agent - no reasoning model
fast_agent = Agent(
    model=Groq(id="openai/gpt-oss-120b"),
    markdown=True,
)

# Reasoning agent - uses DeepSeek for thinking
reasoning_agent = Agent(
    model=Groq(id="qwen/qwen3.6-27b"),
    reasoning_model=DeepSeek(id="deepseek-reasoner"),
    markdown=True,
)

# ---------------------------------------------------------------------------
# Run Agents
# ---------------------------------------------------------------------------
if __name__ == "__main__":
    console.rule("[bold cyan]Groq Fast Reasoning Demo[/bold cyan]")

    console.rule("[bold green]Fast Agent (No Reasoning)[/bold green]")
    start = time.time()
    fast_agent.print_response(task, stream=True)
    console.print(f"\n[dim]Response time: {time.time() - start:.2f}s[/dim]")

    console.rule("[bold blue]Reasoning Agent (DeepSeek)[/bold blue]")
    start = time.time()
    reasoning_agent.print_response(task, stream=True, show_full_reasoning=True)
    console.print(f"\n[dim]Response time: {time.time() - start:.2f}s[/dim]")
```

## Run the Example

<Snippet file="create-venv-step.mdx" />

**1. Install dependencies**

```bash theme={null}
uv pip install -U agno groq openai
```

**2. Export your API keys**

```bash Mac/Linux theme={null}
export DEEPSEEK_API_KEY="your_deepseek_api_key_here"
export GROQ_API_KEY="your_groq_api_key_here"
```

```bash Windows theme={null}
$Env:DEEPSEEK_API_KEY="your_deepseek_api_key_here"
$Env:GROQ_API_KEY="your_groq_api_key_here"
```

**3. Run the example**

Save the code above as `fast_reasoning.py`, then run:

```bash theme={null}
python fast_reasoning.py
```

Full source: [cookbook/10\_reasoning/models/groq/fast\_reasoning.py](https://github.com/agno-agi/agno/blob/v3.0.4/cookbook/10_reasoning/models/groq/fast_reasoning.py)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.