Introduction
Computer-use agents (CUAs) promise to automate complex web tasks specified via natural language, such as ordering food or navigating corporate dashboards. However, current implementations typically rely on a sequential "fetch-screenshot-execute" loop. In this paradigm, every single action—whether a click, type, or scroll—requires sending a screenshot to a Large Language Model (LLM) and waiting for a response. This approach suffers from high latency and brittleness, as agents often hallucinate actions or lose track of proper tool usage sequences.
To address these bottlenecks, researchers introduce Agent JIT Compilation, a system that shifts away from slow, step-by-step LLM reasoning. By "compiling" natural language instructions into optimized, executable code plans and utilizing a cost-aware scheduler, the system achieves up to a 10.4× speedup and significantly higher accuracy than state-of-the-art web agents.
The JIT Architecture
The proposed architecture draws inspiration from traditional Just-In-Time (JIT) compilers and consists of three core components:
1. Invariant-Enforcing Tool Protocol
Instead of relying on generic, low-level actions (like a simple "click"), the system utilizes high-level, reusable "code tools" (e.g., add_to_cart). Each tool is defined with strict preconditions (state requirements before execution) and postconditions (guaranteed outcomes). This protocol allows the system to logically verify a plan's soundness before interacting with the browser, catching 45–50% of common web automation errors during the planning phase.
2. JIT-Planner
When presented with a task, the JIT-Planner generates multiple candidate code plans in parallel. It constructs a Control-Flow Graph (CFG) to statically validate these plans against the tool protocol and estimates their execution cost (latency). The planner then selects the most efficient valid plan. Notably, the planner only needs to rank the relative efficiency of plans rather than predict absolute execution times, enabling a simple yet highly effective cost model.
3. JIT-Scheduler
Once a plan is selected, the JIT-Scheduler determines the optimal execution strategy. Using Monte Carlo cost estimation based on historical latency data, it dynamically chooses among three strategies:
- Serial: Executing steps sequentially.
- Parallel: Running independent subtasks simultaneously (e.g., checking prices across multiple items).
- Hedge: Deploying multiple redundant copies of the same task and accepting the first successful result. This strategy is particularly effective at overcoming high-variance UI elements and "stuck" pages.
Evaluation and Key Results
The system was evaluated on 37 tasks across five web applications from two major benchmarks: REAL (Dashdish, Gomail, Omnizon) and WebArena (GitLab, Reddit). The tasks were curated to test various scheduling strategies.
Performance Highlights: * Massive Speedups: Compared to the standard "Browser-Use" baseline, the JIT-Planner achieved a 10.4× speedup. * Improved Accuracy: The JIT-Planner demonstrated 28% higher accuracy than Browser-Use. When compared to specialized models like the OpenAI CUA, the JIT-Scheduler still provided a 2.4× speedup and 9% higher accuracy. * Protocol Impact: Enforcing the tool protocol reduced the overall plan failure rate from 80% to 43%. * Efficiency Gains: The performance gap between the best and worst valid code plans for a single task was found to be as high as 5.3×, underscoring the necessity of cost-aware planning.
Limitations and Future Directions
While highly effective, Agent JIT Compilation requires a one-time offline "warm-up" period (25–90 minutes per application) to synthesize tools and collect latency data. This makes it highly efficient for repetitive tasks but less ideal for zero-shot visits to novel websites. Additionally, major UI redesigns can break cached tools, requiring the system to detect failures and trigger re-planning.
Future work may explore handling highly adversarial environments (e.g., aggressive bot detectors) and extending the framework beyond the web to desktop and mobile environments using accessibility APIs. By treating agent output as deterministic, compiled code rather than sequential LLM inferences, Agent JIT Compilation represents a significant leap toward fast, reliable, and practical computer-use agents.
Summary updated