Where does OpenClaw store its data

Everything lives under $OPENCLAW_STATE_DIR (default: ~/.openclaw):
Path Purpose
$OPENCLAW_STATE_DIR/openclaw.json Main config (JSON5)
$OPENCLAW_STATE_DIR/credentials/oauth.json Legacy OAuth import (copied into auth profiles on first use)
$OPENCLAW_STATE_DIR/agents/<agentId>/agent/auth-profiles.json Auth profiles (OAuth + API keys)
$OPENCLAW_STATE_DIR/agents/<agentId>/agent/auth.json Runtime auth cache (managed automatically)
$OPENCLAW_STATE_DIR/credentials/ Provider state (e.g. whatsapp/<accountId>/creds.json)
$OPENCLAW_STATE_DIR/agents/ Per‑agent state (agentDir + sessions)
$OPENCLAW_STATE_DIR/agents/<agentId>/sessions/ Conversation history & state (per agent)
$OPENCLAW_STATE_DIR/agents/<agentId>/sessions/sessions.json Session metadata (per agent)
Legacy single‑agent path: ~/.openclaw/agent/* (migrated by openclaw doctor).
Your workspace (AGENTS.md, memory files, skills, etc.) is separate and configured via agents.defaults.workspace (default: ~/.openclaw/workspace).