Agent JIT Compilation for Latency-Optimizing Web Agent Planning and Scheduling

Caleb Winston, Ron Yifeng Wang, Azalia Mirhoseini, Christos Kozyrakis
Proceedings of the 43rd International Conference on Machine Learning, PMLR 306:135161-135186, 2026.

Abstract

Computer-use agents (CUAs) automate tasks specified with natural language such as "order the cheapest item from Taco Bell" by generating sequences of calls to tools such as click, type, and scroll on a browser. Current implementations follow a sequential fetch-screenshot-execute loop where each iteration requires an LLM call, resulting in high latency and frequent errors from incorrect tool use. We present agent just-in-time (JIT) compilation, a system that compiles task descriptions directly into executable code that may include LLM calls, tool calls, and parallelization. Our approach comprises three components: (1) JIT-Planner, which generates multiple code plans, validates each against tool specifications, and selects the minimum-cost candidate; (2) JIT-Scheduler, which explores parallelization strategies via Monte Carlo cost estimation from learned latency distributions; and (3) an invariant-enforcing tool protocol specifying precondition and postcondition requirements to reduce the rate of incorrect tool use. Across five applications, JIT-Planner achieves $10.4\times$ speedup and 28% higher accuracy over Browser-Use, while JIT-Scheduler achieves $2.4\times$ speedup and 9% higher accuracy over OpenAI CUA.

Cite this Paper


BibTeX
@InProceedings{pmlr-v306-winston26b, title = {Agent {JIT} Compilation for Latency-Optimizing Web Agent Planning and Scheduling}, author = {Winston, Caleb and Wang, Ron Yifeng and Mirhoseini, Azalia and Kozyrakis, Christos}, booktitle = {Proceedings of the 43rd International Conference on Machine Learning}, pages = {135161--135186}, year = {2026}, editor = {Zhang, Tong and Dudik, Miroslav and Jaggi, Martin and Agarwal, Alekh and Li, Sharon and Schuurmans, Dale and Zhu, Jerry and Berkenkamp, Felix and Dong, Hanze and Bietti, Alberto}, volume = {306}, series = {Proceedings of Machine Learning Research}, month = {06--11 Jul}, publisher = {PMLR}, pdf = {https://raw.githubusercontent.com/mlresearch/v306/main/assets/winston26b/winston26b.pdf}, url = {https://proceedings.mlr.press/v306/winston26b.html}, abstract = {Computer-use agents (CUAs) automate tasks specified with natural language such as "order the cheapest item from Taco Bell" by generating sequences of calls to tools such as click, type, and scroll on a browser. Current implementations follow a sequential fetch-screenshot-execute loop where each iteration requires an LLM call, resulting in high latency and frequent errors from incorrect tool use. We present agent just-in-time (JIT) compilation, a system that compiles task descriptions directly into executable code that may include LLM calls, tool calls, and parallelization. Our approach comprises three components: (1) JIT-Planner, which generates multiple code plans, validates each against tool specifications, and selects the minimum-cost candidate; (2) JIT-Scheduler, which explores parallelization strategies via Monte Carlo cost estimation from learned latency distributions; and (3) an invariant-enforcing tool protocol specifying precondition and postcondition requirements to reduce the rate of incorrect tool use. Across five applications, JIT-Planner achieves $10.4\times$ speedup and 28% higher accuracy over Browser-Use, while JIT-Scheduler achieves $2.4\times$ speedup and 9% higher accuracy over OpenAI CUA.} }
Endnote
%0 Conference Paper %T Agent JIT Compilation for Latency-Optimizing Web Agent Planning and Scheduling %A Caleb Winston %A Ron Yifeng Wang %A Azalia Mirhoseini %A Christos Kozyrakis %B Proceedings of the 43rd International Conference on Machine Learning %C Proceedings of Machine Learning Research %D 2026 %E Tong Zhang %E Miroslav Dudik %E Martin Jaggi %E Alekh Agarwal %E Sharon Li %E Dale Schuurmans %E Jerry Zhu %E Felix Berkenkamp %E Hanze Dong %E Alberto Bietti %F pmlr-v306-winston26b %I PMLR %P 135161--135186 %U https://proceedings.mlr.press/v306/winston26b.html %V 306 %X Computer-use agents (CUAs) automate tasks specified with natural language such as "order the cheapest item from Taco Bell" by generating sequences of calls to tools such as click, type, and scroll on a browser. Current implementations follow a sequential fetch-screenshot-execute loop where each iteration requires an LLM call, resulting in high latency and frequent errors from incorrect tool use. We present agent just-in-time (JIT) compilation, a system that compiles task descriptions directly into executable code that may include LLM calls, tool calls, and parallelization. Our approach comprises three components: (1) JIT-Planner, which generates multiple code plans, validates each against tool specifications, and selects the minimum-cost candidate; (2) JIT-Scheduler, which explores parallelization strategies via Monte Carlo cost estimation from learned latency distributions; and (3) an invariant-enforcing tool protocol specifying precondition and postcondition requirements to reduce the rate of incorrect tool use. Across five applications, JIT-Planner achieves $10.4\times$ speedup and 28% higher accuracy over Browser-Use, while JIT-Scheduler achieves $2.4\times$ speedup and 9% higher accuracy over OpenAI CUA.
APA
Winston, C., Wang, R.Y., Mirhoseini, A. & Kozyrakis, C.. (2026). Agent JIT Compilation for Latency-Optimizing Web Agent Planning and Scheduling. Proceedings of the 43rd International Conference on Machine Learning, in Proceedings of Machine Learning Research 306:135161-135186 Available from https://proceedings.mlr.press/v306/winston26b.html.

Related Material