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
| Endpoint | Method | Description |
|---|---|---|
/status | GET | Connection status: connected extensions, pending command count |
/command | POST | Send a command to the extension and wait for its response |
/dialog_response | POST | Send a dialog response back to the extension |
/capture | POST | Screen recording capture handler |
/ or /ws | WS | Extension WebSocket connection |
Exit codes
| Code | Meaning |
|---|---|
| 0 | Clean shutdown (SIGINT or SIGTERM) |
| 1 | Bind failure (port already in use) |
Environment variables
| Variable | Default | Description |
|---|---|---|
BRIDGE_PORT | 7600 | Port to listen on |
RUST_LOG | info | Log 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.