arXiv:2604.09718cs.DCcs.AI2026-04被引 1

用一次推理生成可重复执行的自动化脚本,大幅降低网页自动化成本

Agentic Compilation: Mitigating the LLM Rerun Crisis for Minimized-Inference-Cost Web Automation

  • 将大模型推理与浏览器执行分离,一次生成可执行的JSON流程图
  • 500次任务执行成本从150美元降至不到0.1美元,节省超99%
  • 支持人工少量修正,适合需要高可靠性的批量自动化场景

基于大模型的网页自动化代理在持续推理循环中面临根本性扩展瓶颈:执行频率越高,令牌消耗和接口延迟线性增长。针对5步工作流执行500次,连续代理耗资约150.00美元,即使使用激进缓存也仍接近15.00美元。我们提出编译-执行架构,将大模型推理与浏览器执行解耦,使单个工作流的推理成本降至0.10美元以下。一次大模型调用处理由DOM净化模块(DSM)生成的语义紧凑表示,输出确定性JSON工作流蓝图;轻量级运行时无需进一步模型查询即可驱动浏览器。形式化证明该方案将推理复杂度从O(M×N)降低至摊销O(1),其中M为重试次数,N为序列动作数。跨数据提取、表单填写和指纹识别任务的实证评估显示,零样本编译成功率达80%-94%。关键在于JSON中间表示的模块化设计,支持极小规模人机协同修复,使执行可靠性提升至近100%。在五种前沿模型上,单次编译成本介于0.002至0.092美元之间,确立了确定性编译作为实现此前不可行的大规模经济型自动化的范式。

原文摘要 · Abstract (English)

LLM-driven web agents operating through continuous inference loops -- repeatedly querying a model to evaluate browser state and select actions -- exhibit a fundamental scalability constraint for repetitive tasks. We characterize this as the Rerun Crisis: the linear growth of token expenditure and API latency relative to execution frequency. For a 5-step workflow over 500 iterations, a continuous agent incurs approximately 150.00 USD in inference costs; even with aggressive caching, this remains near 15.00 USD. We propose a Compile-and-Execute architecture that decouples LLM reasoning from browser execution, reducing per-workflow inference cost to under 0.10 USD. A one-shot LLM invocation processes a token-efficient semantic representation from a DOM Sanitization Module (DSM) and emits a deterministic JSON workflow blueprint. A lightweight runtime then drives the browser without further model queries. We formalize this cost reduction from O(M x N) to amortized O(1) inference scaling, where M is the number of reruns and N is the sequential actions. Empirical evaluation across data extraction, form filling, and fingerprinting tasks yields zero-shot compilation success rates of 80-94%. Crucially, the modularity of the JSON intermediate representation allows minimal Human-in-the-Loop (HITL) patching to elevate execution reliability to near-100%. At per-compilation costs between 0.002 USD and 0.092 USD across five frontier models, these results establish deterministic compilation as a paradigm enabling economically viable automation at scales previously infeasible under continuous architectures.

网页自动化推理优化成本控制

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。