Agentic Compilation: New Research Cuts LLM Web Automation Costs by 99%
Key Takeaways
- ▸Agentic Compilation reduces per-execution costs from ~$15–$150 to under $0.10 by generating a deterministic JSON workflow in a single LLM call, rather than querying the model repeatedly
- ▸Cost scaling shifts from O(M × N) to O(1), meaning inference cost is independent of the number of reruns and sequential actions—addressing the 'Rerun Crisis'
- ▸Zero-shot success rates of 80–94% with minimal Human-in-the-Loop patching achieve near-100% reliability, balancing automation and accuracy
Summary
A new research paper proposes 'Agentic Compilation,' a paradigm shift in how LLM-driven web agents execute repetitive tasks. Traditional approaches—continuous inference loops that repeatedly query an LLM to evaluate browser state and select actions—suffer from what researchers term the 'Rerun Crisis': token expenditure and API latency scale linearly with execution frequency. For a 5-step workflow executed 500 times, this approach costs approximately $150, or roughly $15 even with aggressive caching.
The proposed Compile-and-Execute architecture decouples LLM reasoning from runtime execution. A single upfront LLM invocation processes a token-efficient semantic representation generated by a DOM Sanitization Module and emits a deterministic JSON workflow blueprint. A lightweight runtime then autonomously executes the workflow against the browser without further model queries. This reduces cost scaling from O(M × N)—where M is the number of reruns and N is sequential actions—to amortized O(1), dropping per-workflow inference to under $0.10.
Empirical evaluation across data extraction, form filling, and fingerprinting tasks achieves zero-shot compilation success rates of 80–94%. The modularity of the JSON intermediate representation enables minimal Human-in-the-Loop (HITL) intervention to reach near-100% reliability. Tested across five frontier models, per-compilation costs range from $0.002 to $0.092, establishing deterministic compilation as economically viable for automation at scales previously infeasible.
- At $0.002–$0.092 per compilation, the approach enables economically viable automation for repetitive tasks that were previously cost-prohibitive
Editorial Opinion
This work tackles a genuine bottleneck in production agentic AI: the escalating cost of iterative inference. The insight that LLM-driven agents don't require continuous model querying—that a single compilation step can generate reliable execution blueprints—is elegant and practical. A 99% cost reduction is striking, but the deeper contribution is architectural: it inverts the paradigm from 'loop and query' to 'compile once, execute many.' As agentic systems move from research to enterprise deployment, this pattern could become foundational to production infrastructure.



