Skip to main content

Local browser bridge for Remote AI Maestro — runs a Playwright-managed Chromium and exposes BROWSER_* commands over WebSocket.

Project description

maestro-browser-bridge

Local browser bridge for Remote AI Maestro.

The bridge is the companion app you install on the same laptop where you keep your real browser. It launches a Playwright-managed Chromium in an isolated profile and exposes it over a WebSocket so an AI agent running inside a Maestro sandbox can drive it — navigate, click, type, screenshot, read DOM, capture console logs.

This is the Phase 2 counterpart to the simpler Phase 1 maestro browser open <url> command, which only pops URLs in your already-open browser via the frontend's window.open. The bridge gives Claude (or any agent) real browser control without ever touching your logged-in Chrome profile.

Why a separate process

The AI agent runs on a remote machine (or an EC2 sandbox) but the browser to be controlled lives on your local desktop. There is no other process that runs on the user's actual laptop in a known-good location — the agent daemon runs on whichever machine the sandbox is bound to, which may be EC2. So we ship a dedicated bridge process that runs on the user's laptop, maintains an outbound WebSocket to the relay, and translates BROWSER_* messages into Playwright calls.

The bridge is per-user (one bridge per laptop) — distinct from the agent daemon, which is per-machine. Relay routing maps user_id → bridge.

Install

pip install maestro-browser-bridge

# Pre-download the Playwright Chromium binary (~200MB)
playwright install chromium

# Configure once
maestro-browser-bridge configure \
  --relay-url wss://relay.thesavvydeveloper.com \
  --user-id YOUR_USER_UUID \
  --user-token YOUR_BRIDGE_TOKEN

# Start
maestro-browser-bridge start

--detach is wired but not yet implemented; for now run the bridge in the foreground (or wrap it in your own service manager — launchd / systemd unit shipping is planned).

Status

The Phase 2 work tracked in _reference/11_BROWSER_CONTROL.md and implementation_plan.md's "BC — Browser Control (Phase 2)" section is implemented, not just scaffolded. All 16 BROWSER_COMMAND actions have real Playwright handlers in maestro_browser_bridge/handlers.py:

navigate, click, type, keypress, scroll, screenshot, read_dom, console_logs, list_tabs, allowlist_add, upload, wait_for, select_option, dismiss_dialog, collect_toasts, eval_js

(the last six — upload through eval_js — are the Phase 2.1 additions for Play Console / general lazy-UI automation: file upload, waits, native + Material-UI dropdowns, dialog dismissal, toast collection, and arbitrary page.evaluate.)

Also shipped: a security layer (security.py — pause/resume kill switch, per-host navigate allowlist, rate limiting) exposed via three extra CLI commands not mentioned above — pause, resume, bridge-status — which talk to the running daemon over its own loopback WebSocket (BRIDGE_CONTROL, 127.0.0.1 only, never over the relay). The package is published to PyPI by the release pipeline (publish-bridge job), so pip install maestro-browser-bridge (see Install, above) is a real, working install path today, not aspirational.

Still genuinely unimplemented (stubs, matching their CLI help text): --detach on start, the stop command, and install-service (launchd/systemd, tracked as BC.1.4) — for now the bridge only runs in the foreground.

Development

# Editable install with test deps (from the repo root)
pip install -e ./bridge[test]

# Run tests
cd bridge && pytest

# Smoke check the CLI
maestro-browser-bridge --version
maestro-browser-bridge --help

References

  • Architecture & wire protocol: _reference/11_BROWSER_CONTROL.md
  • Milestone plan: _reference/12_BROWSER_PHASE2_PLAN.md
  • Pip package contract: implementation_plan.md § BC.1

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

maestro_browser_bridge-1.32.0.tar.gz (66.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

maestro_browser_bridge-1.32.0-py3-none-any.whl (53.2 kB view details)

Uploaded Python 3

File details

Details for the file maestro_browser_bridge-1.32.0.tar.gz.

File metadata

  • Download URL: maestro_browser_bridge-1.32.0.tar.gz
  • Upload date:
  • Size: 66.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for maestro_browser_bridge-1.32.0.tar.gz
Algorithm Hash digest
SHA256 b3074a46678e25e1d24bb4738a8fd7cbb60f28229c08345146e56ffbf16c0628
MD5 1af17e301a8a118328a59a9c2e29bcf8
BLAKE2b-256 a7f2587ba7090cba4c0cddfe9eee9bfa11a85b68507136216b74f14e0b229f41

See more details on using hashes here.

Provenance

The following attestation bundles were made for maestro_browser_bridge-1.32.0.tar.gz:

Publisher: release.yml on shaunchew/remote-ai-maestro

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file maestro_browser_bridge-1.32.0-py3-none-any.whl.

File metadata

File hashes

Hashes for maestro_browser_bridge-1.32.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f3938f7b1895c1fafba5463bd4985a819a2b46c39d3b90dc001452ffcf4a43b2
MD5 5143a742796e49519cd9fc24c7ad8b4a
BLAKE2b-256 bdd9209e220b0b886925b95661a7ea698ceabf3e905eae4b4331377995ff28f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for maestro_browser_bridge-1.32.0-py3-none-any.whl:

Publisher: release.yml on shaunchew/remote-ai-maestro

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page