跳到正文
arXiv cs.CL· Julien Piet, Annabella Chow, Yiwei Hou, Muxi Lyu, Sylvie Venuto, Jinhao Zhu, Raluca Ada Popa, David Wagner·· 15 小时前AI 评分52

论文主张网页智能体改用编译-执行范式替代 ReAct

Web Agents Should Adopt the Compile-and-Execute Paradigm

AI 导读

一篇 arXiv 论文认为网页智能体不应默认采用 ReAct,而应先确定任务专属程序再执行,从而限制不可信网页内容对控制流的影响。作者分析 WebArena 后发现全部任务都兼容编译-执行范式,其中 81% 可用纯静态程序完成,无需运行时调用 LLM。论文指出主要障碍在于浏览器工具缺乏类型化接口,click、type、scroll 的含义依赖页面,需要把网站交互升级为任务级 API。

正文 · 原文

View PDF HTML (experimental)

Abstract: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 compile-and-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, sponsored advertisements, and platform-generated recommendations. 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. Compile-and-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 compile-and-execute, while 81% can be completed with a purely static program, without any runtime LLM subroutine. We identify the main barrier to adopting compile-and-execute on the web: For it to work well, tools must map cleanly to semantic actions, with effects known before execution, so a compiler has enough information to emit a program. 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.
Subjects: Cryptography and Security (cs.CR); Artificial Intelligence (cs.AI); Computation and Language (cs.CL); Software Engineering (cs.SE)
Cite as: arXiv:2605.14290 [cs.CR]
  (or arXiv:2605.14290v2 [cs.CR] for this version)
  https://doi.org/10.48550/arXiv.2605.14290

arXiv-issued DOI via DataCite

Submission history

From: Julien Piet [view email]
[v1] Thu, 14 May 2026 02:48:57 UTC (187 KB)
[v2] Fri, 23 Oct 2026 21:29:13 UTC (307 KB)

来源:arXiv cs.CL · arxiv.org