OpenClaw Genie
OpenClaw is a self-hosted personal AI agent gateway (MIT license, ~229k GitHub
stars). It connects LLM agents to 38+ messaging platforms (WhatsApp, Telegram,
Discord, Slack, Signal, iMessage, MS Teams, Matrix, and more) through a single
Gateway process. All data stays local.
Quick Start
# One-liner install (macOS/Linux, requires Node 22+)
curl -fsSL https://openclaw.ai/install.sh | bash
# Or via npm
npm install -g openclaw@latest
# Interactive setup — gateway, workspace, channels, skills
openclaw onboard --install-daemon
# Verify
openclaw status
openclaw gateway status
Web Control UI: http://127.0.0.1:18789/
Core Architecture
Channels (WhatsApp, Discord, Telegram, Slack, Signal, …)
↓
Gateway ← WebSocket control plane (port 18789), single source of truth
↓
Agents ← isolated workspaces, sessions, memory, tools
↓
Tools ← exec, browser, skills, hooks, messaging, sub-agents
- Gateway: Multiplexed port (WebSocket + HTTP + Control UI). Hot-reloads config.
- Agents: Fully isolated — own workspace, session store, memory, auth profiles, sandbox.
- Channels: 38+ adapters run simultaneously. Deterministic routing: replies return to origin.
- Sessions: Key format
agent:<agentId>:<channel>:<scope>:<chatId>. DM scopes: main, per-peer, per-channel-peer, per-account-channel-peer.
Agent Configuration
Workspace files in ~/.openclaw/workspace/ (default agent) or ~/.openclaw/workspace-<agentId>/:
| File |
Purpose |
SOUL.md |
Agent personality and system prompt |
IDENTITY.md |
Name, emoji, avatar |
USER.md |
User profile information |
MEMORY.md |
Curated long-term memory |
memory/YYYY-MM-DD.md |
Daily append-only session logs |
TOOLS.md |
Tool usage guidance |
BOOTSTRAP.md |
One-time init tasks (deleted after first run) |
HEARTBEAT.md |
Periodic check-in instructions |
Bootstrap injection: IDENTITY → SOUL → USER → MEMORY → daily log → skills → session.
Limits: 20,000 chars/file, 150,000 chars total (configurable).
Multi-agent config uses agents.list[] and bindings[] in openclaw.json (see references/multi-agent.md).
Configuration — openclaw.json
Location: ~/.openclaw/openclaw.json (JSON5 — comments and trailing commas OK).
{
"models": { // primary, fallbacks, aliases, image model
"primary": "anthropic/claude-sonnet-4-5",
"fallbacks": ["openai/gpt-4o"]
},
"channels": { }, // discord, telegram, whatsapp, slack, signal, …
"agents": { }, // list, defaults, bindings, broadcast, subagents
"tools": { }, // profiles, allow/deny, loop detection, exec config
"skills": { }, // entries, load dirs, install manager
"browser": { }, // profiles, SSRF policy, executable path
"sandbox": { }, // mode (off/non-main/all), scope, Docker hardening
"gateway": { }, // port, auth, discovery, binding
"automation": { }, // cron, webhooks, heartbeat
"hooks": { }, // internal hooks config
"session": { }, // dmScope, resets, sendPolicy, maintenance
"auth": { } // OAuth profiles, key rotation, order
}
- Env vars:
~/.openclaw/.env, ${VAR} substitution in config strings.
$include: Nested file inclusion (up to 10 levels).
- Hot reload:
hybrid mode (default) — safe changes hot-apply, critical ones auto-restart. Debounce 300ms.
- Strict validation: Unknown keys prevent Gateway startup.
For full reference, read references/configuration.md.
Channels Quick Reference
| Channel |
Setup |
Notes |
| Discord |
openclaw channels add discord |
Bot API + Gateway; servers, DMs, threads, slash commands, voice |
| Telegram |
openclaw channels add telegram |
grammY; groups, forums, inline buttons, webhook mode |
| WhatsApp |
openclaw channels add whatsapp |
Baileys; QR pairing, media, polls |
| Slack |
openclaw channels add slack |
Bolt SDK; socket or HTTP mode, native streaming |
| Signal |
openclaw channels add signal |
signal-cli; privacy-focused, auto-daemon |
| iMessage |
openclaw channels add bluebubbles |
BlueBubbles; reactions, edits, groups |
| Google Chat |
openclaw channels add googlechat |
HTTP webhook app |
| IRC |
openclaw channels add irc |
NickServ, channels + DMs |
| MS Teams |
openclaw plugins install @openclaw/msteams |
Adaptive Cards, polls |
| Matrix |
openclaw plugins install @openclaw/matrix |
E2EE, threads, rooms |
Access control: DM policy (pairing/allowlist/open/disabled), group policy, mention gating. Multi-account per channel supported.
For per-channel details, read references/channels.md.
Memory System
- Daily logs:
memory/YYYY-MM-DD.md — today + yesterday loaded at session start
- Long-term:
MEMORY.md — curated facts, decisions, preferences (private sessions only)
- Tools:
memory_search (vector recall, ~400-token chunks) and memory_get (file reads)
- Hybrid search: BM25 (exact tokens) + vector (semantic) with configurable weights
- Post-processing: MMR deduplication (lambda 0.7) + temporal decay (30-day half-life)
- Providers: auto-selects local → OpenAI → Gemini → Voyage → Mistral
- QMD backend: Optional local-first sidecar (BM25 + vectors + reranking)
- Auto flush: Silent agentic turn before context compaction preserves important memories
For full memory config, read references/memory.md.
Tools Overview
| Tool |
Purpose |
exec |
Shell commands (sandbox/gateway/node hosts) |
process |
Background process management |
browser |
Chromium automation (navigate, click, type, screenshot) |
web_search |
Brave Search API queries |
web_fetch |
URL → markdown extraction |
memory_search |
Semantic vector search over memory |
memory_get |
Direct memory file reads |
message |
Cross-channel messaging (send, react, thread, pin, poll) |
sessions_spawn |
Sub-agent runs (one-shot or persistent, up to depth 5) |
canvas |
Node Canvas UI (HTML display on connected devices) |
Access control: Profiles (minimal, coding, messaging, full), allow/deny lists, tool groups (group:fs, group:runtime, group:web, group:ui, group:automation).
For full tools, skills, and hooks reference, read references/tools.md.
Hooks & Automation
Hooks — event-driven TypeScript handlers in <workspace>/hooks/:
| Event |
Trigger |
command:new/reset/stop |
Session lifecycle |
agent:bootstrap |
Pre-injection (can mutate bootstrap files) |
gateway:startup |
After channels load |
message:received/sent |
Message lifecycle |
tool_result_persist |
Synchronous tool result transform |
Automation — built into Gateway:
- Cron: Scheduled jobs (cron expressions, intervals, one-shot). Isolated or main-session.
- Webhooks:
/hooks/wake (system events), /hooks/agent (isolated turns), custom mapped endpoints.
- Heartbeat: Periodic check-ins (default 30min), batches multiple checks per turn.
Deployment Options
# Local service (default)
openclaw gateway install && openclaw gateway start
# One-liner Docker
./docker-setup.sh
# Manual Docker
docker build -t openclaw:local -f Dockerfile .
docker compose up -d openclaw-gateway
Cloud: Fly.io, Railway, Render, GCP, Hetzner, Cloudflare Workers, Ansible.
Sandbox: Docker isolation for untrusted sessions. Modes: off, non-main, all. Scopes: session, agent, shared.
Remote access: Tailscale/VPN preferred, SSH tunnel fallback.
For full deployment guide, read references/deployment.md.
CLI Essentials
| Command |
Purpose |
openclaw onboard |
Interactive first-time setup |
openclaw gateway start/stop/status |
Service management |
openclaw channels add/list/status/login |
Channel management |
openclaw models list/set/auth/scan |
Model config + auth |
openclaw skills list/info/check |
Skill management |
openclaw hooks list/enable/disable/install |
Hook management |
openclaw agent --message "..." |
Single agent turn |
openclaw agents list/add/delete |
Multi-agent management |
openclaw sessions |
List/manage sessions |
openclaw browser |
Browser control (50+ subcommands) |
openclaw cron list/add/run |
Scheduled jobs |
openclaw config get/set/unset |
Config helpers |
openclaw doctor [--fix] |
Health checks + auto-repair |
openclaw security audit [--deep] |
Security audit |
openclaw logs [--follow] |
Tail gateway logs |
openclaw memory search "query" |
Vector search |
openclaw tui |
Terminal UI |
Global flags: --dev, --profile <name>, --json, --no-color
When to Read Reference Files
| If you need… |
Read |
| Full openclaw.json, model providers, env vars, auth, OAuth |
references/configuration.md |
| Per-channel setup, routing, access control, streaming, multi-account |
references/channels.md |
| Memory files, vector search, QMD, embeddings, hybrid search |
references/memory.md |
| Exec, browser, skills, hooks, tool access, sub-agents |
references/tools.md |
| Docker, cloud deploy, sandboxing, native install, security |
references/deployment.md |
| Multi-agent config, bindings, broadcast, sub-agents, workspaces |
references/multi-agent.md |
1---
2name: openclaw-genie
3description: >-
4 Use when the user asks about OpenClaw — installation, configuration, agents,
5 channels, memory, tools, hooks, skills, deployment, Docker, multi-agent,
6 OAuth, gateway, CLI, browser, exec, sandboxing, sessions, cron, webhooks,
7 heartbeat, sub-agents, or messaging platform integration.
8metadata:
9 source: https://skillmd.com/skills/modbender/openclaw-genie
10---
11
12# OpenClaw Genie
13
14OpenClaw is a self-hosted personal AI agent gateway (MIT license, ~229k GitHub
15stars). It connects LLM agents to 38+ messaging platforms (WhatsApp, Telegram,
16Discord, Slack, Signal, iMessage, MS Teams, Matrix, and more) through a single
17Gateway process. All data stays local.
18
19---
20
21## Quick Start
22
23```bash
24# One-liner install (macOS/Linux, requires Node 22+)
25curl -fsSL https://openclaw.ai/install.sh | bash
26
27# Or via npm
28npm install -g openclaw@latest
29
30# Interactive setup — gateway, workspace, channels, skills
31openclaw onboard --install-daemon
32
33# Verify
34openclaw status
35openclaw gateway status
36```
37
38Web Control UI: `http://127.0.0.1:18789/`
39
40---
41
42## Core Architecture
43
44```
45Channels (WhatsApp, Discord, Telegram, Slack, Signal, …)
46 ↓
47 Gateway ← WebSocket control plane (port 18789), single source of truth
48 ↓
49 Agents ← isolated workspaces, sessions, memory, tools
50 ↓
51 Tools ← exec, browser, skills, hooks, messaging, sub-agents
52```
53
54- **Gateway**: Multiplexed port (WebSocket + HTTP + Control UI). Hot-reloads config.
55- **Agents**: Fully isolated — own workspace, session store, memory, auth profiles, sandbox.
56- **Channels**: 38+ adapters run simultaneously. Deterministic routing: replies return to origin.
57- **Sessions**: Key format `agent:<agentId>:<channel>:<scope>:<chatId>`. DM scopes: `main`, `per-peer`, `per-channel-peer`, `per-account-channel-peer`.
58
59---
60
61## Agent Configuration
62
63Workspace files in `~/.openclaw/workspace/` (default agent) or `~/.openclaw/workspace-<agentId>/`:
64
65| File | Purpose |
66|------|---------|
67| `SOUL.md` | Agent personality and system prompt |
68| `IDENTITY.md` | Name, emoji, avatar |
69| `USER.md` | User profile information |
70| `MEMORY.md` | Curated long-term memory |
71| `memory/YYYY-MM-DD.md` | Daily append-only session logs |
72| `TOOLS.md` | Tool usage guidance |
73| `BOOTSTRAP.md` | One-time init tasks (deleted after first run) |
74| `HEARTBEAT.md` | Periodic check-in instructions |
75
76Bootstrap injection: IDENTITY → SOUL → USER → MEMORY → daily log → skills → session.
77Limits: 20,000 chars/file, 150,000 chars total (configurable).
78
79Multi-agent config uses `agents.list[]` and `bindings[]` in openclaw.json (see `references/multi-agent.md`).
80
81---
82
83## Configuration — openclaw.json
84
85Location: `~/.openclaw/openclaw.json` (JSON5 — comments and trailing commas OK).
86
87```jsonc
88{
89 "models": { // primary, fallbacks, aliases, image model
90 "primary": "anthropic/claude-sonnet-4-5",
91 "fallbacks": ["openai/gpt-4o"]
92 },
93 "channels": { }, // discord, telegram, whatsapp, slack, signal, …
94 "agents": { }, // list, defaults, bindings, broadcast, subagents
95 "tools": { }, // profiles, allow/deny, loop detection, exec config
96 "skills": { }, // entries, load dirs, install manager
97 "browser": { }, // profiles, SSRF policy, executable path
98 "sandbox": { }, // mode (off/non-main/all), scope, Docker hardening
99 "gateway": { }, // port, auth, discovery, binding
100 "automation": { }, // cron, webhooks, heartbeat
101 "hooks": { }, // internal hooks config
102 "session": { }, // dmScope, resets, sendPolicy, maintenance
103 "auth": { } // OAuth profiles, key rotation, order
104}
105```
106
107- **Env vars**: `~/.openclaw/.env`, `${VAR}` substitution in config strings.
108- **`$include`**: Nested file inclusion (up to 10 levels).
109- **Hot reload**: `hybrid` mode (default) — safe changes hot-apply, critical ones auto-restart. Debounce 300ms.
110- **Strict validation**: Unknown keys prevent Gateway startup.
111
112For full reference, read `references/configuration.md`.
113
114---
115
116## Channels Quick Reference
117
118| Channel | Setup | Notes |
119|---------|-------|-------|
120| Discord | `openclaw channels add discord` | Bot API + Gateway; servers, DMs, threads, slash commands, voice |
121| Telegram | `openclaw channels add telegram` | grammY; groups, forums, inline buttons, webhook mode |
122| WhatsApp | `openclaw channels add whatsapp` | Baileys; QR pairing, media, polls |
123| Slack | `openclaw channels add slack` | Bolt SDK; socket or HTTP mode, native streaming |
124| Signal | `openclaw channels add signal` | signal-cli; privacy-focused, auto-daemon |
125| iMessage | `openclaw channels add bluebubbles` | BlueBubbles; reactions, edits, groups |
126| Google Chat | `openclaw channels add googlechat` | HTTP webhook app |
127| IRC | `openclaw channels add irc` | NickServ, channels + DMs |
128| MS Teams | `openclaw plugins install @openclaw/msteams` | Adaptive Cards, polls |
129| Matrix | `openclaw plugins install @openclaw/matrix` | E2EE, threads, rooms |
130
131**Access control**: DM policy (`pairing`/`allowlist`/`open`/`disabled`), group policy, mention gating. Multi-account per channel supported.
132
133For per-channel details, read `references/channels.md`.
134
135---
136
137## Memory System
138
139- **Daily logs**: `memory/YYYY-MM-DD.md` — today + yesterday loaded at session start
140- **Long-term**: `MEMORY.md` — curated facts, decisions, preferences (private sessions only)
141- **Tools**: `memory_search` (vector recall, ~400-token chunks) and `memory_get` (file reads)
142- **Hybrid search**: BM25 (exact tokens) + vector (semantic) with configurable weights
143- **Post-processing**: MMR deduplication (lambda 0.7) + temporal decay (30-day half-life)
144- **Providers**: auto-selects local → OpenAI → Gemini → Voyage → Mistral
145- **QMD backend**: Optional local-first sidecar (BM25 + vectors + reranking)
146- **Auto flush**: Silent agentic turn before context compaction preserves important memories
147
148For full memory config, read `references/memory.md`.
149
150---
151
152## Tools Overview
153
154| Tool | Purpose |
155|------|---------|
156| `exec` | Shell commands (sandbox/gateway/node hosts) |
157| `process` | Background process management |
158| `browser` | Chromium automation (navigate, click, type, screenshot) |
159| `web_search` | Brave Search API queries |
160| `web_fetch` | URL → markdown extraction |
161| `memory_search` | Semantic vector search over memory |
162| `memory_get` | Direct memory file reads |
163| `message` | Cross-channel messaging (send, react, thread, pin, poll) |
164| `sessions_spawn` | Sub-agent runs (one-shot or persistent, up to depth 5) |
165| `canvas` | Node Canvas UI (HTML display on connected devices) |
166
167**Access control**: Profiles (`minimal`, `coding`, `messaging`, `full`), allow/deny lists, tool groups (`group:fs`, `group:runtime`, `group:web`, `group:ui`, `group:automation`).
168
169For full tools, skills, and hooks reference, read `references/tools.md`.
170
171---
172
173## Hooks & Automation
174
175**Hooks** — event-driven TypeScript handlers in `<workspace>/hooks/`:
176
177| Event | Trigger |
178|-------|---------|
179| `command:new/reset/stop` | Session lifecycle |
180| `agent:bootstrap` | Pre-injection (can mutate bootstrap files) |
181| `gateway:startup` | After channels load |
182| `message:received/sent` | Message lifecycle |
183| `tool_result_persist` | Synchronous tool result transform |
184
185**Automation** — built into Gateway:
186- **Cron**: Scheduled jobs (cron expressions, intervals, one-shot). Isolated or main-session.
187- **Webhooks**: `/hooks/wake` (system events), `/hooks/agent` (isolated turns), custom mapped endpoints.
188- **Heartbeat**: Periodic check-ins (default 30min), batches multiple checks per turn.
189
190---
191
192## Deployment Options
193
194```bash
195# Local service (default)
196openclaw gateway install && openclaw gateway start
197
198# One-liner Docker
199./docker-setup.sh
200
201# Manual Docker
202docker build -t openclaw:local -f Dockerfile .
203docker compose up -d openclaw-gateway
204```
205
206**Cloud**: Fly.io, Railway, Render, GCP, Hetzner, Cloudflare Workers, Ansible.
207**Sandbox**: Docker isolation for untrusted sessions. Modes: `off`, `non-main`, `all`. Scopes: `session`, `agent`, `shared`.
208**Remote access**: Tailscale/VPN preferred, SSH tunnel fallback.
209
210For full deployment guide, read `references/deployment.md`.
211
212---
213
214## CLI Essentials
215
216| Command | Purpose |
217|---------|---------|
218| `openclaw onboard` | Interactive first-time setup |
219| `openclaw gateway start/stop/status` | Service management |
220| `openclaw channels add/list/status/login` | Channel management |
221| `openclaw models list/set/auth/scan` | Model config + auth |
222| `openclaw skills list/info/check` | Skill management |
223| `openclaw hooks list/enable/disable/install` | Hook management |
224| `openclaw agent --message "..."` | Single agent turn |
225| `openclaw agents list/add/delete` | Multi-agent management |
226| `openclaw sessions` | List/manage sessions |
227| `openclaw browser` | Browser control (50+ subcommands) |
228| `openclaw cron list/add/run` | Scheduled jobs |
229| `openclaw config get/set/unset` | Config helpers |
230| `openclaw doctor [--fix]` | Health checks + auto-repair |
231| `openclaw security audit [--deep]` | Security audit |
232| `openclaw logs [--follow]` | Tail gateway logs |
233| `openclaw memory search "query"` | Vector search |
234| `openclaw tui` | Terminal UI |
235
236**Global flags**: `--dev`, `--profile <name>`, `--json`, `--no-color`
237
238---
239
240## When to Read Reference Files
241
242| If you need… | Read |
243|--------------|------|
244| Full openclaw.json, model providers, env vars, auth, OAuth | `references/configuration.md` |
245| Per-channel setup, routing, access control, streaming, multi-account | `references/channels.md` |
246| Memory files, vector search, QMD, embeddings, hybrid search | `references/memory.md` |
247| Exec, browser, skills, hooks, tool access, sub-agents | `references/tools.md` |
248| Docker, cloud deploy, sandboxing, native install, security | `references/deployment.md` |
249| Multi-agent config, bindings, broadcast, sub-agents, workspaces | `references/multi-agent.md` |