Skip to main content

CLAWDBOT ๐Ÿฆž

โ€œEXFOLIATE! EXFOLIATE!โ€ โ€” A space lobster, probably

CLAWDBOT

WhatsApp + Telegram + Discord + iMessage gateway for AI agents (Pi).
Send a message, get an agent response โ€” from your pocket.

GitHub ยท Releases ยท Docs ยท Clawd setup

CLAWDBOT bridges WhatsApp (via WhatsApp Web / Baileys), Telegram (Bot API / grammY), Discord (Bot API / discord.js), and iMessage (imsg CLI) to coding agents like Pi. Itโ€™s built for Clawd, a space lobster who needed a TARDIS.

How it works

WhatsApp / Telegram / Discord
        โ”‚
        โ–ผ
  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚          Gateway          โ”‚  ws://127.0.0.1:18789 (loopback-only)
  โ”‚     (single source)       โ”‚  tcp://0.0.0.0:18790 (Bridge)
  โ”‚                          โ”‚  http://<gateway-host>:18793/__clawdbot__/canvas/ (Canvas host)
  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
              โ”‚
              โ”œโ”€ Pi agent (RPC)
              โ”œโ”€ CLI (clawdbot โ€ฆ)
              โ”œโ”€ Chat UI (SwiftUI)
              โ”œโ”€ macOS app (Clawdbot.app)
              โ””โ”€ iOS node via Bridge + pairing
Most operations flow through the Gateway (clawdbot gateway), a single long-running process that owns provider connections and the WebSocket control plane.

Network model

  • One Gateway per host: it is the only process allowed to own the WhatsApp Web session.
  • Loopback-first: Gateway WS defaults to ws://127.0.0.1:18789.
    • For Tailnet access, run clawdbot gateway --bind tailnet --token ... (token is required for non-loopback binds).
  • Bridge for nodes: optional LAN/tailnet-facing bridge on tcp://0.0.0.0:18790 for paired nodes (Bonjour-discoverable).
  • Canvas host: HTTP file server on canvasHost.port (default 18793), serving /__clawdbot__/canvas/ for node WebViews; see docs/configuration.md (canvasHost).
  • Remote use: SSH tunnel or tailnet/VPN; see docs/remote.md and docs/discovery.md.

Features (high level)

  • ๐Ÿ“ฑ WhatsApp Integration โ€” Uses Baileys for WhatsApp Web protocol
  • โœˆ๏ธ Telegram Bot โ€” DMs + groups via grammY
  • ๐ŸŽฎ Discord Bot โ€” DMs + guild channels via discord.js
  • ๐Ÿ’ฌ iMessage โ€” Local imsg CLI integration (macOS)
  • ๐Ÿค– Agent bridge โ€” Pi (RPC mode) with tool streaming
  • ๐Ÿ’ฌ Sessions โ€” Direct chats collapse into shared main (default); groups are isolated
  • ๐Ÿ‘ฅ Group Chat Support โ€” Mention-based by default; owner can toggle /activation always|mention
  • ๐Ÿ“Ž Media Support โ€” Send and receive images, audio, documents
  • ๐ŸŽค Voice notes โ€” Optional transcription hook
  • ๐Ÿ–ฅ๏ธ WebChat + macOS app โ€” Local UI + menu bar companion for ops and voice wake
  • ๐Ÿ“ฑ iOS node โ€” Pairs as a node and exposes a Canvas surface
Note: legacy Claude/Codex/Gemini/Opencode paths have been removed; Pi is the only coding-agent path.

Quick start

Runtime requirement: Node โ‰ฅ 22.
# From source (recommended while the npm package is still settling)
pnpm install
pnpm build
pnpm link --global

# Pair WhatsApp Web (shows QR)
clawdbot login

# Run the Gateway (leave running)
clawdbot gateway --port 18789
Multi-instance quickstart (optional):
CLAWDBOT_CONFIG_PATH=~/.clawdbot/a.json \
CLAWDBOT_STATE_DIR=~/.clawdbot-a \
clawdbot gateway --port 19001
Send a test message (requires a running Gateway):
clawdbot send --to +15555550123 --message "Hello from CLAWDBOT"

Configuration (optional)

Config lives at ~/.clawdbot/clawdbot.json.
  • If you do nothing, CLAWDBOT uses the bundled Pi binary in RPC mode with per-sender sessions.
  • If you want to lock it down, start with whatsapp.allowFrom and (for groups) mention rules.
Example:
{
  whatsapp: {
    allowFrom: ["+15555550123"],
    groups: { "*": { requireMention: true } }
  },
  routing: { groupChat: { mentionPatterns: ["@clawd"] } }
}

Docs

The name

CLAWDBOT = CLAW + TARDIS โ€” because every space lobster needs a time-and-space machine.
โ€œWeโ€™re all just playing with our own prompts.โ€ โ€” an AI, probably high on tokens

Credits

  • Peter Steinberger (@steipete) โ€” Creator, lobster whisperer
  • Mario Zechner (@badlogicc) โ€” Pi creator, security pen-tester
  • Clawd โ€” The space lobster who demanded a better name

Core Contributors

License

MIT โ€” Free as a lobster in the ocean ๐Ÿฆž
โ€œWeโ€™re all just playing with our own prompts.โ€ โ€” An AI, probably high on tokens