Documentation

Connect any AI agent to your browser

Version 0.5.0 No SDK required Local-only
Works with any agent that can make an HTTP request

Claude Code, Cursor, a custom LangChain/OpenAI tool, an MCP server, or plain curl — AI Bridge exposes your authenticated browser over a local HTTP API on 127.0.0.1. There's no proprietary SDK to install; the protocol on this page is the entire interface.

1. What AI Bridge Gives Your Agent

AI Bridge runs a Chrome extension plus a small local server. Together they let an AI agent read a page, click and type, take screenshots, run JavaScript, and make authenticated calls to a site's own internal API using the session you're already logged into — without you copying tokens around by hand.

Everything runs on your machine. The only outbound calls are license validation and an optional Firebase token refresh — see the Privacy Policy for details.

2. Prerequisites

  1. Install the AI Bridge Chrome extension and open the side panel.
  2. Download the local bridge server — ai-bridge-bridge-macos-arm64.zip (macOS, Apple Silicon). It's a standalone binary — no Python install required. Unzip it, then run bash install_native_host.sh <EXTENSION_ID> once (extension ID is shown at chrome://extensions).
  3. Click Start Bridge in the side panel — this launches the local server, no terminal needed after setup.
  4. Activate your license key (get one at whop.com/ai-bridge) — required for tab control and Deep Capture.
  5. Have a tab open in Chrome for the agent to act on.

Your agent shouldn't try to perform this setup itself — have it check GET /health first and ask you to confirm the bridge is running before it attempts anything else.

Apple Silicon macOS only, for now

Intel Mac and Windows builds aren't published yet — if you're on either, use the Python setup instead (pip install -r requirements.txt, run bridge/server.py directly).

3. Connecting

Base URL: http://127.0.0.1:9124. Most routes require a shared-secret header, generated on first run and stored locally:

KEY=$(cat ~/.ai-bridge/key)
curl http://127.0.0.1:9124/health
curl -H "X-Bridge-Key: $KEY" http://127.0.0.1:9124/tokens

GET /health and GET /info need no key — always safe to probe first. A 401 means the key is missing or wrong; a 502 on a tab action means the extension isn't connected (check the side panel); an error mentioning the license means the key isn't active yet.

4. Endpoint Reference

No key required

Method
Path
Purpose
GET
/health
Status, token/request counts, license state
GET
/info
Key file location, protected-route list, extension connection state
GET
/license
Current license status/plan

Requires X-Bridge-Key

Method
Path
Purpose
GET
/token
Freshest captured Bearer token across all domains
POST
/proxy
Make an authenticated HTTP call through the browser's captured session — the fastest way to hit a site's own API without reimplementing auth
GET
/endpoints
Internal API endpoints observed per domain
GET
/requests
Recent captured network requests
POST
/tab/click
Click an element ({selector})
POST
/tab/type
Type into an element ({selector, text})
POST
/tab/read
Read text/DOM content
POST
/tab/screenshot
Base64 PNG of the active tab
POST
/tab/goto
Navigate the tab
POST
/tab/eval
Run JavaScript in the page
POST
/tab/action
Generic dispatcher for any action not listed above (accessibility tree, CDP-level input, etc.)

5. Example: Read, then Act

Don't guess selectors — read or screenshot the page first, then act:

curl -X POST http://127.0.0.1:9124/tab/screenshot -H "X-Bridge-Key: $KEY"

curl -X POST http://127.0.0.1:9124/tab/click -H "X-Bridge-Key: $KEY" \
  -d '{"selector":"[data-testid=save]","reason":"Save the draft"}'

Prefer calling a site's own API over clicking through its UI whenever one is available — it's faster and more reliable than DOM automation:

curl -X POST http://127.0.0.1:9124/proxy -H "X-Bridge-Key: $KEY" \
  -d '{"method":"GET","url":"https://example.com/api/v2/items","use_token":true}'

6. Best Practices

A valid license is required for tab control

Passive capture (/token, /proxy, /endpoints, /requests) works without a license. Interactive tab actions and Deep Capture require an active key from whop.com/ai-bridge.