2025-12-09 17:51:05 +00:00
---
2026-01-04 14:32:47 +00:00
summary: "End-to-end guide for running Clawdbot as a personal assistant with safety cautions"
2025-12-09 17:51:05 +00:00
read_when:
- Onboarding a new assistant instance
- Reviewing safety/permission implications
---
2026-01-04 14:32:47 +00:00
# Building a personal assistant with CLAWDBOT (Clawd-style)
2025-11-25 12:11:05 +01:00
2026-01-04 14:32:47 +00:00
CLAWDBOT is a WhatsApp + Telegram + Discord gateway for **Pi** agents. This guide is the “personal assistant” setup: one dedicated WhatsApp number that behaves like your always-on agent.
2025-12-05 17:50:02 +00:00
2025-12-13 13:25:49 +00:00
## ⚠️ Safety first
2025-11-27 18:21:14 +01:00
2025-12-13 13:25:49 +00:00
You’ re putting an agent in a position to:
- run commands on your machine (depending on your Pi tool setup)
- read/write files in your workspace
2025-12-15 10:11:18 -06:00
- send messages back out via WhatsApp/Telegram/Discord
2025-11-27 18:23:56 +01:00
2025-12-13 13:25:49 +00:00
Start conservative:
2026-01-02 12:59:47 +01:00
- Always set `whatsapp.allowFrom` (never run open-to-the-world on your personal Mac).
2025-12-13 13:25:49 +00:00
- Use a dedicated WhatsApp number for the assistant.
2025-12-26 01:13:13 +01:00
- Keep heartbeats disabled until you trust the setup (omit `agent.heartbeat` or set `agent.heartbeat.every: "0m"` ).
2025-11-27 18:23:56 +01:00
2025-12-13 13:25:49 +00:00
## Prerequisites
2025-11-27 18:29:41 +01:00
2025-12-13 13:25:49 +00:00
- Node **22+**
2026-01-04 14:32:47 +00:00
- CLAWDBOT available on PATH (recommended during development: from source + global link)
2025-12-13 13:25:49 +00:00
- A second phone number (SIM/eSIM/prepaid) for the assistant
2025-11-27 18:29:41 +01:00
2025-12-14 00:50:26 +00:00
From source (recommended while the npm package is still settling):
```bash
pnpm install
pnpm build
pnpm link --global
```
2025-12-13 13:25:49 +00:00
## The two-phone setup (recommended)
2025-11-27 18:29:41 +01:00
2025-12-13 13:25:49 +00:00
You want this:
2025-11-27 18:29:41 +01:00
```
2025-12-13 13:25:49 +00:00
Your Phone (personal) Second Phone (assistant)
2025-11-27 18:29:41 +01:00
┌─────────────────┐ ┌─────────────────┐
2025-12-13 13:25:49 +00:00
│ Your WhatsApp │ ──────▶ │ Assistant WA │
2025-11-27 18:29:41 +01:00
│ +1-555-YOU │ message │ +1-555-CLAWD │
└─────────────────┘ └────────┬────────┘
│ linked via QR
▼
┌─────────────────┐
│ Your Mac │
2026-01-04 14:32:47 +00:00
│ (clawdbot) │
2025-12-13 13:25:49 +00:00
│ Pi agent │
2025-11-27 18:29:41 +01:00
└─────────────────┘
```
2026-01-04 14:32:47 +00:00
If you link your personal WhatsApp to CLAWDBOT, every message to you becomes “agent input”. That’ s rarely what you want.
2025-11-27 18:43:24 +01:00
2025-12-13 13:25:49 +00:00
## 5-minute quick start
2025-11-27 18:21:14 +01:00
2025-12-13 13:25:49 +00:00
1) Pair WhatsApp Web (shows QR; scan with the assistant phone):
2025-11-27 18:21:14 +01:00
2025-12-13 13:25:49 +00:00
```bash
2026-01-04 14:32:47 +00:00
clawdbot login
2025-11-27 18:21:14 +01:00
```
2025-12-13 13:25:49 +00:00
2) Start the Gateway (leave it running):
2025-11-27 18:21:14 +01:00
2025-12-13 13:25:49 +00:00
```bash
2026-01-04 14:32:47 +00:00
clawdbot gateway --port 18789
2025-11-27 18:21:14 +01:00
```
2026-01-04 14:32:47 +00:00
3) Put a minimal config in `~/.clawdbot/clawdbot.json` :
2025-11-27 18:21:14 +01:00
```json5
{
2026-01-02 12:59:47 +01:00
whatsapp: {
2025-12-13 13:25:49 +00:00
allowFrom: ["+15555550123"]
2025-11-27 18:21:14 +01:00
}
}
```
2025-12-13 13:25:49 +00:00
Now message the assistant number from your allowlisted phone.
2025-11-27 18:21:14 +01:00
2026-01-06 12:58:39 -05:00
## Give the agent a workspace (AGENTS)
2025-12-14 02:59:31 +00:00
2025-12-17 11:29:12 +01:00
Clawd reads operating instructions and “memory” from its workspace directory.
2025-12-14 03:14:51 +00:00
2026-01-06 19:50:06 +01:00
By default, Clawdbot uses `~/clawd` 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).
2025-12-14 02:59:31 +00:00
2025-12-14 03:18:56 +00:00
Tip: treat this folder like Clawd’ s “memory” and make it a git repo (ideally private) so your `AGENTS.md` + memory files are backed up.
2025-12-14 02:59:31 +00:00
```bash
2026-01-04 14:32:47 +00:00
clawdbot setup
2025-12-14 02:59:31 +00:00
```
2025-12-23 23:45:20 +00:00
Optional: choose a different workspace with `agent.workspace` (supports `~` ).
2025-12-14 02:59:31 +00:00
```json5
{
2025-12-24 00:22:57 +00:00
agent: {
2025-12-14 03:14:51 +00:00
workspace: "~/clawd"
2025-12-14 02:59:31 +00:00
}
}
```
2026-01-06 19:50:06 +01:00
If you already ship your own workspace files from a repo, you can disable bootstrap file creation entirely:
```json5
{
agent: {
skipBootstrap: true
}
}
```
2025-12-13 13:25:49 +00:00
## The config that turns it into “an assistant”
2025-11-27 18:21:14 +01:00
2026-01-04 14:32:47 +00:00
CLAWDBOT defaults to a good assistant setup, but you’ ll usually want to tune:
2025-12-17 11:29:12 +01:00
- persona/instructions in `SOUL.md`
2025-12-13 13:25:49 +00:00
- thinking defaults (if desired)
- heartbeats (once you trust it)
2025-11-27 18:21:14 +01:00
2025-12-13 13:25:49 +00:00
Example:
2025-11-27 18:21:14 +01:00
```json5
{
2025-12-13 13:25:49 +00:00
logging: { level: "info" },
2025-12-24 00:22:57 +00:00
agent: {
2025-12-26 00:43:44 +01:00
model: "anthropic/claude-opus-4-5",
2025-12-17 11:29:12 +01:00
workspace: "~/clawd",
2025-12-24 00:22:57 +00:00
thinkingDefault: "high",
timeoutSeconds: 1800,
// Start with 0; enable later.
2025-12-26 01:13:13 +01:00
heartbeat: { every: "0m" }
2025-12-24 00:22:57 +00:00
},
2026-01-02 12:59:47 +01:00
whatsapp: {
2026-01-02 22:23:00 +01:00
allowFrom: ["+15555550123"],
groups: {
"*": { requireMention: true }
}
2026-01-02 12:59:47 +01:00
},
2025-12-24 00:22:57 +00:00
routing: {
2025-12-13 13:25:49 +00:00
groupChat: {
mentionPatterns: ["@clawd ", "clawd"]
2025-11-25 12:11:05 +01:00
}
2025-12-24 00:22:57 +00:00
},
session: {
scope: "per-sender",
resetTriggers: ["/new", "/reset"],
2026-01-03 23:57:17 +00:00
idleMinutes: 10080
2025-11-25 12:11:05 +01:00
}
}
```
2025-12-13 13:25:49 +00:00
## Sessions and memory
2025-11-27 18:21:14 +01:00
2026-01-06 18:25:52 +00:00
- Session files: `~/.clawdbot/agents/<agentId>/sessions/{{SessionId}}.jsonl`
- Session metadata (token usage, last route, etc): `~/.clawdbot/agents/<agentId>/sessions/sessions.json` (legacy: `~/.clawdbot/sessions/sessions.json` )
2025-12-22 20:36:34 +01:00
- `/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.
2026-01-06 02:06:06 +01:00
- `/compact [instructions]` compacts the session context and reports the remaining context budget.
2025-11-27 18:21:14 +01:00
2025-12-13 13:25:49 +00:00
## Heartbeats (proactive mode)
2025-11-27 18:21:14 +01:00
2026-01-04 14:32:47 +00:00
When `agent.heartbeat.every` is set to a positive interval, CLAWDBOT periodically runs a heartbeat prompt (default: `HEARTBEAT` ).
2025-12-08 12:43:13 +01:00
2026-01-05 22:52:13 +00:00
- If the agent replies with `HEARTBEAT_OK` (optionally with short padding; see `agent.heartbeat.ackMaxChars` ), CLAWDBOT suppresses outbound delivery for that heartbeat.
2025-11-27 18:21:14 +01:00
2025-11-25 12:11:05 +01:00
```json5
{
2025-12-24 00:22:57 +00:00
agent: {
2025-12-26 01:13:13 +01:00
heartbeat: { every: "30m" }
2025-11-25 12:11:05 +01:00
}
}
```
2025-12-13 13:25:49 +00:00
## Media in and out
2025-11-27 18:21:14 +01:00
2025-12-13 13:25:49 +00:00
Inbound attachments (images/audio/docs) can be surfaced to your command via templates:
- `{{MediaPath}}` (local temp file path)
- `{{MediaUrl}}` (pseudo-URL)
- `{{Transcript}}` (if audio transcription is enabled)
2025-11-27 18:21:14 +01:00
2025-12-13 13:25:49 +00:00
Outbound attachments from the agent: include `MEDIA:<path-or-url>` on its own line (no spaces). Example:
2025-11-27 18:21:14 +01:00
```
2025-12-13 13:25:49 +00:00
Here’ s the screenshot.
MEDIA:/tmp/screenshot.png
2025-11-27 21:00:28 +00:00
```
2026-01-04 14:32:47 +00:00
CLAWDBOT extracts these and sends them as media alongside the text.
2025-11-27 21:00:28 +00:00
2025-12-13 13:25:49 +00:00
## Operations checklist
2025-11-27 21:00:28 +00:00
```bash
2026-01-04 14:32:47 +00:00
clawdbot status # local status (creds, sessions, queued events)
clawdbot status --deep # also probes the running Gateway (WA connect + Telegram)
clawdbot health --json # gateway health snapshot (WS)
2025-11-27 21:00:28 +00:00
```
2026-01-04 14:32:47 +00:00
Logs live under `/tmp/clawdbot/` (default: `clawdbot-YYYY-MM-DD.log` ).
2025-11-27 18:59:01 +01:00
2025-12-13 13:25:49 +00:00
## Next steps
2025-11-27 18:21:14 +01:00
2026-01-06 18:59:06 +01:00
- WebChat: [WebChat ](https://docs.clawd.bot/webchat )
- Gateway ops: [Gateway runbook ](https://docs.clawd.bot/gateway )
- Cron + wakeups: [Cron + wakeups ](https://docs.clawd.bot/cron )
- macOS menu bar companion: [Clawdbot macOS app ](https://docs.clawd.bot/macos )
- iOS node app: [iOS app ](https://docs.clawd.bot/ios )
- Android node app: [Android app ](https://docs.clawd.bot/android )
- Windows status: [Windows app ](https://docs.clawd.bot/windows )
- Linux status: [Linux app ](https://docs.clawd.bot/linux )
- Security: [Security ](https://docs.clawd.bot/security )