建议网页智能体改用先规划后执行,更安全可靠。
Web Agents Should Adopt the Plan-Then-Execute Paradigm

- 先制定完整计划再执行,避免动态决策受污染数据干扰
- 80%网页任务可纯编程完成,无需运行时大模型介入
- 需构建类型化接口,把点击输入转化为可预测的任务操作
ReAct已成为大模型智能体的默认架构,但本文认为这对网页智能体并不合适。建议采用‘先规划后执行’范式:在观察网页内容前就确定特定任务的程序,再执行。原因是网页内容来自多方混合信息,如电商页面包含卖家信息、用户评论和广告。在ReAct模式下,这些内容会直接干扰模型的下一步决策,易引发提示注入攻击。而计划-执行模式将边界转移:不可信数据只能影响预设执行图中的值或分支,无法改变任务目标或生成新动作。分析WebArena基准发现,所有任务都兼容该范式,其中80%可完全通过程序化计划实现,无需运行时调用大模型。当前主要障碍在于工具与语义动作不匹配:浏览器操作(如点击、输入)含义依赖页面上下文,导致规划视野受限。解决之道是建立类型化接口,将网页交互从点击/输入转化为可预知的任务级操作。这属于基础设施问题,而非模型设计问题。网页任务本就不需要默认的反应式能力,而是需要可预测、完整、可审计的网站接口。
原文摘要 · Abstract (English)
ReAct has become the default architecture across LLM agents, and many existing web agents follow this paradigm. We argue that it is the wrong default for web agents. Instead, web agents should default to plan-then-execute: commit to a task-specific program before observing runtime web content, then execute it. The reason is that web content mixes inputs from many parties. An e-commerce product page may combine a seller's listing, customer reviews and sponsored advertisements. Under ReAct, all of this content flows into the model when deciding on the next action, creating a direct path for prompt injections to steer the agent's control flow. Plan-then-execute changes this boundary: untrusted data may influence values or branches inside a predefined execution graph, but it cannot redefine the user task or cause the model to synthesize new actions at runtime. We analyze WebArena, a popular web agent benchmark, and find that all tasks are compatible with plan-then-execute, while 80% can be completed with a purely programmatic plan, without any runtime LLM subroutine. We identify the main barrier to adopting plan-then-execute on the web: For it to work well, tools must map cleanly to semantic actions, with effects known before execution, so agents have enough information to plan. The web does not naturally expose that interface. Browser tools such as click, type, and scroll have page-dependent meanings. Planning at this layer is near-sighted: the agent can only see actions on the current page, and later actions appear only after it acts. Closing this gap requires typed interfaces that turn website interactions from clicks and keystrokes to task-level operations. This is an infrastructure problem, not a modeling problem. Web tasks do not need reactivity by default; they need typed, complete, auditable website APIs.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。