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-10 05:14:09 +01:00
# Building a personal assistant with Clawdbot (Clawd-style)
2025-11-25 12:11:05 +01:00
2026-01-10 05:14:09 +01: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.
2026-01-09 12:44:23 +00:00
- Heartbeats now default to every 30 minutes. Disable until you trust the setup by setting `agents.defaults.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-10 05:14:09 +01:00
- Clawdbot available on PATH (recommended: global install)
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
2026-01-08 09:59:10 +01:00
```bash
2026-01-08 10:07:13 +01:00
npm install -g clawdbot@latest
# or: pnpm add -g clawdbot@latest
2026-01-08 09:59:10 +01:00
```
From source (development):
2025-12-14 00:50:26 +00:00
```bash
2026-01-08 09:59:10 +01:00
git clone https://github.com/clawdbot/clawdbot.git
cd clawdbot
2025-12-14 00:50:26 +00:00
pnpm install
2026-01-09 07:02:42 +00:00
pnpm ui:build # auto-installs UI deps on first run
2025-12-14 00:50:26 +00:00
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-10 05:14:09 +01: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-08 07:40:08 +01:00
clawdbot providers 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
```
2026-01-10 14:51:21 -06:00
Full workspace layout + backup guide: [Agent workspace ](/concepts/agent-workspace )
2026-01-07 00:04:03 +01:00
2026-01-09 12:44:23 +00:00
Optional: choose a different workspace with `agents.defaults.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-10 05:14:09 +01: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-10 05:14:09 +01:00
By default, Clawdbot runs a heartbeat every 30 minutes with the prompt:
2026-01-06 21:54:19 +00:00
`Read HEARTBEAT.md if exists. Consider outstanding tasks. Checkup sometimes on your human during (user local) day time.`
2026-01-09 12:44:23 +00:00
Set `agents.defaults.heartbeat.every: "0m"` to disable.
2025-12-08 12:43:13 +01:00
2026-01-10 05:14:09 +01:00
- If the agent replies with `HEARTBEAT_OK` (optionally with short padding; see `agents.defaults.heartbeat.ackMaxChars` ), Clawdbot suppresses outbound delivery for that heartbeat.
2026-01-06 22:28:32 +00:00
- Heartbeats run full agent turns — shorter intervals burn more tokens.
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-10 05:14:09 +01: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)
2026-01-10 23:31:24 +01:00
clawdbot status --all # full diagnosis (read-only, pasteable)
2026-01-11 02:42:14 +01:00
clawdbot status --deep # adds gateway health probes (Telegram + Discord)
2026-01-04 14:32:47 +00:00
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-07 02:04:02 +01:00
- WebChat: [WebChat ](/web/webchat )
2026-01-06 23:32:12 +00:00
- Gateway ops: [Gateway runbook ](/gateway )
2026-01-07 02:04:02 +01:00
- Cron + wakeups: [Cron jobs ](/automation/cron-jobs )
- macOS menu bar companion: [Clawdbot macOS app ](/platforms/macos )
- iOS node app: [iOS app ](/platforms/ios )
- Android node app: [Android app ](/platforms/android )
- Windows status: [Windows (WSL2) ](/platforms/windows )
- Linux status: [Linux app ](/platforms/linux )
- Security: [Security ](/gateway/security )