正在打开每日关注
正在打开每日关注
用触发条件与完成判定拆解四类 Agent Loop,帮助按任务选择自动化程度。
the four types of agent loops. loop engineering keeps getting talked about as one thing. it's actually a choice between four structures, and each one fits a different kind of task. it means designing the system that steers the agent, instead of steering it yourself move by move. that system always answers two questions. what starts a run, and what decides the work is done. in a hand-run session you answer both yourself, every single time. each loop type moves more of that into the system. here's each type, what triggers it, and when to reach for it. 1) turn-based. triggered by a user prompt. the agent gathers context, acts, and checks its work inside a single turn, then a human reviews the output and writes the next prompt. use this when requirements are still forming and every output changes what you'd ask for next. 2) goal-based. triggered by a /goal command carrying success criteria and a budget, like "get the homepage Lighthouse score to 90, stop after 5 tries." when the agent tries to stop, an evaluator model checks whether the goal is met, and a no sends it back to work. use this when the outcome is measurable but the path there isn't worth your attention. 3) time-based. triggered by a clock. an interval fires, the agent runs a fixed prompt like "check the PR, fix CI," then waits for the next tick. /loop runs on your machine, /schedule moves it to the cloud so it survives a closed laptop. use this for recurring work where the task is known in advance and only the timing repeats. 4) proactive. triggered by an event or schedule with no human present. a routine watches a channel, and when something needs handling it spawns a workflow with a triage agent, a fix agent, and a reviewer that adversarially judges the work before the task closes. use this for standing responsibilities where you can't predict what will come in, only that something will. each type hands off one more job than the last. turn-based keeps both with the human, goal-based automates the checking, time-based automates the trigger, and proactive automates both while deciding the workflow shape at runtime. so the mapping question isn't which loop is most advanced. it's whether your task is exploratory, measurable, recurring, or standing. the more you hand off, the less you babysit. I wrote the full breakdown on loop engineering. the article is quoted below.
是什么 这条推文把 Agent Loop 重新定义为一种控制系统设计问题:系统由什么触发,以及由什么判断完成。四种结构并非简单的能力等级,而是把原本由人承担的启动、验收和流程编排逐步交给系统。
核心设计 Turn-Based 保留最高的人类参与度,适合需求尚未成形的探索;Goal-Based 固定成功标准与预算,用评估模型负责验收;Time-Based 固定任务内容,只让时钟负责重复触发;Proactive 同时自动化触发和执行编排,在事件到达后动态串联分诊、修复与审查。其关键抽象是将任务从逐步操作,提升为可声明的目标、策略和退出条件。
关键洞察 选择循环结构应看任务属性,而不是追求最高自治:探索性任务需要反馈,衡量型任务需要可靠评估,重复型任务需要稳定调度,常驻职责需要事件驱动与运行时编排。这种分层也为 Agent 系统的权限、成本、重试、观测和人工接管提供了清晰设计边界。
边界与风险 Goal-Based 依赖可被可靠验证的指标,评估模型可能被结果投机误导;Time-Based 可能因上下文陈旧而重复错误;Proactive 则需要幂等、去重、权限隔离、失败恢复和审查门槛。自治程度越高,越应把停止条件、回滚路径和可观测性作为一等设计对象。