Set up
You need uv and Python 3.11 or newer. Chrome (or Chromium) is needed only for the browser tests.uv sync creates .venv with the library and the dev tools (pytest, ruff, pyright, pre-commit). Try the library from your checkout with uv run python your_script.py.
Test
FunctionModel plays the model. Cloud HTTP calls are mocked. Point CHROME=/path/to/chrome at a browser if it isn’t found.
Lint and type-check
uv, and modern typing (str | None). CI runs the same pre-commit hooks and uv run pyright.
How the code is laid out
Pull requests
- One regression test per bug, failing before your fix.
- Don’t replace model names in code or tests: people use models you may not know yet.
- The system prompt (
browser_use/agent/prompt.py) is evaluated on a benchmark. Don’t change it casually. - A 0.x option that 1.0 cannot honor raises a
TypeErrorthat names it. Keep MIGRATING.md in sync when you add or remove one. - Don’t add example files to show off a feature.
docs/ folder).