Imagine asking a regular AI agent to solve a complex math problem, analyze a scientific paper, or plan a multi-step travel itinerary. Often, it rushes to an answer without fully thinking through the problem. The result? Wrong calculations, incomplete analysis, or illogical plans. Now imagine an agent that pauses, thinks through the problem step-by-step, validates its reasoning, catches its own mistakes, and only then provides an answer. This is reasoning in action, and it transforms agents from quick responders into careful problem-solvers.Documentation Index
Fetch the complete documentation index at: https://agno-v2-shaloo-ai-support-link.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Why Reasoning Matters
Without reasoning, agents struggle with tasks that require:- Multi-step thinking - Breaking complex problems into logical steps
- Self-validation - Checking their own work before responding
- Error correction - Catching and fixing mistakes mid-process
- Strategic planning - Thinking ahead instead of reacting
How Reasoning Works
The features of reasoning are available both on Agents and Teams.
Reasoning Models
Chain-of-Thought (CoT): The model thinks through a problem step-by-step internally, breaking down complex reasoning into logical steps before producing an answer. This is used by reasoning models and reasoning agents. ReAct (Reason and Act): An iterative cycle where the agent alternates between reasoning and taking actions:- Reason - Think through the problem, plan next steps
- Act - Take action (call a tool, perform calculation)
- Observe - Analyze the results
- Repeat - Continue reasoning based on new information until solved
Three Approaches to Reasoning
Agno gives you three ways to add reasoning to your agents, each suited for different use cases:1. Reasoning Models
What: Pre-trained models that natively think before answering (e.g. OpenAI gpt-5, Claude 4.5 Sonnet, Gemini 2.0 Flash Thinking, DeepSeek-R1). How it works: The model generates an internal chain of thought before producing its final response. This happens at the model layer: you simply use the model and reasoning happens automatically. Best for:- Single-shot complex problems (math, coding, physics)
- Problems where you trust the model to handle reasoning internally
- Use cases where you don’t need to control the reasoning process
o3_mini.py
Reasoning Model + Response Model
Here’s a powerful pattern: use one model for reasoning (like DeepSeek-R1) and another for the final response (like GPT-4o). Why? Reasoning models are excellent at solving problems but often produce robotic or overly technical responses. By combining a reasoning model with a natural-sounding response model, you get accurate thinking with polished output.deepseek_plus_claude.py
2. Reasoning Tools
What: Give any model explicit tools for thinking (like a scratchpad or notepad) to work through problems step-by-step. How it works: You provide tools likethink() and analyze() that let the agent explicitly structure its reasoning process. The agent calls these tools to organize its thoughts before responding.
Best for:
- Adding reasoning to non-reasoning models (like regular GPT-4o or Claude 3.5 Sonnet)
- When you want visibility into the reasoning process
- Tasks that benefit from structured thinking (research, analysis, planning)
claude_reasoning_tools.py
3. Reasoning Agents
What: Transform any regular model into a reasoning system through structured chain-of-thought processing via prompt engineering. How it works: Setreasoning=True on any agent. Agno creates a separate reasoning agent that uses your same model (not a different one) but with specialized prompting to force step-by-step thinking, tool use, and self-validation. Works best with non-reasoning models like gpt-4o or Claude Sonnet. With reasoning models like gpt-5-mini, you’re usually better off using them directly.
Best for:
- Transforming regular models into reasoning systems
- Complex tasks requiring multiple sequential tool calls
- When you need automated chain-of-thought with iteration and self-correction
reasoning_agent.py
Choosing the Right Approach
Here’s how the three approaches compare:| Approach | Transparency | Best Use Case | Model Requirements |
|---|---|---|---|
| Reasoning Models | Continuous (full reasoning trace) | Single-shot complex problems | Requires reasoning-capable models |
| Reasoning Tools | Structured (explicit step-by-step) | Structured research & analysis | Works with any model |
| Reasoning Agents | Iterative (agent interactions) | Multi-step tool-based tasks | Works with any model |