> ## 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.

# Chat Reasoning O3 Mini

> Run o3-mini with high reasoning effort and YFinance tools to write a stock report.

```python reasoning_o3_mini.py theme={null}
"""
Openai Reasoning O3 Mini
========================

Cookbook example for `openai/chat/reasoning_o3_mini.py`.
"""

from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno.tools.yfinance import YFinanceTools

# ---------------------------------------------------------------------------
# Create Agent
# ---------------------------------------------------------------------------

agent = Agent(
    model=OpenAIChat(id="o3-mini", reasoning_effort="high"),
    tools=[YFinanceTools()],
    markdown=True,
)

# Print the response in the terminal
agent.print_response("Write a report on the NVDA, is it a good buy?", stream=True)

# ---------------------------------------------------------------------------
# Run Agent
# ---------------------------------------------------------------------------

if __name__ == "__main__":
    pass
```

## Run the Example

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

**1. Install dependencies**

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

**2. Export your OpenAI API key**

```bash Mac/Linux theme={null}
export OPENAI_API_KEY="your_openai_api_key_here"
```

```bash Windows theme={null}
$Env:OPENAI_API_KEY="your_openai_api_key_here"
```

**3. Run the example**

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

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

Full source: [cookbook/90\_models/openai/chat/reasoning\_o3\_mini.py](https://github.com/agno-agi/agno/blob/v3.0.4/cookbook/90_models/openai/chat/reasoning_o3_mini.py)


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