Learn the OpenClaw personal AI assistant from the ground up β Gateway, channels, agents, skills, nodes, Tailscale, and security. A phased, interactive learning journey. The lobster way. π¦
Browse architecture diagrams, phase breakdowns, and concept explainers. No OpenClaw install needed. Just Node.js + pnpm.
Generate real Mermaid diagrams and annotated examples. OpenClaw optional. The recommended starting point for workshops.
Live Gateway + channel exercises + diagrams. Connect real channels on your machine. OpenClaw required.
WebSocket server at :18789. Not the AI β the router. Think post office, not postman.
20+ adapters normalize inbound messages into one OpenClaw format. The agent never knows the difference.
Runs the loop: receive β think β tools β stream reply. Connects via RPC. Channel-agnostic.
main = your 1:1. Groups get isolated sessions. Each carries model, history, usage stats.
Markdown files injected into agent context. Three tiers: bundled, managed (ClawHub), workspace.
macOS/iOS/Android companion apps exposing device capabilities via node.invoke.
| Tool | Version | Required | Notes |
|---|---|---|---|
| Node.js | 22.16+ or 24 | β Required | Runtime for all phase scripts |
| pnpm | 8+ | β Required | npm install -g pnpm |
| Git | any | β Required | Clone and commit phase outputs |
| OpenClaw | latest | β Hands-On | npm install -g openclaw@latest |
| Tailscale | any | β Optional | Phase 5 remote exercises |
| Cloudflare | β | β Optional | Phase 6 deployment |
The single WebSocket control plane that powers all of OpenClaw. It is not the AI. It is the router.
A local WebSocket server at ws://127.0.0.1:18789 that receives messages from channels, routes them to the Pi agent, and delivers replies back through the correct channel adapter.
In-process adapters that pipe inbound messages in and deliver replies out. One per connected channel.
Runs the agent loop over WebSocket. Streams replies token by token.
openclaw agent, openclaw send β connect as WS clients.
macOS, iOS, Android apps connect as WS clients to expose device capabilities.
Browser-based session management at http://127.0.0.1:18789.
The Gateway reads all configuration from ~/.openclaw/openclaw.json. It hot-reloads most settings without a restart.
| Section | Key Fields | Notes |
|---|---|---|
| agent | model, thinkingLevel | AI model and reasoning depth |
| channels.telegram | botToken, allowFrom, dmPolicy | Create bot via @BotFather |
| channels.slack | botToken, appToken | Socket Mode required |
| channels.discord | token | Message Content Intent required |
| gateway | bind, port, auth, tailscale | bind always "loopback" |
| agents.defaults | workspace, sandbox.mode | sandbox: "none" or "non-main" |
| browser | enabled, color | Browser automation toggle |
gateway.tailscale.mode = off / serve / funnelchannels.*.dmPolicy = "pairing" (recommended) or "open"agents.defaults.sandbox.mode = "none" (main) or "non-main" (Docker for groups)20+ messaging channels. One internal protocol. The Pi agent never knows which channel a message came from.
Each channel adapter runs inside the Gateway process. It normalizes inbound messages into OpenClaw's internal format and translates outbound replies back to each channel's native format. Telegram gets Markdown. Slack gets Block Kit. Discord gets embeds. The agent never knows the difference.
Baileys adapter. QR code login via openclaw channels login.
grammY adapter. Create bot via @BotFather, add botToken to config.
Bolt adapter. Socket Mode required. Install to workspace with bot scopes.
discord.js adapter. Message Content Intent required.
signal-cli adapter. Local Signal client required.
BlueBubbles adapter. Requires BlueBubbles Server on macOS.
Plus: Google Chat, Microsoft Teams, Matrix, IRC, LINE, Mattermost, Nostr, Tlon, Twitch, Zalo, WeChat, WebChat, and more.
The default security model for direct messages. Unknown senders get a pairing code β the bot ignores them until you approve.
@BotFather on TelegrambotToken to channels.telegram in openclaw.jsonThe Pi agent connects to the Gateway in RPC mode, receives messages, runs the agent loop, and streams replies.
Located at ~/.openclaw/workspace/. These files define your agent's personality and capabilities:
| File | Purpose |
|---|---|
| AGENTS.md | Your instructions β applies universally across all channels |
| SOUL.md | Personality, values, tone of voice |
| TOOLS.md | Tool descriptions and usage guidance |
| skills/<name>/SKILL.md | Per-skill instructions (see Phase 4) |
Your personal 1:1 with the assistant. Full tool access. No sandboxing by default. One per Gateway instance.
One per group chat thread. Keyed by group ID. Can be sandboxed independently via Docker containers.
| Field | Description |
|---|---|
| model | Which AI model to use for this session |
| thinkingLevel | off / minimal / low / medium / high / xhigh |
| verboseLevel | Controls response detail level |
| sendPolicy | Controls message sending behavior |
| groupActivation | How the agent activates in group chats |
| history | Conversation history for context |
| tokenCount | Tokens used in this session |
| cost | Running cost for this session |
| Command | What It Does |
|---|---|
| /new | Wipe history entirely β fresh session |
| /compact | Summarize and compress history |
| /think <level> | Change thinking depth for this session |
| /verbose | Toggle verbose output |
| /usage | Show token usage and costs |
| /status | Show session status |
| /activation | Configure group activation mode |
The sessions_* tools enable multi-agent coordination:
sessions_list β all active sessions with metadatasessions_history β transcript of a specific sessionsessions_send β message another sessionSkills = what the agent knows. Nodes = what the agent can do.
Skills are markdown files injected into the agent's context. They teach the agent specific workflows without changing the model. Think employee training manuals, not model fine-tuning.
Ship with OpenClaw. Always available. Includes: browser automation, Canvas, cron jobs.
Community registry at clawhub.com. Install on demand. Curated and versioned.
Your skills at ~/.openclaw/workspace/skills/<name>/SKILL.md. Active immediately, no restart.
Nodes are companion apps (macOS, iOS, Android) that pair with the Gateway via WebSocket and expose device-local capabilities. The agent invokes nodes via node.invoke β it never touches devices directly.
| Action | Description |
|---|---|
| system.run | Execute shell commands on the host machine |
| system.notify | macOS native notifications |
| canvas.* | Canvas drawing and manipulation |
| camera.snap | Take photos with connected camera |
| screen.record | Screen recording |
| location.get | Device location |
Elevated mode: type /elevated on for host permissions.
Voice Wake, Talk Mode, Canvas, camera, screen recording, Bonjour pairing.
Chat + Voice + Canvas, camera, screen recording, notifications, location, SMS, contacts, calendar.
Default-safe. Opt-in to exposure. Every increase in access requires explicit configuration.
The Gateway runs on loopback by design β only your machine can reach it. Tailscale provides secure remote access without opening ports.
Default. gateway.bind: "loopback". Only processes on this machine can connect. No auth needed.
Tailnet-only access. Tailscale identity = authentication. No password needed. Your devices on your tailnet.
Public internet access. Requires gateway.auth.mode: "password". OpenClaw refuses to start without it.
bash, process, read, write, edit, sessions_*
browser, canvas, nodes, cron, discord, gateway
gateway.bind: "loopback"dmPolicy: "pairing" on all channelsrequireMention: truesandbox.mode: "non-main" if groups connectedopenclaw doctor runs cleanAggregates all phase documentation into a static site and deploys it β or saves locally.
scripts/generate-docs.js reads all PHASE-*/DOCUMENTATION/*.md and AGENT-HANDOFF/*.md, combines with index.html into OUTPUT/local/, and optionally pushes to Cloudflare Pages.
npm install -g openclaw@latest then openclaw onboard --install-daemon. Runs as a systemd user service.
git clone openclaw && docker compose up -d. Container-based deployment.
nix run github:openclaw/nix-openclaw. Declarative configuration.
By completing all 6 phases, you now have:
ws://127.0.0.1:18789openclaw doctor passing all checks