Skip to main content

Memory Plugin for OpenClaw

Configure the long-term memory plugin for OpenClaw Agents, enabling cross-session context awareness through the memory API.

Effect Comparison

The following two dialogue examples show the behavioral difference between the default Agent and the Agent with the long-term memory plugin in the same scenario.

Default Agent (No Memory)

First conversation: User: I'm working on a Python project using the FastAPI framework. Agent: OK, FastAPI is a high-performance web framework. How can I help? Second conversation (new session): User: Help me write an API endpoint. Agent: What language and framework are you using? The Agent cannot retain information from the previous session.

Agent with Long-term Memory Plugin

First conversation: User: I'm working on a Python project using the FastAPI framework. Agent: OK, FastAPI is a high-performance web framework. How can I help? Second conversation (new session): User: Help me write an API endpoint. The Agent retrieves relevant memory: "The user is working on a FastAPI Python project." The Agent starts writing the API endpoint.

Installation

Configure the memory plugin in your OpenClaw Agent settings.

Configuration

ParameterTypeDefaultDescription
apiKey (required)string-Starts with sk-
userId (required)string-The user identifier for the memory space
baseUrlstringhttps://dashscope.aliyuncs.com/api/v2/apps/memoryThe Bailian memory API endpoint. Set it to https://{workspaceId}.cn-beijing.maas.aliyuncs.com/api/v2/apps/memory and replace {workspaceId} with your actual workspace ID
autoCapturebooleantrueAutomatically extract and store memories after conversations
autoRecallbooleantrueAutomatically retrieve and inject memories before conversations
topKnumber5The number of memories returned per search