Who this is for and concrete interface
This guide connects OpenClaw agents to XMemo persistent memory. OpenClaw operates through a two-layer architecture: the native OpenClaw memory plugin on ClawHub provides runtime tool binding, while the companion Skill provides proactive recall guidance and session checkpointing.
Prerequisites
Ensure the following runtime dependencies and tools are present before connecting:
- OpenClaw agent runtime installed and operational.
- ClawHub package access enabled.
- Valid XMemo account at https://xmemo.dev.
- Node.js runtime version 22.22.0 or higher when installing the companion Skill.
Recommended path: Native plugin plus companion Skill
The recommended path installs the native OpenClaw memory plugin from ClawHub and the companion Skill directly through OpenClaw package management:
openclaw plugins install clawhub:@xmemo/openclaw-memory
openclaw skills install @xmemo/xmemoAuthorization and credential options
Configure credentials through environment variables or interactive device login. Never use bare login without choosing your credential storage path first:
- Environment credential (recommended): Set XMEMO_KEY in the shell or service environment launching OpenClaw.
- Interactive login: If using the companion Skill, run login with --allow-plaintext only when secret-store XMEMO_KEY is unavailable (note that --allow-plaintext stores the credential unencrypted on this computer).
- Verify credentials: Run openclaw plugins list to confirm plugin activation, and verify auth status with the companion Skill.
Alternative path: Headless service runner
For headless OpenClaw runners or automated CI pipelines, pass XMEMO_KEY directly via environment variables to the plugin without interactive prompts.
export XMEMO_KEY='<your-xmemo-token>'
openclaw run --plugin @xmemo/openclaw-memoryConnection check (read-only)
Always verify connectivity with a read-only request before writing data. This check does not modify memory state.
- Check: Start a test OpenClaw session and issue an active recall query for existing project context.
- Success signal: OpenClaw returns structured memory results with valid Reference and Location fields from the authorized workspace.
First useful task: Synthetic memory lifecycle
Verify memory persistence, stateless session transition, source-attributed recall, and correction:
- 1. Save synthetic fact: Store a project convention ("Demo project timestamps use UTC.") to "projects/demo-onboarding/conventions".
- 2. Stateless transition: End the current OpenClaw conversation and launch a fresh session.
- 3. Recall with source attribution: Query "demo project timestamp format". Confirm returned Reference and Location.
- 4. Correct memory: Update the remembered convention with ISO 8601 formatting.
- 5. Optional cleanup: Soft-delete the demo convention when onboarding verification completes.
Capabilities and memory workflows
OpenClaw workflows group actions by outcome across agent sessions:
- Proactive active recall: Automatically injects relevant durable memories into active context before planning.
- Session continuity: Saves and restores restart snapshots, tracks decisions, and maintains TODOs across handoffs.
- Resilience layer: Short-lived recall cache and transient write outbox handle brief network interruptions.
Limitations and boundaries
Operational constraints for OpenClaw integration:
- Workspace isolation: Every operation is strictly bounded to the authenticated user's workspace.
- ClawHub availability: Untested third-party registries or unofficial forks of the plugin are marked untested.
- Ledger scope: Ledger monthly summaries and financial audit tools require dedicated commercial scopes.
Recovery, update, and removal
Troubleshooting and maintenance procedures for OpenClaw:
- Recovery (plugin not loaded): Run openclaw plugins list and check OpenClaw logs for initialization errors.
- Recovery (auth expired): Re-export valid XMEMO_KEY or re-authenticate through the companion Skill.
- Update: To update installed plugins and skills, refer to OpenClaw's plugin management docs.
- Removal: To remove or disable installed plugins and skills, refer to OpenClaw's plugin management docs.
OpenClaw MCP configuration
Configuration file: ~/.openclaw/openclaw.json
Direct client: configure in ~/.openclaw/openclaw.json with XMEMO_KEY in the environment. Run npx @xmemo/client mcp add openclaw to install automatically.
{
"mcpServers": {
"XMemo": {
"url": "https://xmemo.dev/mcp",
"headers": {
"Authorization": "Bearer ${env:XMEMO_KEY}",
"X-Memory-OS-Agent-ID": "openclaw",
"X-Memory-OS-Agent-Instance-ID": "${XMEMO_AGENT_INSTANCE_ID}"
}
}
}
}Client readiness
- Evidence required
- Planned
- See /product/docs#client-capability-matrix; this matches the authoritative config installed by @xmemo/client.
Source: OpenClaw integration