Low-Latency Decision Models for Browser Agents: Faster and Cheaper Web Automation
This article explains how to speed up and reduce the cost of browser agents by moving per-step decisions from general-purpose LLMs to small, specialized decision models. It covers a two-tier System 1 / System 2 design, four reusable techniques for reaching sub-second latency, why success rate alone is misleading in agent evaluation, and a practical checklist for moving from demo to production.
1. The Problem: Agents Stall When Every Step Takes Too Long to Think
Over the past two years, agents have moved from demos into production, and the bottleneck has shifted from “can it talk” to “is each decision fast, stable, and cheap enough.” The tension is especially sharp in web operation scenarios. A task that looks simple, such as “filter the event list for options that fit a budget and a commuting-distance limit,” often involves dozens of page observations and action choices. If every step calls a general-purpose LLM for reasoning, latency and cost accumulate linearly along the task chain.
The phenomenon described in the source material is common: an open-source decision model has a median response time of about 94 ms on a public request set and can be served on a single GPU; on the same filtering challenge, it finished in 2.6 s while a general flagship model took about 14.96 s; it also maintained relatively high accuracy on single-item judgments with hundreds of candidate options. What these numbers really show is not that one model is “stronger,” but an engineering route: pushing an agent’s decision step down from a general-purpose LLM to a specialized small model.
Setting aside specific product attributes, this reduces to three general technical propositions:
- High decision frequency: every web step must decide “where to click, whether the task is done, what to do next.”
- Large candidate space: a page often has dozens or even hundreds of interactive elements, requiring comparison of up to 255 candidates at once.
- Hard experience thresholds: users accept not only a success rate, but also total elapsed time and cost per task.
2. Splitting Fast and Slow: Engineering System 1 and System 2
A common industry approach is to split the agent into two layers. System 1 handles high-frequency, pattern-based quick judgments; System 2 handles low-frequency slow thinking that requires planning and reflection. For a web operation framework, responsibilities can be divided as follows:
| Layer | Trigger frequency | Typical responsibilities | Model form |
|---|---|---|---|
| System 1 | Every step | Choose the next action, judge whether the task is complete | Small-parameter decision model |
| System 2 | Key nodes / on failure | Task decomposition, exception recovery, strategy rewriting | General-purpose LLM |
The benefit of this layering comes from changing the call structure, not from improving a single point. Suppose a task needs 40 decision steps on average. If every step calls the slow-thinking model, both cost and latency are 40x. If slow thinking is called only 3 times, at step 1, on failure retries, and at the finish, while the other 37 steps go to the fast decision model, the overall overhead can drop by an order of magnitude.
The scheduling logic is shown schematically below (pseudocode, expressing only the layering idea):
def run_task(goal, page):plan = slow_model.plan(goal) # System 2: low-frequency planningfor step in range(MAX_STEPS):obs = page.observe() # Structured page observationcandidates = trim(obs.elements) # Candidate trimming to control decision spaceact = fast_model.decide(plan, candidates) # System 1: high-frequency decisionsif act.type == "finish":return page.result()if act.type == "ask":plan = slow_model.replan(goal, page) # Escalate on failure or ambiguitypage.apply(act)return slow_model.take_over(goal, page) # Fallback
Three engineering points need attention. First, candidate trimming must be conservative: it is better to keep borderline elements than to miss the correct target. Second, escalation to slow thinking needs clear trigger conditions, such as low confidence for two consecutive steps, an action error, or a sudden page structure change. Third, what is passed between the two layers should be structured state rather than natural language, to avoid extra latency from parsing ambiguity.
3. Pushing Latency to the Hundred-Millisecond Range: Four Reusable Techniques
Getting decisions into the “blink of an eye” range requires handling overhead on both the model side and the system side.
Narrow the decision task. General conversation requires the model to cover open-ended semantics, but the output space of action decisions is closed: action types are limited (click, type, scroll, select, finish), and parameters come from page elements. Short outputs and strong constraints naturally suit small models and constrained decoding.
Structure the candidate set. Convert the page observation into a numbered candidate list and have the model output IDs instead of free text, which significantly reduces generation length and parsing cost:
{"observation": "step=7, url_pattern=/events, elements=42","candidates": [{"id": 12, "role": "button", "text": "Next page"},{"id": 19, "role": "link", "text": "Free entry"},{"id": 27, "role": "checkbox", "text": "Under 50 USD"}],"action_schema": ["click(id)", "check(id)", "scroll(dir)", "finish(reason)"]}
Batching and concurrency. Median latency on a public request set is usually measured under concurrent load, and single-GPU serving means you need sensible batch scheduling, request queue limits, and timeout fallback policies. Break the latency budget into four segments, “queueing + prefill + decode + network,” and set a threshold for each.
Calibration and confidence. A decision model must output usable confidence to drive “when to escalate to slow thinking.” The source material mentions a calibration error of about 2.3%. The engineering meaning is that when confidence falls below a threshold, control is handed to the upper layer, compressing slow-thinking calls to a few key steps.
4. Evaluation Criteria: Why “Average Success Rate” Misleads
The most noteworthy part of the source material for developers is the difference in evaluation conditions: one side ran 3 times averaged over the full set of 102 tasks, while the other ran only 1 time on 38 tasks; and when the success rate was relaxed to 80%, with an experience speed requirement within 250 s and a cost within 0.15 USD, no other record on the leaderboard met all of them simultaneously.
This suggests that agent evaluation must consider four dimensions together, not success rate alone:
- Success rate: whether the task is truly complete, verified by both human review and rules.
- Latency: report P50 and P90 together; averages hide the long tail.
- Cost: accumulate model call cost per task, not price per token.
- Stability: variance across repeated runs, reflecting whether the strategy is fragile.
A practical self-built evaluation table structure is as follows:
| Task ID | Success rate (3 runs) | P50 time | P90 time | Cost per task | Human review |
|---|---|---|---|---|---|
| T-001 | 3/3 | 180s | 240s | 0.09 | Pass |
| T-002 | 2/3 | 260s | 310s | 0.14 | Partial pass |
Only when records within the “usable experience range” (for example, success rate ≥ 80%, time ≤ 250 s, cost ≤ 0.15 USD) are counted separately do selection conclusions have production meaning.
5. Implementation Advice: A Checklist from Demo to Production
- Do candidate trimming and action-space closure first, then consider switching models; most latency problems come from overly long outputs and parsing ambiguity.
- Build a latency budget table that defines queueing, inference, and network limits for each step, and fall back when a limit is exceeded.
- Set confidence thresholds and escalation paths for the decision model, leaving slow thinking for planning and exception recovery.
- Watch for page structure changes and maintain stable element locators to avoid fragile selectors that amplify retry costs.
- Use the full task set, repeated runs, and four-dimensional reporting for evaluation; reject single-metric rankings.
- If using cloud resources, you can combine a container platform to host inference services, object storage to save run traces, and logging and monitoring with alerts to track P90 latency and failure rate, forming a closed-loop optimization.
6. Conclusion
“Fast, accurate, and cheap” is not an impossible triangle, provided you split the agent into fast and slow layers, narrow decisions into high-frequency judgments in a closed space, and measure real experience with strict criteria. For developers, the most valuable takeaway is not any model’s score, but this reusable engineering method: trim candidates, constrain outputs, schedule in layers, and evaluate on four dimensions.
