{"id":21012,"library":"browsergym-webarena","title":"BrowserGym WebArena","description":"WebArena benchmark environment for BrowserGym, version 0.14.3. Provides a Gymnasium-compatible environment for evaluating web agents on realistic web interaction tasks.","status":"active","version":"0.14.3","language":"python","source_language":"en","source_url":"https://github.com/ServiceNow/BrowserGym","tags":["webarena","browsergym","web-interface","evaluation","benchmark"],"install":[{"cmd":"pip install browsergym-webarena","lang":"bash","label":"Latest release"}],"dependencies":[{"reason":"Core BrowserGym framework required for all environments","package":"browsergym-core","optional":false},{"reason":"Environment API compatible with Gymnasium","package":"gymnasium","optional":false}],"imports":[{"note":"Package uses dot notation, not underscore","wrong":"from browsergym_webarena import WebArenaEnv","symbol":"WebArenaEnv","correct":"from browsergym.webarena import WebArenaEnv"},{"note":"Tasks are exposed at package level","wrong":"from browsergym.webarena.tasks import ALL_WEBARENA_TASKS","symbol":"ALL_WEBARENA_TASKS","correct":"from browsergym.webarena import ALL_WEBARENA_TASKS"}],"quickstart":{"code":"import gymnasium as gym\nimport browsergym.webarena\n\nenv = gym.make('browsergym/webarena.0', headless=True)\nobs, info = env.reset()\n# run your agent\nenv.close()","lang":"python","description":"Create a WebArena environment and reset it. Use 'headless=True' for servers."},"warnings":[{"fix":"Pull and run the required Docker images as per the WebArena setup instructions before using the environment.","message":"WebArena requires a specific Docker image for the websites. The environment will fail to initialize if the Docker containers are not running.","severity":"breaking","affected_versions":"all"},{"fix":"Use 'browsergym/webarena.<task_id>' where <task_id> is an integer from 0 to 811.","message":"The 'browsergym/webarena' environment ID is deprecated in favor of task-specific IDs like 'browsergym/webarena.0'.","severity":"deprecated","affected_versions":">=0.14.0"},{"fix":"Always access 'obs['screenshot']' or 'obs['text']' appropriately.","message":"The environment returns observations as dictionaries with 'screenshot' (PIL Image), 'text' (str), and other fields. Do not assume it returns a single array.","severity":"gotcha","affected_versions":"all"},{"fix":"Use 'env.close()' after each episode or use context managers.","message":"The environment uses Playwright under the hood. Do not run multiple environments in the same process without proper cleanup, or you may face port conflicts.","severity":"gotcha","affected_versions":"all"},{"fix":"Ensure your agent returns a string action from the 'action_space' (Text space) each step.","message":"WebArena tasks are defined with a specific evaluation function (teardown). The agent must return an action string; otherwise, the evaluation may not work correctly.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run 'pip install browsergym-webarena' and import as 'from browsergym.webarena import ...'","cause":"Package not installed or imported with wrong name.","error":"ModuleNotFoundError: No module named 'browsergym.webarena'"},{"fix":"Use a specific task ID, e.g., 'browsergym/webarena.0'.","cause":"Deprecated environment ID used after version 0.14.0.","error":"gym.error.UnregisteredEnv: Cannot find environment with id 'browsergym/webarena'"},{"fix":"Follow the WebArena setup instructions to start the Docker containers.","cause":"Required Docker services for the benchmark websites are not running.","error":"Error: Docker containers not running. Make sure you have started the WebArena infrastructure."},{"fix":"Convert action to a string before calling 'env.step(action)'.","cause":"Agent returned a non-string action (e.g., a dict or array) to the environment.","error":"TypeError: expected string or bytes-like object"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}