Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

crossmem serve

Run the HTTP/WebSocket relay bridge that connects CLI tools and agents to the crossmem Chrome extension.

Usage

crossmem serve
crossmem          # 'serve' is the default when no subcommand is given

What it does

Starts an HTTP + WebSocket server on 127.0.0.1:7600 (configurable). The Chrome extension connects via WebSocket; CLI tools and agents send commands via HTTP.

Endpoints

EndpointMethodDescription
/statusGETConnection status: connected extensions, pending command count
/commandPOSTSend a command to the extension and wait for its response
/dialog_responsePOSTSend a dialog response back to the extension
/capturePOSTScreen recording capture handler
/ or /wsWSExtension WebSocket connection

Exit codes

CodeMeaning
0Clean shutdown (SIGINT or SIGTERM)
1Bind failure (port already in use)

Environment variables

VariableDefaultDescription
BRIDGE_PORT7600Port to listen on
RUST_LOGinfoLog level

Example

$ crossmem serve
[bridge] crossmem-bridge v0.1.0
[bridge] HTTP  → http://127.0.0.1:7600/status
[bridge] HTTP  → http://127.0.0.1:7600/command
[bridge] WS    → ws://127.0.0.1:7600/
[bridge] waiting for extension...

Sending a command

curl -X POST http://127.0.0.1:7600/command \
  -H 'Content-Type: application/json' \
  -d '{"action":"navigate","params":{"url":"https://example.com"}}'

Checking status

curl -s http://127.0.0.1:7600/status | jq .

Chrome extension

The bridge is designed to work with the crossmem Chrome extension. The extension connects via WebSocket and executes commands using chrome.scripting.executeScript.

Supported actions: navigate, click, type, wait, extract, screenshot, summarize, tab_info, ping.

For multi-agent use, add "agentId": "my-agent" to commands to isolate tab control.