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 demonstrates how to configure a basic Reasoning Agent, using the reasoning=True flag.
Code
cookbook/reasoning/agents/analyse_treaty_of_versailles.py
from agno.agent import Agent
from agno.models.openai import OpenAIChat
task = (
"Analyze the key factors that led to the signing of the Treaty of Versailles in 1919. "
"Discuss the political, economic, and social impacts of the treaty on Germany and how it "
"contributed to the onset of World War II. Provide a nuanced assessment that includes "
"multiple historical perspectives."
)
reasoning_agent = Agent(
model=OpenAIChat(id="gpt-5-mini"),
reasoning=True, # The Agent will be able to reason.
markdown=True,
)
reasoning_agent.print_response(task, stream=True, show_full_reasoning=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
Run Example
python cookbook/reasoning/agents/analyse_treaty_of_versailles.py