Getting Started
Constclaw Docs
Constclaw is a Chrome extension that connects to your local OpenClaw AI gateway over WebSocket. Highlight any text → click → get AI-powered analysis in the side panel.
New here? Start with the Installation guide to
get OpenClaw running, then load the extension. Total setup: under 5 minutes.
Architecture overview
Constclaw follows a two-layer architecture. The extension itself is a thin client — it captures text selections, renders the side panel UI, and manages query history. All AI inference is delegated to the local OpenClaw gateway.
┌─────────────────────────────────────────────────┐
│ Chrome Browser │
│ │
│ ┌──────────────┐ ┌─────────────────────┐ │
│ │ Content.js │────▶│ Side Panel UI │ │
│ │ (text select) │ │ (sidepanel.html) │ │
│ └──────┬───────┘ └──────────┬──────────┘ │
│ │ │ │
└──────────┼────────────────────────┼───────────────┘
│ WebSocket │
└──────────┬────────────┘
▼
┌──────────────────────┐
│ OpenClaw Gateway │
│ ws://127.0.0.1:18789│
└──────────┬───────────┘
│
┌──────────▼───────────┐
│ AI Model Provider │
│ (Anthropic / OpenAI)│
└──────────────────────┘
Key concepts
Gateway Protocol
WebSocket wire format, connect handshake, request/response framing
Analysis Modes
Five modes: explain, summarize, translate, fact-check, expand
Settings
Gateway URL, optional auth token, language, mode defaults
Query History
Last 20 queries stored in chrome.storage.local
File structure
Host permissions
Constclaw uses ws:// host permissions in manifest.json.
This allows the extension to open WebSocket connections to the local gateway.
No external URLs are contacted by the extension itself.