Copy
Ask AI
"""
Basic Reasoning
=============================
Basic Reasoning.
"""
from agno.agent import Agent
from agno.models.openai import OpenAIResponses
# ---------------------------------------------------------------------------
# Create Agent
# ---------------------------------------------------------------------------
reasoning_agent = Agent(
name="Reasoning Agent",
model=OpenAIResponses(id="gpt-5.2"),
reasoning=True,
reasoning_min_steps=2,
reasoning_max_steps=6,
)
# ---------------------------------------------------------------------------
# Run Agent
# ---------------------------------------------------------------------------
if __name__ == "__main__":
reasoning_agent.print_response(
"A bat and ball cost $1.10 total. The bat costs $1.00 more than the ball."
" How much does the ball cost?",
stream=True,
show_full_reasoning=True,
)
Run the Example
Copy
Ask AI
# Clone and setup repo
git clone https://github.com/agno-agi/agno.git
cd agno/cookbook/02_agents/13_reasoning
# Create and activate virtual environment
./scripts/demo_setup.sh
source .venvs/demo/bin/activate
python basic_reasoning.py