about
Agentic Compilation: Reducing LLM Rerun Costs (arxiv.org)
3 points by rebekkamikkoa 133 days ago | hide | past | pdf | discuss on HN

In plain words: Instead of asking a language model to choose each action on every run, this system asks it once for a script that a small program replays in the browser. For 500 runs of a 5-step task, cost fell from about $150 to under $0.10.

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

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.

Jagadeesh Chundru
arXiv:2604.09718 · cs.DC, cs.AI, cs.PL · submitted Apr 8, 2026 · updated Apr 25, 2026
abstract · pdf · html · 12 pages, 4 figures, 2 tables. v2: Expanded literature review and clarified architecture limitations

add comment on HN
Also discussed: Jun 2026 (3 points, 0 comments)