Bridge
Your AIs talk to each other.
Your AIs can send messages, search each other’s memory, and coordinate work. Claude Code talks to OpenClaw. OpenClaw talks back. Everything stays on your computer.Three Protocols, One System
LDM OS uses three complementary protocols. Bridge is one of them.| Bridge (Bridge) | ACP-Client | ACP-Comm | |
|---|---|---|---|
| What | AI-to-AI messaging + shared memory | IDE-to-AI communication | AI-to-AI over the internet |
| Protocol | MCP (JSON-RPC over stdio) | JSON-RPC over stdio + WebSocket | REST/HTTP |
| Built by | WIP Computer | Zed Industries | IBM / Linux Foundation |
| In LDM OS | Core (v0.3.0+) | Available via OpenClaw | Planned (Cloud Relay) |
| What it connects | Your AIs to each other | Code editors to AIs | Cloud AIs to each other |
| Memory access | Yes (search + read across AIs) | No | No |
| Tool sharing | Yes (OpenClaw tools available to all AIs) | No | No |
| Where it runs | Your computer only | Local (stdio) + remote (WebSocket) | Cloud (HTTP) |
Tools
| Tool | What it does |
|---|---|
lesa_send_message | Send a message to your OpenClaw AI. Get a response. |
lesa_check_inbox | Check for messages your AI sent to you. |
lesa_conversation_search | Search across past conversations by meaning. |
lesa_memory_search | Search across workspace files by keyword. |
lesa_read_workspace | Read a file from your AI’s workspace. |
oc_skills_list | List all available OpenClaw tools. |
oc_skill_* | Run any OpenClaw tool with scripts. |
Session Discovery
Multiple Claude Code sessions can discover each other automatically. On startup, Recall registers each session at~/.ldm/sessions/. Any session can list all running sessions with ldm sessions.
The registry tracks which AI, its process ID, working directory, and start time. Stale sessions (dead processes) are cleaned up automatically.
Message Flow
Claude Code to OpenClaw:~/.ldm/sessions/. Each session registers on startup and can discover peers. No background service needed.
Both directions are live. Everything stays on your computer. No cloud.
Technical Details
Architecture
Config Resolution
Bridge finds its config in two steps:- LDM OS path (
~/.ldm/config.json): checks foropenclawDir,workspaceDir,dbPath - Legacy path (
OPENCLAW_DIRenv or~/.openclaw): fallback
Conversation Search
Two modes:- Smart search (if OpenAI API key available): embeds your query, computes similarity against all conversation chunks, applies recency weighting (recent conversations rank higher)
- Text search (fallback): keyword matching against conversation text
Inbox Server
Bridge starts a localhost-only HTTP server on port 18790:POST /message: push a message (from your OpenClaw AI)GET /status: check pending count
lesa_check_inbox drains the queue.
Tool Sharing
On startup, Bridge scans OpenClaw’s tool directories and makes them available to Claude Code. Your Claude Code AI gets the same tools your OpenClaw AI has.- Scans tool directories
- Reads each tool’s description and requirements
- Tools with a
scripts/folder get registered as executableoc_skill_{name}tools - All tools show up in
oc_skills_list
CLI Usage
Ports
| Port | Service | Bound to |
|---|---|---|
| 18789 | OpenClaw gateway | localhost (managed by OpenClaw) |
| 18790 | Bridge inbox | localhost (managed by Bridge) |
Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
OPENCLAW_DIR | Yes | ~/.openclaw | Path to OpenClaw installation |
OPENAI_API_KEY | For smart search | Resolved from 1Password | OpenAI API key for embeddings |
LESA_BRIDGE_INBOX_PORT | No | 18790 | Inbox HTTP server port |