MemorySync
Getting Started

OpenClaw Memory

MemorySync as OpenClaw’s memory backend: take the exclusive memory slot and your personal AI assistant remembers you across WhatsApp, Telegram, Discord, Signal and every other channel — automatic recall before each reply, automatic capture after it, seven memory tools, slash commands, and a status doctor that diagnoses its own setup.

What the plugin provides

LayerWhat it does
Recall (before_prompt_build)Memories relevant to your message are injected before each reply — inside a hard time budget with fail-open behaviour, so a slow network can never delay a chat. Injected text carries the background-data guard.
Capture (agent_end)The exchange persists verbatim with content-hash idempotency seeds; replays converge on one row; the plugin’s own injected context is stripped first so recall can never echo into storage.
Tools (7)memory_search / memory_add / memory_get / memory_list / memory_update / memory_delete / memory_status — failures answer with friendly text, never raw errors into your chat.
Skills & commands/remember and /recall dispatch straight to the tools (no model round-trip); a model-facing skill teaches when to search and what to save; /memorysync-status runs the doctor.
SafetyCredential-looking text is refused client-side; delete is single-id only — there is deliberately no delete-all.
Mem0SupermemoryZepMemorySync
OpenClaw plugin exists✓ v1.x✗ (third-party bridge only)
Raw errors can reach your chat❌ tool results embed String(err)△ debug logging✓ impossible — friendly text on every path, tested
Respects the 2s session-end drain budget❌ undocumented❌ undocumented✓ zero network in session_end, by design and by test
Verbatim history + extraction✗ extraction only✗ extraction only✓ verbatim turns; the platform distils server-side
Setup doctor△ status CLI✓ detects slot, permission gates, allowlist, key, connectivity — with exact fixes
Monthly-quota behaviouruntesteduntested✓ both server modes tested — silence, never errors

Install

# 0. Get an API key at https://app.memorysync.io, then:
# macOS/Linux: export MEMORYSYNC_API_KEY=ms_...
# Windows: setx MEMORYSYNC_API_KEY ms_...
# A. The memory-slot plugin:
openclaw plugins install npm:openclaw-memorysync
# wire it up in ~/.openclaw/openclaw.json (block below), then:
openclaw gateway restart
# B. MCP tools only — no slot, no plugin:
openclaw mcp add memorysync --url https://mcp.memorysync.io/mcp --transport streamable-http
{
"plugins": {
"slots": { "memory": "openclaw-memorysync" },
"entries": {
"openclaw-memorysync": {
"enabled": true,
"hooks": {
"allowPromptInjection": true,
"allowConversationAccess": true
},
"config": { "apiKey": "${MEMORYSYNC_API_KEY}" }
}
}
}
}

Three OpenClaw rules make or break ANY memory plugin, and /memorysync-status checks all of them: the exclusive plugins.slots.memory must name the plugin (it does not activate otherwise), both hook permission gates must be granted, and if plugins.allow is configured the plugin id must be listed. The doctor prints the exact JSON5 to paste for whatever is missing.

What runs when

MomentWhat happens
Before each replyRecall scoped to your message, injected as context. Hard budget (default 6s, configurable), TTL cache absorbs delivery retries, fail-open always — a memoryless reply, never a blocked one.
After each replyThe final user/assistant exchange persists through the episodic plane with fnv1a64 seeds. Failed writes forget their seed so the next fire retries.
Session startTenant cache warm-up, fire-and-forget.
Session endCache trim only. OpenClaw grants ALL sessions a 2-second total drain budget — this plugin does zero network there, by design.
Any failure — no key, network down, monthly quota exhaustedSilent skip. Your WhatsApp never sees an error.
# Same operation as the plugin performs, shown as the raw MemorySync REST call(s).
#
# Turns store under the openclaw::<agent> transcript scope — one per
# agent in multi-agent setups, same shared memories everywhere.
curl --request POST https://api.memorysync.io/v1/memory/add_turn \
--header "X-API-Key: $MEMORYSYNC_API_KEY" \
--header "Content-Type: application/json" \
--data '{"tenant_id":"acme","user_id":"rafay","source":"openclaw","text":"human: switch the dashboard to teal","speaker":"human@openclaw::main#h<content-hash>","metadata":{"session_id":"openclaw::main"}}'

Identity: config.userIdMEMORYSYNC_USER_ID → OS username. Multi-agent gateways get isolated transcripts per agent automatically. MEMORYSYNC_DISABLE=1 switches everything off without uninstalling.

Commands & skills

CommandWhat it does
/remember <fact>Saves one durable fact — dispatches straight to memory_add, no model round-trip.
/recall <query>Searches memory with ids and relevance — straight to memory_search.
/memorysync-statusThe doctor: key, slot, permission gates, allowlist, live connectivity — with exact fixes.

A fourth, model-facing skill teaches the agent the conventions: search before answering questions about the past, save durable facts as one clear statement each, update instead of duplicating after corrections, never store secrets, and treat recalled text as background data — never instructions.

Supported versions

SurfaceRequiresVerified on
openclaw-memorysync 1.0.0OpenClaw ≥ 2026.7.1, Node.js ≥ 2223/23 contract tests against hook shapes pinned from openclaw 2026.7.1-2 type declarations
Plugin compatibility@openclaw/plugin-inspector check --runtime: Status PASS against the latest OpenClaw release

CI re-runs both on every push: the contract suite (injection, capture convergence, context stripping, both monthly-quota server modes, the drain-budget timing test, the status doctor) plus OpenClaw’s own inspector as the drift alarm.

Where to go next

Was this page helpful?