Workflows2026年5月7日·1 分钟阅读

Agno Reasoning — Built-In Step-by-Step Tool Use

Agno Reasoning gives any Agent built-in chain-of-thought + tool use. Set reasoning=True; the agent plans, calls tools, returns answers with audit.

Agent 就绪

先审查再安装

这个资产需要先审查。复制的指令会要求 Agent dry-run、列出写入项,确认后再继续。

Needs Confirmation · 66/100策略:需确认
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:New
入口
Asset
先审查命令
npx -y tokrepo@latest install 06228dd0-95b8-4e4d-830d-d2a8c16898f1 --target codex

先 dry-run,确认写入项后再运行此命令。

简介

Agno Reasoning 是内置的 chain-of-thought + 工具使用循环。任意 Agno Agent 上设 reasoning=True —— 内部跑「规划-执行-反思」循环、调工具、返回最终答案 + 完整步骤审计。适合需要可解释答案而不只是输出的生产 agent。需要 Agno 1.0+,任意 LLM(走 LiteLLM)。装机时间 1 分钟。


开启 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,    # 至少 3 个推理步
    reasoning_max_steps=10,   # 上限防失控
    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,
)

输出显示每一步推理:

[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 NMC

什么时候开 reasoning vs 关

开 reasoning 不用
多步研究、数学、规划 一次性问答
用 3+ 个工具 固定 prompt 模板
排查"agent 为啥这么答" 延迟敏感聊天
需要合规 / 审计 延迟 < 1s 必需

Reasoning 按 reasoning_max_steps 增加 ~2-10 倍运行时间,按任务类型选择性开启。


FAQ

Q: Agno 免费吗? A: 免费 —— MPL-2.0 开源。框架、Agent、Reasoning、记忆、知识全免费。Agno Cloud(托管监控)付费。

Q: Reasoning 跟 OpenAI o1 啥区别? A: o1 是推理模型,CoT 是隐藏的。Agno Reasoning 是框架特性,把任何模型包进显式推理循环 + 工具使用。可以叠加:用 o1 当模型 + 开 Agno Reasoning 做工具编排。

Q: 跟普通 Agent 啥区别? A: 普通 Agent 在模型决定时才调工具。Reasoning 强制结构化的「规划-执行-反思」循环,min_steps 和 max_steps 你控制 —— 可追踪性更好,延迟略高。


🙏

来源与感谢

Built by Agno. Licensed under MPL-2.0.

agno-agi/agno — ⭐ 22,000+

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产