Skip to main content

Setup

1

Start agentmemory

2

Wire MCP

The adapter detects ~/.openclaw/, backs up openclaw.json, merges the standard mcpServers.agentmemory entry, and verifies it after writing.
3

Install the memory plugin (optional, deeper)

From a repo checkout:
The installer copies the plugin into ~/.openclaw/extensions/agentmemory and switches OpenClaw’s exclusive memory slot from memory-core to agentmemory. Then allow conversation access in ~/.openclaw/openclaw.json (config below) — without it, OpenClaw silently blocks the agent_end hook and turn capture never fires.
4

Restart OpenClaw

Restart so both the MCP server and the plugin load.
5

Verify

Open http://localhost:3113 and confirm observations appear after an agent run.

What connect writes

~/.openclaw/openclaw.json

The memory-slot plugin

The plugin in integrations/openclaw/ claims OpenClaw’s memory slot. hooks.allowConversationAccess is required: OpenClaw blocks conversation-reading hooks from non-bundled plugins by default, and without it the plugin loads but never captures turns. Enable it with:
~/.openclaw/openclaw.json
What it does:
  • claims plugins.slots.memory = "agentmemory" via api.registerMemoryCapability({ promptBuilder }), the documented API for occupying the slot
  • recalls relevant long-term memory before the agent starts (before_agent_start hook)
  • captures completed conversation turns after the agent finishes (agent_end hook)
  • shares the same backend with every other connected agent
The plugin registers a promptBuilder only, not a full memory-runtime adapter. OpenClaw’s MemoryRuntimeBackendConfig currently accepts only its internal builtin and qmd backends, which do not fit agentmemory’s external REST shape. Hook-driven recall plus capture is the working integration path.

Troubleshooting

The extension folder must contain package.json, openclaw.plugin.json, and plugin.mjs, and plugins.slots.memory must be set to agentmemory. Copy the whole integrations/openclaw folder, not just the plugin file.
Upgrade the plugin to v0.9.11 or later. Older versions registered hooks but never called api.registerMemoryCapability(...), so OpenClaw did not consider the slot claimed.
The agentmemory server is not running. Start it with npx @agentmemory/agentmemory. With fallback_on_error: true the agent keeps working without memory until the server returns.
Adapter source: src/cli/connect/openclaw.ts (shared JSON adapter). Plugin: integrations/openclaw/plugin.mjs and its README.
Last modified on August 16, 2026