OpenClaw Overview
OpenClaw is Pi Agent’s multi-platform message gateway, connecting your AI agent with WhatsApp, Telegram, Discord, and iMessage so you can interact naturally with the agent through familiar instant messaging apps.
Core Capabilities
Multi-Platform Message Access
- Lark (Feishu) - Enterprise collaboration platform with bot DMs and groups (WebSocket long connection)
- WhatsApp - Connect via WhatsApp Web to chat with the agent from a personal or dedicated number
- Telegram - Bot integration with DMs and groups
- Discord - Server bot integration with channel messages
- iMessage - Native messaging on macOS
- Mattermost - Enterprise collaboration platform (plugin extension)
Agent Workspace
OpenClaw uses a workspace directory to manage the agent’s instructions and memory:
AGENTS.md- Agent behavior configurationSOUL.md- Agent persona and personalityTOOLS.md- Available tools descriptionIDENTITY.md- Agent identityUSER.md- User preferencesHEARTBEAT.md- Scheduled task instructions (optional)
Default workspace path: ~/.openclaw/workspace
Session Management
- Session isolation - Isolate sessions by sender (
per-sendermode) - Context reset - Start a new session with
/newor/reset - Context compaction - Use
/compactto shorten long sessions and save tokens - Auto reset - Optional reset by time or idle duration
Heartbeat (Proactive Mode)
The agent can run periodic checks at a configured interval (default 30 minutes) and execute maintenance tasks defined in HEARTBEAT.md.
Typical Use Cases
| Scenario | Description |
|---|---|
| Personal AI assistant | Use the Pi agent as a 24/7 personal assistant for questions anytime |
| Team support bot | Add the agent to Telegram/Discord groups to answer common questions |
| Automated tasks | Use heartbeat to check system status and send reports on a schedule |
| Remote control | Have the agent run commands on your machine via chat (requires tool setup) |
Architecture Overview
Your phone (personal) Second phone (assistant)
┌─────────────────┐ ┌─────────────────┐
│ Your WhatsApp │ ──────▶ │ Assistant WA │
│ +1-555-YOU │ messages │ +1-555-ASSIST │
└─────────────────┘ └────────┬────────┘
│ QR code pairing
▼
┌─────────────────┐
│ Your server/Mac │
│ (openclaw) │
│ Pi Agent │
└─────────────────┘
Security Recommendations
OpenClaw gives the agent the following capabilities; configure with care:
- Run commands on your machine (depending on Pi tool configuration)
- Read and write workspace files
- Send messages via linked chat accounts
Recommended practices:
- Always set
channels.whatsapp.allowFromto limit allowed numbers - Use a dedicated WhatsApp number for the assistant, not your personal number
- Disable heartbeat on first deploy by setting the interval to
"0m", then enable after you are familiar with the system
Common Commands
openclaw setup # Initialize workspace
openclaw status # View local status
openclaw status --all # Full diagnostic info
openclaw dashboard # Open web dashboard
openclaw channels login # Log in to message channels
openclaw gateway # Start gateway service