Welcome back to another GitHub deep dive! Today we’re looking at OpenClaw, a personal AI assistant you run on your own devices. It answers you on the channels you already use—WhatsApp, Telegram, Slack, Discord, Google Chat, Signal, iMessage, Microsoft Teams, Matrix, Zalo, and even WebChat—all from a single local gateway.
If you’ve ever wished for a Jarvis-style assistant that lives on your machine, not someone else’s cloud, this is it.
Part 1: Foundations (The Mental Model)
Think of the cloud-based AI assistants (ChatGPT, Google Gemini, etc.) like renting an apartment. Someone else owns the building, sets the rules, and can look through your stuff anytime.
OpenClaw is like building your own house. You own the foundation, choose the furniture, and pick who gets a key. The “house” is a lightweight gateway service running on your machine, and the “rooms” are your messaging channels.
The Mental Model: OpenClaw = Local-First WebSocket Gateway + Multi-Channel Messaging Adapter + Pluggable AI Agent Runtime.
The gateway is the brain. It doesn’t care if a message comes from WhatsApp or Discord—it normalizes everything, routes it to an AI agent (powered by Claude, GPT, or any model you choose), and sends the response back through the same channel.
Part 2: The Investigation
Under the hood, OpenClaw is a TypeScript monorepo built on Node.js ≥22, designed as a WebSocket-based control plane. Here are the key architectural pillars:
The Gateway (Control Plane)
A single WebSocket server (ws://127.0.0.1:18789) that manages:
- Sessions: isolated conversation contexts per user/group/channel
- Channels: 14+ adapters (Baileys for WhatsApp, grammY for Telegram, Bolt for Slack, discord.js for Discord, signal-cli for Signal, etc.)
- Tools: browser control, canvas, cron jobs, webhooks, and more
- Events: real-time presence, typing indicators, and usage tracking
The Agent Runtime (Pi Agent)
OpenClaw uses the Pi agent in RPC mode with full tool streaming and block streaming. It supports:
- Model failover: rotate between OAuth subscriptions (Anthropic Pro/Max, OpenAI ChatGPT) and API keys with automatic fallback
- Session pruning: intelligent context management to keep conversations fresh
- Multi-agent routing: route different channels/accounts to isolated agents with separate workspaces
The Channel Adapters
Each messaging platform has a dedicated adapter:
| |
Companion Apps & Nodes
- macOS app: menu bar control, Voice Wake, push-to-talk, WebChat
- iOS node: Canvas surface, Voice Wake, camera, screen recording
- Android node: Canvas, camera, screen capture, optional SMS
Devices connect as “nodes” via the gateway WebSocket, enabling device-local actions like system.run, camera.snap, or screen.record while the heavy AI processing stays on the gateway host.
Part 3: The Diagnosis
What does this actually mean for developers? Let’s look at real use-cases.
Use-Case 1: Personal AI Across All Your Apps
Instead of switching between ChatGPT in a browser, a Telegram bot, and a Slack app, you get one assistant that follows you everywhere. Send it a question on WhatsApp during your commute, continue the conversation on Slack at work, and pick it up on iMessage at home—all using the same session context.
Use-Case 2: The CLI-Native Workflow
OpenClaw is CLI-first. You can interact with your AI without ever opening a chat app:
| |
Use-Case 3: Skills & Automation
OpenClaw has a skills system similar to IDE plugins. Skills live in ~/.openclaw/workspace/skills/ and follow a simple SKILL.md format. There’s even a ClawHub registry where the agent can search for and install skills autonomously:
| |
Use-Case 4: Cron Jobs & Webhooks
Schedule recurring tasks or react to external events:
| |
External webhooks can trigger the agent too—connect it to GitHub events, Gmail via Pub/Sub, or any service that can POST to a URL.
Use-Case 5: Browser Control
OpenClaw can launch and control a dedicated Chromium instance via CDP:
| |
The agent can browse websites, take snapshots, fill forms, and extract data—all orchestrated through natural language commands.
Part 4: The Resolution
Getting started takes about 5 minutes:
- Install globally:
| |
- Run the onboarding wizard:
| |
The wizard walks you through setting up your AI model (Anthropic, OpenAI, or local via Ollama), configuring channels, and installing the gateway as a background service (launchd on macOS, systemd on Linux).
- Start the gateway:
| |
- Connect a channel (e.g., Telegram):
| |
- Send a test message:
| |
For remote access, OpenClaw integrates with Tailscale Serve/Funnel out of the box—no port forwarding or reverse proxy needed.
Final Mental Model
| Aspect | Cloud AI Assistants | OpenClaw |
|---|---|---|
| Data ownership | Vendor’s servers | Your machine |
| Channels | One app per service | 14+ channels, one gateway |
| Customization | Limited | Full control (AGENTS.md, SOUL.md, skills) |
| Voice | App-specific | Always-on Voice Wake + Talk Mode |
| Automation | Zapier/IFTTT | Native cron, webhooks, Gmail Pub/Sub |
| Browser | None | CDP-controlled Chromium |
| Cost | Subscription per service | Your own API keys, your own rules |
OpenClaw transforms the “AI chatbot” concept from a scattered collection of vendor-locked apps into a unified, self-hosted, privacy-first AI control plane. For developers who value ownership and extensibility, it’s the most comprehensive personal AI gateway available today.
