{"id":21014,"library":"browsergym","title":"BrowserGym","description":"BrowserGym is a Gymnasium-compatible environment for web task automation in Chromium. It provides a standardized interface for training and evaluating AI agents on web tasks, supporting both human demonstrations and automated interactions. Version 0.14.3 requires Python >3.10, with frequent releases.","status":"active","version":"0.14.3","language":"python","source_language":"en","source_url":"https://github.com/ServiceNow/BrowserGym","tags":["reinforcement-learning","gym","web-automation","chromium","benchmark"],"install":[{"cmd":"pip install browsergym","lang":"bash","label":"Latest stable release"}],"dependencies":[{"reason":"Core dependency for the Gym environment API","package":"gymnasium","optional":false},{"reason":"Underlying browser automation (Chromium)","package":"playwright","optional":false},{"reason":"Optional: MiniWoB++ benchmark tasks","package":"miniwob","optional":true}],"imports":[{"note":"make is the main entry point; importing the module directly is not sufficient to create environments.","wrong":"import browsergym","symbol":"make","correct":"from browsergym import make"}],"quickstart":{"code":"from browsergym import make\nimport gymnasium as gym\n\ntask = 'browsergym/miniwob.click-test'\nenv = make(task, headless=True)\nobs, info = env.reset()\n# Execute a simple action (e.g., click at coordinates)\naction = {\n    \"action\": \"click\",\n    \"x\": 100,\n    \"y\": 100\n}\nobs, reward, terminated, truncated, info = env.step(action)\nprint(f\"Reward: {reward}\")\nenv.close()","lang":"python","description":"Creates a MiniWoB 'click-test' environment, resets it, performs a click action, and prints the reward."},"warnings":[{"fix":"Use obs['observation']['text'] and obs['observation']['image'] or check the updated observation space structure.","message":"In version 0.14.0, the observation space changed from a dict with 'text' and 'image' keys to a Gymnaxium Dict with additional fields. Old code that directly accesses obs['text'] or obs['image'] may break.","severity":"breaking","affected_versions":">=0.14.0"},{"fix":"Use 'browsergym/miniwob.' prefix (e.g., 'browsergym/miniwob.click-test').","message":"The 'browsergym/miniwob' task prefix was renamed to 'browsergym/miniwob.' (with a trailing dot) in version 0.13.0. The old prefix is deprecated and will be removed.","severity":"deprecated","affected_versions":">=0.13.0"},{"fix":"Call make(task, headless=True).","message":"The 'headless' argument in make() defaults to False. When running in CI or non-interactive environments, the browser may hang. Always set headless=True for automated testing.","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":"Ensure install with `pip install browsergym[all]` to include all dependencies, or separately install playwright: `pip install playwright && playwright install chromium`.","cause":"BrowserGym is not installed, or the installation is incomplete (e.g., missing optional dependencies like playwright).","error":"ModuleNotFoundError: No module named 'browsergym'"},{"fix":"Use the correct task ID with trailing dot: 'browsergym/miniwob.click-test'. If still failing, install browsergym with the miniwob extra: `pip install browsergym[miniwob]`.","cause":"The task string uses the old prefix without the trailing dot, or the MiniWoB tasks are not included in the installation.","error":"gymnasium.error.UnregisteredTask: Task browsergym/miniwob.click-test is not registered"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}