Agent Loop

40 字

Agent Loop

来源: sources/agent-2026-04-generic-agentsources/agent-2026-06-skills-clis-mcp
相关概念: concepts/agent-architecture-metaphorconcepts/harness-architectureconcepts/workflow-system

Agent Loop 是 AI Agent 的基本执行单元:感知(Perceive)→ 规划(Plan)→ 行动(Act)→ 观察(Observe),循环往复直至任务完成或满足终止条件。

要点

  • ReAct、Reflexion、Self-Discover 等 framework 本质上是不同 Agent Loop 的变体
  • 工具调用(Tool Use)把 Loop 从"纯文本思考"扩展为"可改变外部世界"
  • 关键挑战:循环终止条件设计、错误恢复与无限循环的防呆机制

与 OpenClaw 的关系

OpenClaw 的"Turn"机制与"cron!/heartbeat 触发器本质上都是 Agent Loop 的工程化封装,把单轮对话扩展为可持续运转的自主循环。