Quick Use
pip install agno anthropic duckduckgo-search- Create an Agent with
reasoning=Trueplus tools - Call
agent.print_response(query, show_full_reasoning=True)to see each step
Intro
Agno Reasoning is the built-in chain-of-thought + tool-use loop. Set reasoning=True on any Agno Agent — internally Agno runs a plan-act-reflect cycle, calls tools, and returns the final answer plus an audit trail of every step. Best for: production agents where you need explainable answers, not just outputs. Works with: Agno 1.0+, any LLM via LiteLLM. Setup time: 1 minute.
Enable reasoning
from agno.agent import Agent
from agno.models.anthropic import Claude
from agno.tools.duckduckgo import DuckDuckGoTools
from agno.tools.calculator import CalculatorTools
agent = Agent(
model=Claude(id="claude-3-5-sonnet-20241022"),
tools=[DuckDuckGoTools(), CalculatorTools()],
reasoning=True,
reasoning_min_steps=3, # take at least 3 reasoning steps
reasoning_max_steps=10, # cap to prevent runaway
show_tool_calls=True,
markdown=True,
)
agent.print_response(
"Compare the energy density of LFP and NMC batteries in Wh/kg, then "
"calculate how many extra km a Tesla Model 3 with NMC vs LFP would get.",
show_full_reasoning=True,
)The output shows each reasoning step:
[Step 1: Plan] I need: (1) energy density of LFP, (2) of NMC, (3) Model 3 weight, (4) calculation.
[Step 2: Search] DuckDuckGoTools(query="LFP battery energy density Wh/kg")
[Step 3: Search] DuckDuckGoTools(query="NMC battery energy density Wh/kg")
[Step 4: Calc] CalculatorTools(...)
[Step 5: Reflect] Numbers consistent. Producing final answer.
Final answer:
- LFP: ~150 Wh/kg
- NMC: ~250 Wh/kg
- Model 3 ~80 km extra range with NMCWhen to enable reasoning vs leave it off
| Use reasoning | Skip reasoning |
|---|---|
| Multi-step research, math, planning | One-shot Q&A |
| Tool-use over 3+ tools | Fixed prompt template |
| Debugging "why did the agent answer X" | Latency-critical chat |
| Compliance / audit needed | Latency < 1s required |
Reasoning adds ~2-10x to runtime depending on reasoning_max_steps, so enable selectively per task class.
FAQ
Q: Is Agno free? A: Yes — Agno is open-source under MPL-2.0. The framework, Agents, Reasoning, Memory, Knowledge are all free. Agno Cloud (managed monitoring) is paid.
Q: Reasoning vs OpenAI o1 — what's the difference? A: o1 is a reasoning model with hidden CoT. Agno Reasoning is a framework feature that wraps any model in an explicit reasoning loop with tool use. You can layer them: use o1 as the model AND enable Agno Reasoning for tool orchestration.
Q: How does this differ from Agno's plain Agent? A: A plain Agent calls tools when the model decides. Reasoning forces a structured plan-act-reflect cycle with min_steps and max_steps you control — better for traceability, slightly higher latency.
Source & Thanks
Built by Agno. Licensed under MPL-2.0.
agno-agi/agno — ⭐ 22,000+