Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -151,4 +151,7 @@ tests/assistantbench/assistantbench-predictions-test.jsonl
# weblinx
bg_wl_data/

# miniwob setup
miniwob-plusplus/

uv.lock
33 changes: 33 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,39 @@ demo:
@echo "--- 🚀 Running demo agent ---"
(set -x && cd demo_agent && python run_demo.py)

setup-miniwob:
@echo "--- 🤖 Setting up MiniWoB++ ---"
@if [ ! -d "miniwob-plusplus" ]; then \
echo "Cloning MiniWoB++ repository..."; \
git clone https://github.com/Farama-Foundation/miniwob-plusplus.git; \
else \
echo "MiniWoB++ repository already exists, skipping clone..."; \
fi
@echo "Resetting to specific commit for reproducibility..."
git -C "./miniwob-plusplus" reset --hard 7fd85d71a4b60325c6585396ec4f48377d049838
@echo "Adding MINIWOB_URL to .env file..."
@echo "MINIWOB_URL=\"file://$(shell pwd)/miniwob-plusplus/miniwob/html/miniwob/\"" >> .env
@echo "✅ MiniWoB++ setup complete!"
@echo "💡 To use MiniWoB++, load the environment variables:"
@echo " source .env"

test-core:
@echo "--- 🧪 Running tests ---"
pytest -n auto ./tests/core

clean-miniwob:
@echo "--- 🧹 Cleaning MiniWoB++ installation ---"
rm -rf miniwob-plusplus
@echo "✅ MiniWoB++ installation cleaned!"

help:
@echo "Available targets:"
@echo " install - Install project dependencies"
@echo " setup-miniwob - Setup MiniWoB++ dependencies"
@echo " install-demo - Install demo dependencies"
@echo " demo - Run demo agent"
@echo " test-core - Run core tests"
@echo " clean-miniwob - Remove MiniWoB++ directory"
@echo " help - Show this help message"

.PHONY: install setup-miniwob install-demo demo test-core clean-miniwob help
29 changes: 27 additions & 2 deletions browsergym/miniwob/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,43 @@ This package provides `browsergym.miniwob`, which is an unofficial port of the [

## Setup

### Option 1: Automated setup (Recommended)

If you're working from the BrowserGym root directory, you can use the Makefile for automated setup:

```sh
make setup-miniwob
```

This will:

- Clone the MiniWoB++ repository
- Reset to the specific commit for reproducibility
- Add the `MINIWOB_URL` to your `.env` file

Then load the environment variables:

```sh
source .env
```

### Option 2: Manual setup

1. Install the package

```sh
pip install browsergym-miniwob
```

2. Clone miniwob (use a specific frozen commit for reproducibility)
1. Clone miniwob (use a specific frozen commit for reproducibility)

```sh
git clone [email protected]:Farama-Foundation/miniwob-plusplus.git
git -C "./miniwob-plusplus" reset --hard 7fd85d71a4b60325c6585396ec4f48377d049838
```

3. Setup Miniwob URL (change `PATH_TO_MINIWOB_CLONED_REPO` here to the absolute path to your `miniwob-plusplus` folder)
1. Setup Miniwob URL (change `PATH_TO_MINIWOB_CLONED_REPO` here to the absolute path to your `miniwob-plusplus` folder)

```sh
export MINIWOB_URL="file://<PATH_TO_MINIWOB_CLONED_REPO>/miniwob/html/miniwob/"
```
Expand Down