{
  "title": "or: pnpm add -g openclaw@latest",
  "content": "bash theme={null}\ngit clone https://github.com/openclaw/openclaw.git\ncd openclaw\npnpm install\npnpm ui:build # auto-installs UI deps on first run\npnpm build\npnpm link --global\n\nYour Phone (personal)          Second Phone (assistant)\n┌─────────────────┐           ┌─────────────────┐\n│  Your WhatsApp  │  ──────▶  │  Assistant WA   │\n│  +1-555-YOU     │  message  │  +1-555-ASSIST  │\n└─────────────────┘           └────────┬────────┘\n                                       │ linked via QR\n                                       ▼\n                              ┌─────────────────┐\n                              │  Your Mac       │\n                              │  (openclaw)      │\n                              │    Pi agent     │\n                              └─────────────────┘\nbash theme={null}\nopenclaw channels login\nbash theme={null}\nopenclaw gateway --port 18789\njson5 theme={null}\n{\n  channels: { whatsapp: { allowFrom: [\"+15555550123\"] } },\n}\nbash theme={null}\nopenclaw setup\njson5 theme={null}\n{\n  agent: {\n    workspace: \"~/.openclaw/workspace\",\n  },\n}\njson5 theme={null}\n{\n  agent: {\n    skipBootstrap: true,\n  },\n}\njson5 theme={null}\n{\n  logging: { level: \"info\" },\n  agent: {\n    model: \"anthropic/claude-opus-4-5\",\n    workspace: \"~/.openclaw/workspace\",\n    thinkingDefault: \"high\",\n    timeoutSeconds: 1800,\n    // Start with 0; enable later.\n    heartbeat: { every: \"0m\" },\n  },\n  channels: {\n    whatsapp: {\n      allowFrom: [\"+15555550123\"],\n      groups: {\n        \"*\": { requireMention: true },\n      },\n    },\n  },\n  routing: {\n    groupChat: {\n      mentionPatterns: [\"@openclaw\", \"openclaw\"],\n    },\n  },\n  session: {\n    scope: \"per-sender\",\n    resetTriggers: [\"/new\", \"/reset\"],\n    reset: {\n      mode: \"daily\",\n      atHour: 4,\n      idleMinutes: 10080,\n    },\n  },\n}\njson5 theme={null}\n{\n  agent: {\n    heartbeat: { every: \"30m\" },\n  },\n}\n\nHere’s the screenshot.\nMEDIA:https://example.com/screenshot.png\nbash theme={null}\nopenclaw status          # local status (creds, sessions, queued events)\nopenclaw status --all    # full diagnosis (read-only, pasteable)\nopenclaw status --deep   # adds gateway health probes (Telegram + Discord)\nopenclaw health --json   # gateway health snapshot (WS)\n```\n\nLogs live under `/tmp/openclaw/` (default: `openclaw-YYYY-MM-DD.log`).\n\n* WebChat: [WebChat](/web/webchat)\n* Gateway ops: [Gateway runbook](/gateway)\n* Cron + wakeups: [Cron jobs](/automation/cron-jobs)\n* macOS menu bar companion: [OpenClaw macOS app](/platforms/macos)\n* iOS node app: [iOS app](/platforms/ios)\n* Android node app: [Android app](/platforms/android)\n* Windows status: [Windows (WSL2)](/platforms/windows)\n* Linux status: [Linux app](/platforms/linux)\n* Security: [Security](/gateway/security)",
  "code_samples": [
    {
      "code": "From source (development):",
      "language": "unknown"
    },
    {
      "code": "## The two-phone setup (recommended)\n\nYou want this:",
      "language": "unknown"
    },
    {
      "code": "If you link your personal WhatsApp to OpenClaw, every message to you becomes “agent input”. That’s rarely what you want.\n\n## 5-minute quick start\n\n1. Pair WhatsApp Web (shows QR; scan with the assistant phone):",
      "language": "unknown"
    },
    {
      "code": "2. Start the Gateway (leave it running):",
      "language": "unknown"
    },
    {
      "code": "3. Put a minimal config in `~/.openclaw/openclaw.json`:",
      "language": "unknown"
    },
    {
      "code": "Now message the assistant number from your allowlisted phone.\n\nWhen onboarding finishes, we auto-open the dashboard with your gateway token and print the tokenized link. To reopen later: `openclaw dashboard`.\n\n## Give the agent a workspace (AGENTS)\n\nOpenClaw reads operating instructions and “memory” from its workspace directory.\n\nBy default, OpenClaw uses `~/.openclaw/workspace` as the agent workspace, and will create it (plus starter `AGENTS.md`, `SOUL.md`, `TOOLS.md`, `IDENTITY.md`, `USER.md`) automatically on setup/first agent run. `BOOTSTRAP.md` is only created when the workspace is brand new (it should not come back after you delete it).\n\nTip: treat this folder like OpenClaw’s “memory” and make it a git repo (ideally private) so your `AGENTS.md` + memory files are backed up. If git is installed, brand-new workspaces are auto-initialized.",
      "language": "unknown"
    },
    {
      "code": "Full workspace layout + backup guide: [Agent workspace](/concepts/agent-workspace)\nMemory workflow: [Memory](/concepts/memory)\n\nOptional: choose a different workspace with `agents.defaults.workspace` (supports `~`).",
      "language": "unknown"
    },
    {
      "code": "If you already ship your own workspace files from a repo, you can disable bootstrap file creation entirely:",
      "language": "unknown"
    },
    {
      "code": "## The config that turns it into “an assistant”\n\nOpenClaw defaults to a good assistant setup, but you’ll usually want to tune:\n\n* persona/instructions in `SOUL.md`\n* thinking defaults (if desired)\n* heartbeats (once you trust it)\n\nExample:",
      "language": "unknown"
    },
    {
      "code": "## Sessions and memory\n\n* Session files: `~/.openclaw/agents/<agentId>/sessions/{{SessionId}}.jsonl`\n* Session metadata (token usage, last route, etc): `~/.openclaw/agents/<agentId>/sessions/sessions.json` (legacy: `~/.openclaw/sessions/sessions.json`)\n* `/new` or `/reset` starts a fresh session for that chat (configurable via `resetTriggers`). If sent alone, the agent replies with a short hello to confirm the reset.\n* `/compact [instructions]` compacts the session context and reports the remaining context budget.\n\n## Heartbeats (proactive mode)\n\nBy default, OpenClaw runs a heartbeat every 30 minutes with the prompt:\n`Read HEARTBEAT.md if it exists (workspace context). Follow it strictly. Do not infer or repeat old tasks from prior chats. If nothing needs attention, reply HEARTBEAT_OK.`\nSet `agents.defaults.heartbeat.every: \"0m\"` to disable.\n\n* If `HEARTBEAT.md` exists but is effectively empty (only blank lines and markdown headers like `# Heading`), OpenClaw skips the heartbeat run to save API calls.\n* If the file is missing, the heartbeat still runs and the model decides what to do.\n* If the agent replies with `HEARTBEAT_OK` (optionally with short padding; see `agents.defaults.heartbeat.ackMaxChars`), OpenClaw suppresses outbound delivery for that heartbeat.\n* Heartbeats run full agent turns — shorter intervals burn more tokens.",
      "language": "unknown"
    },
    {
      "code": "## Media in and out\n\nInbound attachments (images/audio/docs) can be surfaced to your command via templates:\n\n* `{{MediaPath}}` (local temp file path)\n* `{{MediaUrl}}` (pseudo-URL)\n* `{{Transcript}}` (if audio transcription is enabled)\n\nOutbound attachments from the agent: include `MEDIA:<path-or-url>` on its own line (no spaces). Example:",
      "language": "unknown"
    },
    {
      "code": "OpenClaw extracts these and sends them as media alongside the text.\n\n## Operations checklist",
      "language": "unknown"
    }
  ],
  "headings": [
    {
      "level": "h2",
      "text": "The two-phone setup (recommended)",
      "id": "the-two-phone-setup-(recommended)"
    },
    {
      "level": "h2",
      "text": "5-minute quick start",
      "id": "5-minute-quick-start"
    },
    {
      "level": "h2",
      "text": "Give the agent a workspace (AGENTS)",
      "id": "give-the-agent-a-workspace-(agents)"
    },
    {
      "level": "h2",
      "text": "The config that turns it into “an assistant”",
      "id": "the-config-that-turns-it-into-“an-assistant”"
    },
    {
      "level": "h2",
      "text": "Sessions and memory",
      "id": "sessions-and-memory"
    },
    {
      "level": "h2",
      "text": "Heartbeats (proactive mode)",
      "id": "heartbeats-(proactive-mode)"
    },
    {
      "level": "h2",
      "text": "Media in and out",
      "id": "media-in-and-out"
    },
    {
      "level": "h2",
      "text": "Operations checklist",
      "id": "operations-checklist"
    },
    {
      "level": "h2",
      "text": "Next steps",
      "id": "next-steps"
    }
  ],
  "url": "llms-txt#or:-pnpm-add--g-openclaw@latest",
  "links": []
}