Browsergym

Latest version: v0.13.3

Safety actively analyzes 723158 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 5 of 10

0.4.3

**browsergym-core**

- New features
- `HighLevelActionSet` has a new option `retry_with_force` 118
When activated, all Playwright actions will be retried with argument `force=True` if they fail. For example:
python
def check(bid: str):
...
if retry_with_force:
try:
elem.check(timeout=500)
except Exception as e:
elem.check(force=True, timeout=500)
else:
elem.check(timeout=500)


**browsergym-experiments**

- Improvements
- More robust experiments loop 120

- New Features
- Introducing experiment IDs (preparing for dependency graph between experiments) 121

0.4.2

**browsergym-experiments**

- New convenience namespace `bgym`, available whenever the `browsergym-experiments` package is installed
python
import bgym

bgym.Agent
bgym.AgentInfo
bgym.EnvArgs
bgym.ExpArgs
bgym.AbstractAgentArgs
bgym.ExpResult
bgym.StepInfo
bgym.StepTimestamps
bgym.AbstractActionSet
bgym.HighLevelActionSet
bgym.PythonActionSet

0.4.1

**browsergym-visualwebarena**

- New benchmark available!! 100 Bigs thanks to ljang0
python
import browsergym.visualwebarena

env = gym.make("browsergym/visualwebarena.423")
...

<img width="800" alt="VisualWebArena task" src="https://github.com/user-attachments/assets/0b78d4d1-7dc6-4b9f-ac2f-433fa30a1690">

**browsergym-core**

- New features
- Tasks can now return a goal with both a message and images (in the form of URLs)
python
class MyTask(AbstractBrowserTask):
def setup(self, page: playwright.sync_api.Page):
goal = {
"message": "Where can I buy this car?",
"image_urls": ["https://en.wikipedia.org/wiki/Electric_car#/media/File:Nissan_Leaf_2_(45992539055).jpg"]
}
info = {}
return goal, info

- Observations returned by `BrowserEnv` (`reset()`, `step()`) now have a new field for goal images
python
obs, info = env.reset()
textual goal as before
print(obs["goal"])
list of goal images (as urls, possibly using data:image/png;base64,... encoding)
print(obs["goal_image_urls"])

- Goal images are also sent to the chat, with a new `user_image` role

**browsergym-webarena**

- Breaking changes
- Setup environment variables have been renamed to avoid clash with VisualWebArena 100
bash
export WA_SHOPPING=...
export WA_SHOPPING_ADMIN=...
export WA_REDDIT=...
export WA_GITLAB=...
export WA_WIKIPEDIA=...
export WA_MAP=...
export WA_HOMEPAGE=...


**browsergym-experiments**

- New features
- new class `AgentInfo` 102
- new `AbstractAgentArgs` methods `prepare()` and `close()` 106

0.4.0

**browsergym-core**

- Breaking changes
- `"infeas"` action set now included by default 70 (`report_infeasible(reason)` action)
- minimum Python requirement 3.9 74

- New features
- new option `hide_all_children` for the `flatten_axtree_to_str()` method 88
- GPT-4o support for the demo agent 84

- Improvements
- more robust `_wait_dom_loaded()` 77 : now catches all Playwright Errors (was the reason of some crashes with IFrames 76)
- faster element marking 91 : thanks manuel-delverme !
- more robust Miniwob environment 75 : episode ends in failure if the agent navigates to a different page
- better handling of infeasible actions for webarena 70

**browsergym-experiments**

- Minor bugfixes
- 69

0.3.6.dev0

0.3.5

**browsergym-core**

- Refactors

- minor changes in high-level actions description and examples

**browsergym-experiments**

- Bugfixes

- `action=None` now recorded as `truncated=True`
- webarena environments can be used again in the experiments loop (61)

Page 5 of 10

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.