What is Reasoning?
Reasoning allows agents to break down complex tasks into smaller steps, validate intermediate results, and arrive at well-thought-out conclusions. This is especially valuable for:- Mathematical problem-solving
- Complex analysis and decision-making
- Multi-step planning and execution
- Problems requiring validation and error correction
Types of Reasoning
Agno supports two approaches to reasoning:Native Reasoning
Models with built-in reasoning (DeepSeek-R1, GPT-o1, Claude)
Chain-of-Thought
Custom structured reasoning for any model
Quick Start
Enable reasoning with a single parameter:Native Reasoning Models
Native reasoning models have built-in thinking capabilities:- DeepSeek
- OpenAI o1
- Anthropic
- Gemini
Reasoning Configuration
Customize reasoning behavior with these parameters:Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
reasoning | bool | False | Enable reasoning mode |
reasoning_min_steps | int | 1 | Minimum steps before final answer |
reasoning_max_steps | int | 10 | Maximum reasoning steps allowed |
reasoning_model | Model | None | Optional separate model for reasoning |
reasoning_agent | Agent | None | Custom reasoning agent |
Reasoning with Tools
Combine reasoning with tool usage:Streaming Reasoning
Stream reasoning steps in real-time:Reasoning Step Structure
Each reasoning step has the following structure:Benefits
Better Accuracy
Multi-step thinking leads to more accurate answers
Transparency
See how the agent arrived at its conclusion
Error Correction
Agent can validate and correct mistakes
Complex Problems
Handle tasks requiring multiple steps and analysis
Next Steps
Chain-of-Thought
Learn about custom reasoning strategies
Guardrails
Add safety checks to your reasoning agents
Evaluations
Measure reasoning accuracy and quality
Learning
Combine reasoning with memory and learning