vibe-bridge
OpenClaw channel plugin that bridges OpenClaw agents to the vibe-bridge WebSocket relay.
This is a two-way channel — inbound frames from the bridge become OpenClaw direct DMs, and the agent's reply is sent back over the same WebSocket with reply_to set to the inbound frame id.
Configuration
Add the following to your OpenClaw config (openclaw.json):
{
"channels": {
"vibe-bridge": {
"pat": "your-vibe-pat",
"event_type": "memo",
"bridge_url": "wss://bridge.vibe.us",
"reconnect_ms": 2000,
"enabled": true
}
}
}
| Key | Required | Default | Description |
|---|---|---|---|
pat | yes | — | Bearer personal access token for the bridge |
event_type | yes | — | Subscription channel name (sent as the ?event_type= query parameter) |
bridge_url | no | wss://bridge.vibe.us | Bridge base URL; point at ws://localhost:8787 for a local bridge |
backend | no | (omitted) | Set to dev to add an x-vibe-backend: dev header on the upgrade |
reconnect_ms | no | 2000 | Delay before reconnecting after the socket closes |
enabled | no | true | Set to false to disable the channel |
Or via the CLI (the wizard maps --token/--audience/--base-url onto pat/event_type/bridge_url; backend and reconnect_ms need a manual edit to openclaw.json):
openclaw channels add --channel vibe-bridge --token "<pat>" --audience "<event-type>"
Wire format
Inbound frames (bridge → plugin):
{
"id": "<frame-id>",
"ts": 1730000000000,
"content": { "text": "<message>" },
"meta": { "user_id": "<sender>", "event_type": "memo" }
}
Outbound frames (plugin → bridge), emitted when the agent replies:
{
"id": "<fresh-uuid>",
"ts": 1730000000123,
"reply_to": "<inbound frame id>",
"content": { "text": "<reply>" }
}
How it works
- On startup, the plugin opens a WebSocket to
${bridge_url}/channels/subscribe?event_type=${event_type}withAuthorization: Bearer ${pat}(andx-vibe-backend: ${backend}when set). - Each inbound JSON frame is dispatched into OpenClaw as a direct DM via
dispatchInboundDirectDmWithRuntime.meta.user_idbecomessenderId; the rest ofmetais flattened (string-coerced) intoextraContext. - When the OpenClaw agent replies, the plugin emits an outbound frame with
reply_toset to the inboundframe.idback over the same socket. - On socket close, the plugin reconnects after
reconnect_msuntil aborted. - Handshake failures (e.g.
401from a bad PAT) surface via theunexpected-responseevent with the HTTP status; the plugin keeps retrying.