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

# OpenAI Tool Use O3

> Call YFinance tools from o3 through the OpenAI Responses API to fetch a live stock price.

```python tool_use_o3.py theme={null}
"""
Openai Tool Use O3
==================

Cookbook example for `openai/responses/tool_use_o3.py`.
"""

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

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

agent = Agent(
    model=OpenAIResponses(id="o3"),
    tools=[YFinanceTools(cache_results=True)],
    markdown=True,
    telemetry=False,
)

agent.print_response("What is the current price of TSLA?", 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 `tool_use_o3.py`, then run:

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

Full source: [cookbook/90\_models/openai/responses/tool\_use\_o3.py](https://github.com/agno-agi/agno/blob/v3.0.4/cookbook/90_models/openai/responses/tool_use_o3.py)


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