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.
Code
cookbook/reasoning/models/openai/reasoning_summary.py
"""Run `pip install openai ddgs` to install dependencies."""
from agno.agent import Agent
from agno.models.openai import OpenAIResponses
from agno.tools.duckduckgo import DuckDuckGoTools
# Setup the reasoning Agent
agent = Agent(
model=OpenAIResponses(
id="o4-mini",
reasoning_summary="auto", # Requesting a reasoning summary
),
tools=[DuckDuckGoTools(search=True)],
instructions="Use tables to display the analysis",
markdown=True,
)
agent.print_response(
"Write a brief report comparing NVDA to TSLA",
stream=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 Agent
python cookbook/reasoning/models/openai/reasoning_summary.py