Low-Latency Browser Agents with Lightweight Decision Models
Why browser agents stall on latency and cost, how a System 1 and System 2 split assigns fast decisions to a small model, and what training, deployment, and evaluation choices keep accuracy, speed, and spend in balance.
1. Why browser agents need a dedicated decision model
Browser agents are one of the most widely deployed forms of general-purpose agents. Form filling, price comparison, information filtering, and multi-step actions all depend on them. Teams that have actually shipped them know the design usually fails in two places:
- Responses are too slow. A general-purpose large model may reason well, but every step—which button to click, whether the task is done, which tool to call—still runs through a long reasoning chain. A single step can take several seconds, sometimes more than ten. Users are looking at a real browser, and waiting breaks the experience.
- Cost is too high. A task can require dozens of decisions. If every step calls a flagship model, model spend for one task can reach several yuan or more. At scale, that is unacceptable.
The underlying issue is that most decisions during agent execution are discriminative, not generative. Choosing the next element to click is classification and ranking over a finite candidate set. It does not require long-form text generation. Using a large generative model for classification wastes compute and slows the loop.
Recent practice has a clear pattern: train a small decision model only for the execution stage, and let a larger model handle planning and reflection. The small model is not optimized for broad knowledge. It is optimized for three things—low latency, high accuracy, and strong calibration, meaning its confidence scores are trustworthy enough for the layer above to fall back when needed.
2. System 1 + System 2: an engineering split
The dual-process idea from cognitive science is widely borrowed for agent design: System 1 handles fast intuitive responses, and System 2 handles slower, deeper reasoning. On a browser agent, that split maps cleanly.
2.1 System 2: planning and reflection
A general-purpose large model owns this layer. It is responsible for:
- Task understanding and decomposition: turning “find 10 leisure spots that match these conditions” into subgoals such as search, filter, and summarize;
- Exception handling: adjusting strategy when the page structure changes, a dialog blocks the flow, or the login state expires;
- Result verification: a final check when the task ends, so a superficially finished run is not treated as success.
This layer is called infrequently and can tolerate higher latency.
2.2 System 1: action decisions
A dedicated decision model owns the atomic judgment on every step:
- Action selection: given the current page snapshot (a DOM sequence, a list of interactive elements, and visual features), pick the best action from the candidates;
- Completion check: decide whether the current page already meets the termination condition;
- Tool routing: when dozens of tools are available, quickly select the one that best matches the current intent.
This layer is called constantly and must respond in the hundreds of milliseconds.
2.3 Architecture sketch
User task│▼[System 2 planner] ←→ [Reflection / exception handling]│ subgoals / termination check▼[System 1 decider] ──→ actions a1, a2, ... an│ │▼ ▼Page executor ──new page state──→ fed back to the decider
The critical design constraint is how state is passed. System 1 input must be compressed into a structured, fixed-length representation—for example, a truncated sequence of element attributes—rather than the raw HTML. That is the first lever for cutting latency.
3. Training and deploying a low-latency decision model
3.1 Data: start from real trajectories
Quality of trajectory data is what makes an action model useful:
- Collect real browser traces that cover high-frequency patterns such as form filling, list filtering, pagination, and multi-tab switching;
- Label each trace as a triple of state, candidate actions, and the correct action. Candidates must include many plausible but wrong distractors, or the model never learns fine distinctions;
- Balance positive and negative samples for termination, so the model does not learn to “never finish” or to stop too early.
3.2 Candidate sets and calibration
A single page state can map to dozens or even hundreds of interactive elements, so the model must discriminate over a large candidate set. Common engineering choices are:
- Encode each candidate action as its own representation and score it against the page-state representation, instead of concatenating every candidate into one context for the model to “read”;
- Emit a normalized confidence score and apply post-processing such as temperature scaling to correct calibration error. If confidence is not trustworthy, System 2 cannot decide when to take over, and the dual-system design stops working.
3.3 Single-GPU serving and inference optimization
These decision models are usually below the tens-of-billions parameter scale. With quantization and inference optimization, one high-end data-center GPU can carry production traffic. Typical optimizations include:
- Weight quantization (for example INT8 or FP8) to cut memory use and memory-bandwidth cost;
- KV cache reuse: across consecutive decisions in the same task, part of the page context can be reused;
- Batch scheduling: agent traffic is naturally short requests at high concurrency, and dynamic batching can raise throughput substantially.
A simplified sketch:
def agent_loop(task):page = browser.open(task.url)plan = system2_model.plan(task, page) # infrequent, slow thinkingwhile not done:state = compress(page) # structured, compressed stateaction = system1_model.decide(state) # frequent, millisecond-scaleif action.confidence < THRESHOLD:action = system2_model.replan(state) # low-confidence fallbackpage = browser.execute(action)done = system1_model.check_terminal(state)return system2_model.verify(task, page)
4. Evaluation: proving a system is fast, accurate, and cheap
Success rate alone is not enough for browser agents. Practice is converging on a multi-metric view:
- Success rate: end-to-end completion on a fixed task set, averaged over multiple runs to reduce randomness;
- Time: average time per task, plus a stricter experience constraint such as finishing within a limit users will accept;
- Cost per task: total model-call spend, which is a hard constraint at scale;
- Pareto frontier: plot success rate, time, and cost together. A strong design should sit where all three constraints are met, not trade one away to improve another.
Public leaderboards often run only part of the tasks and only once. That is not equivalent to a strict internal evaluation on the full set, averaged over multiple runs. When choosing a system, reproduce evaluation on your own workloads instead of relying on leaderboard rank.
5. Practical advice for builders
- Split the layers before you pick models. Do not expect one general-purpose large model to do everything. Separate the agent’s decision path and identify which calls are high-frequency discrimination and which are low-frequency planning.
- Compress state before you scale the model. Latency often comes from how the input is built. A structured, redundancy-free page representation usually helps more than a larger model.
- Drive fallback with confidence. System 1 output must include a trustworthy confidence score. Below the threshold, hand the step to System 2. That is the best balance of stability and cost.
- Build your own evaluation set. Collect tasks from real workloads, cover edge cases, and judge systems on several metrics together rather than on success rate alone.
Competition among browser agents is shifting from “whose model is smarter” to “whose system balances accuracy, speed, and cost.” A dedicated decision model plus a dual-system architecture is a path that has already been shown to work, and it is worth a serious look for any team shipping agents.
