Skip to content

BrowserGym explained: one gym interface for web agent benchmarks

Quick answer

BrowserGym is an open-source, gym-style environment that gives web agents one observation and action interface across many benchmarks, including MiniWoB, WebArena, VisualWebArena and WorkArena. Its companion AgentLab runs experiments in parallel. It is a harness, not a task set.

Author
Published
Last updated

BrowserGym is an open-source environment for web agent research that gives every supported benchmark the same interface. The paper, "The BrowserGym Ecosystem for Web Agent Research", comes from ServiceNow Research with co-authors at Mila, Polytechnique Montréal, Carnegie Mellon University, McGill University, Tel Aviv University, Université de Montréal and iMean AI, and was published in Transactions on Machine Learning Research in 2025 (arXiv 2412.05467).

What problem does BrowserGym solve?

BrowserGym solves the problem that every web benchmark used to come with its own harness, its own page format and its own action syntax. An agent built for one could not run on another without glue code, and results were hard to compare. The paper describes BrowserGym as "a unified, gym-like environment with well-defined observation and action spaces" (BrowserGym abstract).

"Gym-like" refers to the reinforcement learning convention: an environment has a reset() that starts an episode and a step(action) that returns the next observation, a reward and whether the episode is over.

Which benchmarks does BrowserGym include?

BrowserGym includes the main self-hosted and synthetic web benchmarks. The repository lists MiniWoB, WebArena, WebArena-Verified, VisualWebArena, WorkArena, AssistantBench, WebLINX (described as a "static benchmark"), OpenApps, TimeWarp and Knows (BrowserGym repository).

Table: Benchmarks in AgentLab's table, with the step limits it uses

BenchmarkTask templatesMax stepsHosting
WebArena81230Self-hosted with Docker
WebArena-Verified81230Self-hosted
WorkArena L13330Demo instance
WorkArena L234150Demo instance
WorkArena L334150Demo instance
VisualWebArena91030Self-hosted with Docker

Source: AgentLab repository.

What does an agent observe in BrowserGym?

An agent in BrowserGym observes the goal or chat, the open tabs, the raw DOM, the accessibility tree, a screenshot and per-element properties (BrowserGym paper, section 3.1).

Every element gets a "BrowserGym ID (bid), a uniquely-generated, element-wise identifier", along with its bounding box and whether it is visible. The ID lets an agent refer to an element in text and lets the environment find it reliably. A flag turns on set-of-marks, which draws the IDs on the screenshot for vision models.

What actions can an agent take in BrowserGym?

An agent in BrowserGym acts either with high-level commands or with raw code. The paper says: "The fundamental action space of BrowserGym is raw executable Python code", with a "high-level action set" built on top (section 3.2).

  • High-level actions use the element IDs or screen coordinates: click, fill, select an option, scroll, press a key, go to a URL, open or close a tab, send a message to the user.
  • Raw Python runs Playwright code against the page. It is the most flexible option, and it means an agent's output is executed as code, so the environment should run in an isolated sandbox.

How do I install and run BrowserGym?

You install BrowserGym with pip and a Playwright browser, then install the package for each benchmark you want.

  1. Install the core: pip install browsergym, then playwright install chromium.
  2. Install a benchmark package, for example browsergym-workarena for WorkArena (WorkArena repository).
  3. Set up what the benchmark needs. WebArena and VisualWebArena need their self-hosted sites; WorkArena needs a ServiceNow instance.
  4. Create an environment by its ID, call reset(), then loop step(action) until it ends.
  5. Use AgentLab to run many tasks and agents and to collect the results.

The README carries a plain warning worth keeping in mind: "It is not meant to be a consumer product. Use with caution!"

What is AgentLab?

AgentLab is "a complementary framework that aids in agent creation, testing, and analysis" (BrowserGym abstract). It runs experiments in parallel, saves each step, and includes a viewer for inspecting runs. Its README says you can run 10 to 50 jobs in parallel on a single computer (AgentLab repository).

AgentLab also handles benchmark resets. For WebArena it notes that "the instance is automatically reset, a process that takes about 5 minutes", and warns that tasks share state: "an agent on task 323 could alter the instance state, making task 201 impossible".

What did the BrowserGym paper find?

The BrowserGym paper ran six language models on six benchmarks through the same interface. Its main point is methodological: with one harness, differences between models are easier to see because the page format, actions and step limits are held fixed. The authors report that one commercial model family led on most of the six benchmarks.

What caveats does BrowserGym's paper list?

BrowserGym's paper and AgentLab's documentation list caveats that apply to any web agent evaluation.

  1. Resets. "Some benchmarks require resetting the backend web server to a specific state", WebArena and VisualWebArena among them (BrowserGym paper, section 4).
  2. Changing websites. "Websites may update layouts, navigation, or features without notice" (section 5.4.1).
  3. Changing models. AgentLab notes that commercial models may be updated "Even for a fixed version".
  4. Changing instances. WorkArena's demo instance is "mostly fixed in time" but sometimes receives minor modifications.

These are the same reasons a published score can be hard to reproduce. Our guide to reproducing a published agent benchmark score covers how to control them.

Sources (read 2026-11-24)

FAQ

Is BrowserGym a benchmark?

No. It is an environment and interface that wraps existing benchmarks so the same agent can run on all of them. The tasks, sites and scoring come from each wrapped benchmark.

Which benchmarks does BrowserGym support?

The repository lists MiniWoB, WebArena, WebArena-Verified, VisualWebArena, WorkArena, AssistantBench, WebLINX, OpenApps, TimeWarp and Knows, among others.

What is AgentLab?

A companion framework for building, running and analysing web agents on BrowserGym. It runs many jobs in parallel and its README says 10 to 50 jobs can run on a single computer.

Can BrowserGym be used for reinforcement learning?

Yes. It follows the gym pattern of reset, step, observation and reward, so the same environments can feed training loops as well as evaluations.