Core CLI Commands
openclaw gatewayRun WebSocket Gateway serveropenclaw gateway start|stop|restartManage Gateway service (launchd/systemd)openclaw channels loginWhatsApp QR pairing (Web flow)openclaw channels addAdd Telegram/Discord/Slack botopenclaw channels status --probeCheck channel health + connectivityopenclaw onboardInteractive setup wizardopenclaw doctorHealth checks + quick fixesopenclaw config get|set|unsetRead/write config values (JSON5 or raw)openclaw models list|set|statusModel management + auth statusopenclaw models auth setup-tokenPreferred Anthropic auth flowopenclaw models fallbacks add|removeConfigure model fallback chainopenclaw memory status|index|searchVector search over MEMORY.md + daily logsopenclaw agents list|add|deleteMulti-agent workspace managementopenclaw logs --followTail Gateway file logs via RPCopenclaw status --all --deepFull diagnosis (pasteable)openclaw sessions --jsonList stored conversation sessionsopenclaw security auditAudit config for security foot-gunsopenclaw browser start|tabs|screenshotHeadless browser automationopenclaw cron list|add|runScheduled job managementopenclaw pairing list|approveApprove DM pairing requestsopenclaw reset --scopeReset config/creds/sessions/fullGlobal Flags
--devIsolate state under ~/.openclaw-dev, shift ports
--profile <name>Isolate state under ~/.openclaw-<name>
--no-colorDisable ANSI colors (respects NO_COLOR=1)
--jsonMachine-readable output (disables styling)
-V, --versionPrint version and exit
Quick Start & Installation
Global Install
Onboarding
Guided Setup
openclaw onboard --install-daemonChannel Link
openclaw channels loginStart Gateway
openclaw gateway --port 18789Onboard Flags
- --mode localLocal gateway mode
- --mode remoteConnect to remote gateway
- --flow quickstartMinimal setup
- --skip-channelsSkip channel setup
Channel Setup
openclaw channels loginchannels add --channel telegram --token $TOKENchannels add --channel discord --token $TOKENmacOS bridgechannels add --channel slackchannels add --channel googlechatchannels add --channel signalchannels add --channel msteamsQuick Diagnostics
Status: openclaw channels status --probe
Logs: openclaw channels logs --channel [id]
Workspace Files
Operating instructions for the agent
Persona, tone, boundaries
User info & preferences
Agent name, emoji, theme
Curated long-term memory (DM only)
Daily append-only log
Local tool notes
Heartbeat checklist
Startup checklist
⚠️ Root: ~/.openclaw/workspace
Memory System
Append-only, read today + yesterday at session start
Curated facts, only loaded in main DM session
Semantic search over memory chunks (~400 tokens)
Auto-select: local GGUF → OpenAI → Gemini → Voyage
BM25 + vectors + reranking (experimental)
Vector similarity + BM25 keyword relevance
openclaw memory index --allopenclaw memory search "X"Models & Auth
openclaw models list --allView all available modelsopenclaw models set <model>Set agents.defaults.model.primaryopenclaw models set-image <model>Set default image modelopenclaw models fallbacks add <model>Add to fallback chainopenclaw models auth setup-tokenPreferred Anthropic auth (OAuth)openclaw models auth add --provider <p>Add provider API keyopenclaw models status --probeLive probe configured auth profilesopenclaw models aliases add <a> <m>Create model aliasFailover & Cooldowns
Sessions
main (default) | per-peer | per-channel-peer | per-account-channel-peer
daily (default, 4am local) | idle
Sliding idle window (whichever expires first wins)
Override policy for dm, group, thread sessions
Per-channel override (takes precedence)
Map provider:id → canonical identity for cross-channel
Block delivery for specific session types
~/.openclaw/agents/{agentId}/sessions/sessions.json
SECURITY USE per-channel-peer FOR MULTI-USER INBOXES TO PREVENT CONTEXT LEAKAGE.
Slash Commands
/statusSession health + context usage + WhatsApp cred status/context listWhat's in the context window (biggest contributors)/context detailFull system prompt + injected workspace files/model <model>Switch model for this session (or /model list)/compact [instructions]Summarize older context, free up window space/new [model]Start fresh session (optional: set model)/resetAlias for /new/stopAbort current run + clear queued followups/send on|off|inheritOverride delivery for this session/tts on|offToggle text-to-speech/think|/verboseToggle reasoning/verbose mode/configPersisted config changes/debugRuntime-only config overrides (requires commands.debug: true)Text-to-Speech
Ultra-realistic, higher latency
Fast, high-quality voices
No API key, multi-language support
Enable Auto-TTS
messages.tts.auto: "always"Logging & Diagnostics
openclaw logs --followTail Gateway file logs (colorized in TTY)openclaw logs --jsonLine-delimited JSON (one event per line)openclaw logs --limit 200Limit number of log linesopenclaw channels logs --channel whatsappChannel-specific logsOTel Export Config
Browser & Cron
Browser Ops
openclaw browser start|stopStart/stop headless instanceopenclaw browser tabsList all open pagesopenclaw browser open <url>Open URL in new tabopenclaw browser screenshotCapture active viewopenclaw browser navigate <url>Navigate current tabopenclaw browser click|type|pressDOM interactionsopenclaw browser evaluate <js>Run JavaScript in pageopenclaw browser pdfExport page as PDFCron Jobs
openclaw cron listView scheduled jobsopenclaw cron addCreate new scheduled jobopenclaw cron edit <id>Edit existing jobopenclaw cron enable|disable <id>Toggle jobopenclaw cron run <id>Manual triggeropenclaw cron runsView run historyHooks & Automation
Bundled Hooks
Save session context to memory on /new
Log all commands to audit file
Run BOOT.md on gateway start
Swap SOUL.md during purge window
openclaw hooks listList all discovered hooksopenclaw hooks enable <name>Enable a hookopenclaw hooks disable <name>Disable a hookopenclaw hooks info <name>Show hook detailsopenclaw hooks checkCheck eligibilityEvent Types
command:newWhen /new is issuedcommand:resetWhen /reset is issuedcommand:stopWhen /stop is issuedgateway:startupAfter channels startagent:bootstrapBefore workspace files injectedSkills System
Skill Precedence
<workspace>/skills/~/.openclaw/skills/Bundled skillsClawHub Registry
clawhub install <slug>Install skill from ClawHubclawhub update --allUpdate all installed skillsclawhub sync --allScan and publish updatesSKILL.md Format
name: my-skill
description: "What this skill does"
metadata: { "openclaw": { "requires": {...} } }
---
Multi-Agent Routing
Each agent has own AGENTS.md, SOUL.md, USER.md
Separate auth profiles per agentDir
Chat history under ~/.openclaw/agents/<id>/sessions
Route messages by channel, accountId, peer
Routing Precedence
openclaw agents add <name>openclaw agents list --bindingsHeartbeat System
heartbeat.everyInterval (default: 30m, 1h for Anthropic OAuth)heartbeat.targetlast | none | <channel id>heartbeat.toOptional recipient overrideheartbeat.modelModel override for heartbeat runsheartbeat.promptCustom prompt bodyheartbeat.activeHoursRestrict to time window (start/end/timezone)CONTRACT Reply HEARTBEAT_OK if nothing needs attention. Agent strips and drops OK-only replies.
HEARTBEAT.md Example
- Quick scan: anything urgent?
- Daytime: lightweight check-in
- Blocked? Note what's missing
Sandboxing
sandbox.mode
"off"No sandboxing, tools run on host
"non-main"Sandbox only non-main sessions (default)
"all"Every session runs in sandbox
sandbox.scope
"session"One container per session (default)
"agent"One container per agent
"shared"One container for all sandboxed sessions
workspaceAccess
"none"Tools see sandbox workspace only (default)
"ro"Read-only mount at /agent
"rw"Read/write mount at /workspace
Setup Image
scripts/sandbox-setup.shDefault image: openclaw-sandbox:bookworm-slim
Sub-Agents
Run research/long tasks without blocking
Own session key + optional sandbox
Results posted to requester chat channel
Sessions archived after 60m (configurable)
/subagents listList active sub-agents/subagents stop <id|#|all>Stop sub-agent runs/subagents log <id|#>View sub-agent logs/subagents info <id|#>Show run metadata/subagents send <id|#> <msg>Send message to sub-agentsessions_spawn Tool
runTimeoutSeconds?, cleanup? }
Returns: { status, runId, childSessionKey }
Troubleshooting
openclaw pairing list → approve pending requestsCheck mentionPatterns config (agent needs @mention)openclaw models auth setup-token --provider anthropicopenclaw doctor --deep (scans for extra installs)openclaw memory index (reindex memory files)/compact or /new (start fresh session)openclaw channels status --probeopenclaw reset --scope sessionsopenclaw doctor --deep --yesHealth checks + quick fixes + system service scans.
Key Paths
~/.openclaw/openclaw.jsonMain configuration file~/.openclaw/workspace/Default agent workspace~/.openclaw/agents/<id>/Per-agent state directory~/.openclaw/agents/<id>/sessions/Session store + transcripts~/.openclaw/credentials/OAuth/API keys~/.openclaw/memory/<agentId>.sqliteVector index store/tmp/openclaw/openclaw-YYYY-MM-DD.logGateway log fileTIP Use --dev or --profile <name> to isolate state under different directories.

