Know what goes where
Workspace file map.
In our experience, the biggest source of confusion is mixing up two directories. The config directory stores credentials and settings. The workspace stores your agent's memory and instructions. We recommend keeping them strictly separate.
The workspace core
The 5 files that matter most.
These files are injected into every agent session. Based on our testing, getting these five right is the difference between a helpful assistant and one that forgets everything by tomorrow.
Configuration mistakes are the #1 reason people get stuck. The workshop walks you through every file in the workspace, with real examples and explanations for each setting. Start the $19 workshop
Connect a channel
First channel setup.
Channels let you message your agent from Telegram, WhatsApp, or Discord instead of the browser. We recommend starting with Telegram (it takes about two minutes), then adding others once you are comfortable.
- Message @BotFather on Telegram and create a new bot
- Copy the bot token BotFather gives you
- Run the command below to add the channel
- Message your bot to verify it responds
Telegram is the easiest channel to set up. No phone number required, no QR scanning. Just a bot token.
Setting up channels can take a full afternoon if you're starting from scratch. The $19 workshop covers WhatsApp, Telegram, and Discord setup in under 15 minutes. Learn more
Background automation
The heartbeat system.
What it does
Every 30 minutes (default), the Gateway sends the agent a "heartbeat" message. The agent reads HEARTBEAT.md and executes the checklist. Check emails, review calendar events, monitor feeds. If nothing needs attention, it replies HEARTBEAT_OK silently.
Why disable it first
Each heartbeat costs one API call. Until you trust your agent's instructions and tool access, heartbeats can surprise you with unexpected actions. Disable with agents.defaults.heartbeat.every set to "0m" in config.
When to enable it
Once your AGENTS.md, SOUL.md, and security settings are dialed in. Start with a simple checklist (check email, check calendar). Expand as you build confidence.
Example HEARTBEAT.md
How your agent remembers
The memory system.
OpenClaw memory is plain Markdown files in your workspace. No proprietary database, no cloud sync. Just files on disk that you control, back up, and edit. We recommend this approach because it gives you full visibility into what your agent remembers.
Daily logs
memory/YYYY-MM-DD.mdThe agent creates one file per day. Append-only log of decisions, context, and important events. On session start, the agent reads today and yesterday automatically.
Long-term memory
MEMORY.md (optional)Curated facts, preferences, and decisions that matter across weeks and months. Only loaded in the main session (direct chats). Never shared in group contexts for security.
Auto-compaction protection: When a session nears the model's context limit, OpenClaw automatically triggers a silent memory flush before compacting. The agent writes durable notes to disk so critical context survives the compression. This happens behind the scenes with no user intervention required.
Practical paranoia
Back up your brain.
Your workspace is your agent's memory. We strongly recommend putting it in a private git repo. We have seen people lose weeks of agent tuning to an accidental rm command. A simple git init prevents that entirely.
Keep the repo private. Your workspace contains personal context, preferences, and memory. Never commit API keys, OAuth tokens, or anything from ~/.openclaw/ (config directory). Add a .gitignore with: .env, *.key, *.pem, **/secrets*
Save yourself the frustration
Common configuration mistakes.
We see these come up constantly. Each one is easy to fix once you know what to look for, and frustrating if you do not.
API key not working after adding to openclaw.json
API keys in the config file must be quoted strings. Use: openclaw config set models.providers.anthropic.apiKey '"sk-ant-..."' --json. Or set the ANTHROPIC_API_KEY environment variable instead (recommended).
Port 18789 already in use
Another Gateway instance is running. Check with "openclaw gateway status" or "lsof -i :18789". Stop the existing one with "openclaw gateway stop" before starting a new one.
Forgetting to save .env after editing
If you use ~/.openclaw/.env for secrets, the Gateway reads it on startup. After editing, restart: openclaw gateway restart. Changes do not apply until restart.
Docker sandbox permission denied on workspace files
Sandbox containers run as uid 1000 by default. If your workspace files are owned by a different user, set agents.defaults.sandbox.docker.user to match, or chown the workspace: "sudo chown -R 1000:1000 ~/.openclaw/workspace".
WhatsApp QR code expires before scanning
Run "openclaw channels login" and scan within 60 seconds. If it expires, run the command again for a fresh QR. Make sure you are scanning from the assistant phone, not your personal one.
Agent replies in all group chats without being mentioned
By default, the agent replies when mentioned in groups. If it is replying to everything, check your group settings. Set channels.whatsapp.groups.requireMention to true in config.
Written by
Kevin Jeppesen
Founder, The Operator Vault
Kevin is an early OpenClaw adopter who has saved an estimated 400 to 500 hours through AI automation. He stress-tests new workflows daily, sharing what actually works through step-by-step guides and a security-conscious approach to operating AI with real tools.
Setup FAQ
Questions about configuration.
Get the walkthrough.
Skip the trial and error.
The $19 workshop covers install, security basics, your first run, first workflow, and connecting channels. Real commands, real results.
