项目文件夹
您已经派生过 browser-use--browser-harness
7ee18cd78f
- goto(): no longer injects JS to clear onbeforeunload. Instead,
navigates first then auto-dismisses any beforeunload dialog via
CDP. Zero page JS touched, undetectable by antibot.
- dismiss_dialog(): now returns {type, message, url} so the agent
can read what the dialog says and decide how to respond.
- SKILL.md: document antibot tradeoff between capture_dialogs()
(JS injection, detectable) vs dismiss_dialog() (CDP-level, safe).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
bu
LLM-first browser control via CDP. No CLI, no wrappers, just Python and CDP.
Setup
-
Install deps (uses
uv):uv sync -
Enable Chrome remote debugging: open
chrome://inspect/#remote-debugging, check the box. Chrome now listens at127.0.0.1:9222. -
(Optional) For remote browsers:
cp .env.example .envand fill inBROWSER_USE_API_KEY. -
Start the daemon:
uv run daemon.py &
Usage
uv run run.py <<'PY'
goto("https://example.com")
wait(1)
screenshot("/tmp/shot.png")
print(page_info())
PY
Parallel agents / remote browsers: BU_NAME=<n> uv run run.py. See SKILL.md.
Read SKILL.md for the full LLM workflow. Read AGENTS.md if you're an agent working ON this codebase (extending helpers, debugging the daemon). Read helpers.py for every function — they're all ~5 lines each and you can edit any of them.
Files
daemon.py— holds the WebSocket, listens on/tmp/bu-<name>.sockhelpers.py— ~250 lines of transparent helpersrun.py— 3 lines:from helpers import *; exec(stdin)SKILL.md— how an agent uses bu to drive a browserAGENTS.md— how an agent modifies bu (code structure, extension points)
Stop
uv run python -c "from helpers import kill_daemon; kill_daemon()" # default daemon
uv run python -c "from helpers import kill_daemon; kill_daemon('work')" # named daemon (also stops remote browser)
# or
pkill -f bu/daemon.py