The news. On June 16, 2026, researchers released PreAct, a method that lets a computer-using agent speed up on tasks it has done before. It compiles a successful run into a lightweight state-machine program — screen checks plus click actions — and replays it directly, with no model call per step, for an 8.5–13× speedup. Each program is validated by an independent check before it is stored, and the method reports 1.75–2.6 more completed tasks per benchmark across mobile, desktop, and web; when no stored program matches, PreAct falls back to fresh exploration. Read the paper →

Picture an agent that just nailed a fiddly screen workflow — open the app, tap through three menus, fill a form, hit submit. It figured out every click by asking the model what to do at each step. The result was right, but watch where the time went: the slow part was never the clicking; it was asking the model what to click at every single step. Run the same task again tomorrow and a normal think-act loop pays the identical bill — another full sequence of model calls for a task it has already solved.

PreAct's move is to record that run as a screen macro. It compiles the successful trajectory into a state-machine program — a fixed list of check the screen, then click steps — and replays it straight through, with no model in the loop. The macro is not blind: before each action it validates that the screen matches what it expects, so it catches a moved button instead of clicking into the void. This is the agent version of memoization — but it caches the plan, not just the final answer.

A recorded macro is brittle the moment the screen drifts, so PreAct guards it at two points. Before a program is ever stored, an independent check confirms it actually completes the task — a bad recording never makes it into the library. And at replay time, every node revalidates the screen before firing; a mismatch hands control straight back to the model to solve the step live, then carries on. So the speedup only ever applies where it is safe, and an unfamiliar screen quietly reverts to exploration.

ModeModel call per step?SpeedWhen it runs
First run (ReAct-style)Yes — one per actionBaselineA new or unseen task
Replay (compiled program)No~8.5–13× faster (paper, varies by benchmark)A task with a stored, validated program
FallbackYesBaselineThe screen no longer matches the program

Put the cost on a clock. Say a workflow takes 12 GUI steps. The first time, the agent makes roughly 12 model calls — one per step — and each call adds latency and burns tokens. On a repeat, PreAct replays the compiled program: 12 screen-checks and 12 clicks, zero model calls. If the per-step model call is what dominates wall-clock time — which, for a GUI agent, it usually is — then collapsing those per-step calls toward zero is the main intuition behind the paper's 8.5–13× speedup (the 12-step figure is illustrative; the 8.5–13× is the paper's). What you buy back is not just speed: across mobile, desktop, and web benchmarks PreAct also completes 1.75–2.6 more tasks, because a vetted program runs the same way every time instead of re-rolling the dice on each step.

Goes deeper in: Agent Engineering → Cost & Latency Engineering → Result caching

Related explainers

Frequently Asked Questions