Documentation Index
Fetch the complete documentation index at: https://spacesail.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
This example shows how to use ReasoningTools with an OpenAI model.
Code
cookbook/reasoning/tools/openai_reasoning_tools.py
from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno.tools.duckduckgo import DuckDuckGoTools
from agno.tools.reasoning import ReasoningTools
reasoning_agent = Agent(
model=OpenAIChat(id="gpt-5-mini"),
tools=[
ReasoningTools(
think=True,
analyze=True,
add_instructions=True,
add_few_shot=True,
),
DuckDuckGoTools(),
],
instructions="Use tables where possible",
markdown=True,
)
reasoning_agent.print_response(
"Write a report comparing NVDA to TSLA",
stream=True,
show_full_reasoning=True,
stream_events=True,
)
Usage
Create a virtual environment
Open the Terminal and create a python virtual environment.python3 -m venv .venv
source .venv/bin/activate
Set your API key
export OPENAI_API_KEY=xxx
Install libraries
pip install -U openai agno ddgs
Run Example
python cookbook/reasoning/tools/openai_reasoning_tools.py