WEBSERV: A Browser-Server Environment for Efficient Training of Reinforcement Learning-based Web Agents at Scale

Yuxuan Lu, Jing Huang, Hui Liu, Jiri Gesi, Yan Han, Shihan Fu, Tianqi Zheng, Dakuo Wang

TL;DR

Training reinforcement learning (RL) web agents requires running thousands of parallel rollouts against isolated, responsive web servers—a setup that quickly bottlenecks traditional Docker-based environments. WEBSERV solves this by pairing a lightweight, noise-filtered browser observation/action engine with an Incus- and ZFS-based server manager. The framework cuts container startup latency by ~5× and storage by ~240×, enabling over 200 isolated web server containers to run concurrently on a single host while setting a new state-of-the-art for single-prompt agents on WebArena-Lite.

What Problem Does This Paper Address?

Reinforcement learning for web agents requires exploring environments through high-throughput, parallel rollouts. However, existing browser environments struggle with several core issues:

  1. Context Bloat and Fragility: Passing raw HTML floods language models with non-semantic noise and scripts, while accessibility trees often vary or are incomplete across websites. Furthermore, agents often miss basic visual cues (like pointer cursors) indicating clickability.
  2. Nondeterministic Execution in SPAs: Dynamic Single-Page Applications (SPAs) rarely trigger standard full-page reloads. Hard-coded wait times either cause unnecessary delays or capture partially rendered DOMs.
  3. Severe Infrastructure Bottlenecks: Simulating server-side state (e.g., shopping carts, GitLab repos) with Docker is resource-heavy. Duplicating multi-gigabyte layers on resets saturates disk I/O, preventing the execution of hundreds of parallel, isolated rollouts on one machine. Having agents share a single server instance results in conflicting, non-reproducible states.

Methods

WEBSERV introduces an end-to-end framework targeting both client-side interaction and server-side infrastructure:

  • Compact DOM & Interactivity Parsing: Automatically strips non-visual tags (<script>, <style>, <iframe>), CSS-hidden nodes, and deeply nested <div> wrappers. It preserves human-relied visual affordances by detecting computed styles (e.g., cursor: pointer marks elements as clickable) and monkey-patching addEventListener to identify hoverable components.
  • Semantic Identifiers & Simplified Actions: Interactive targets receive human-readable, hierarchically scoped semantic IDs (e.g., data-semantic-id). Targets are automatically scrolled into view before actions, eliminating the need for explicit scroll operations.
  • Network-Aware Quiescence: Instead of relying on static sleep timers, WEBSERV hooks into browser JavaScript APIs (fetch and XMLHttpRequest) via an activity counter. It returns observations only after network requests have resolved and a short idle threshold (e.g., 500 ms) has passed.
  • Incus & ZFS-Powered Server Management: Replaces standard Docker runtime with Incus (LXC-based) running on a ZFS filesystem. By taking advantage of block-level copy-on-write (CoW), cloning or resetting a container writes only modified data blocks rather than entire file layers, allowing unmodified OCI/Docker images to launch and checkpoint almost instantaneously.
  • Human Oversight Tools: Features a web-based replayer for trajectory reproduction and a real-time execution preview that visually highlights targeted elements before execution.

Datasets

The authors evaluate WEBSERV on the WebArena-Lite benchmark across three representative web environments:

  • Shopping: An e-commerce platform based on open-source storefronts.
  • CMS: Content management and blogging platforms.
  • GitLab: Code repository management and collaborative workflows.

No new datasets were introduced; instead, the authors packaged existing WebArena workloads into their scalable backend.

Key Insights and Ideas

  • The Real Scalability Bottleneck is Disk I/O, Not Memory: Docker’s overlay filesystem duplicates entire modified files on resets, bottlenecking disk write bandwidth during parallel rollouts. Block-level CoW through ZFS reduces writes to tiny metadata updates (~28 MiB per container), transforming initialization from a disk-bound delay into a memory-cached snapshot lookup.
  • Subtle Visual Cues Beat Heavy Multimodal Models: Rather than processing raw screenshot pixels—which inflates inference costs—simply surfacing computed CSS cursor states (cursor: pointer) gives text-only LLMs the necessary affordance clues to avoid clicking dead text.
  • Auto-Scrolling Simplifies Policy Search: Explicit scrolling actions introduce noisy branching in the policy space. Delegating viewport positioning to the environment lets the agent focus purely on high-level goal actions.

Key Results

  • Container Infrastructure Efficiency (AWS r6id.metal instance):
  • Launch Latency: Reduced from 8.96 s (naïve Docker) to 1.78 s (~5× speedup).
  • Storage Footprint: Dropped from 6.78 GiB down to 28.01 MiB per container (~240× reduction).
  • Concurrency: Sustained 200+ isolated concurrent containers on a single host with comparable RAM footprint (1.74 GiB vs. 1.63 GiB per container).
  • Task Performance on WebArena-Lite:
  • Paired with Claude 4.5 Sonnet, WEBSERV established a new state-of-the-art for single-prompt agents, achieving 46.7% on Shopping, 34.3% on CMS, and 40.0% on GitLab.
  • It significantly outperformed prior single-prompt baselines (e.g., GPT-4o at 11.1% on Shopping, 20.0% on CMS, 10.0% on GitLab) and achieved competitive performance against multi-prompt systems (SteP) and complex reasoning models (OpenAI-o3).

Limitations and Future Work

  • Text-Only Modality: Operates strictly on pruned DOM representations and metadata. It cannot process visual information such as image contents, colors, or visual charts.
  • Loss of 2D Spatial Layout: Flattens spatial structures; for example, CSS grid or flexbox item arrangements become a flat list, stripping layout context (e.g., line wraps, horizontal alignment) that human users intuitively rely upon.

Summary updated

BibTeX
@inproceedings{lu2025webserv,
  author = {Yuxuan Lu and Jing Huang and Hui Liu and Jiri Gesi and Yan Han and Shihan Fu and Tianqi Zheng and Dakuo Wang},
  title = {{WEBSERV: A Browser-Server Environment for Efficient Training of Reinforcement Learning-based Web Agents at Scale}},
  booktitle = {MTI-LLM @ NeurIPS},
  year = {2025},
  url = {https://openreview.net/forum?id=YHcHQY8TIY},
}
Figure