OpenClaw Quickstart
Get persistent memory running in your OpenClaw gateway in three steps.
Prerequisites
- OpenClaw
v2026.3.2or later - A Memori API key from app.memorilabs.ai
- An Entity ID to attribute memories to (e.g., a user ID or agent name)
1. Install and Enable
# Install the plugin from npm
openclaw plugins install @memorilabs/openclaw-memori
# Enable it in your workspace
openclaw plugins enable openclaw-memori
# Restart the gateway to load the plugin
openclaw gateway restart
2. Configure
You need two values: your Memori API key and an Entity ID.
Option A: Via CLI (Recommended)
openclaw config set plugins.entries.openclaw-memori.config.apiKey "YOUR_MEMORI_API_KEY"
openclaw config set plugins.entries.openclaw-memori.config.entityId "your-app-user-id"
Option B: Via openclaw.json
Add the following to ~/.openclaw/openclaw.json:
{
"plugins": {
"entries": {
"openclaw-memori": {
"enabled": true,
"config": {
"apiKey": "your-memori-api-key",
"entityId": "your-app-user-id"
}
}
}
}
}
Configuration Options
- Name
apiKey- Type
- string
- Required
- Required
- Description
Your Memori API key from app.memorilabs.ai.
- Name
entityId- Type
- string
- Required
- Required
- Description
The unique identifier for the entity (user, agent, or tenant) to attribute memories to.
3. Verify
After configuring, restart the gateway and check the logs:
openclaw gateway restart
openclaw gateway logs --filter "[Memori]"
You should see:
[Memori] === INITIALIZING PLUGIN ===
[Memori] Tracking Entity ID: your-app-user-id
Test the Memory Loop
-
Send a message with a preference:
"I always use TypeScript and prefer functional patterns."
-
Check the logs for a successful augmentation:
[Memori] === AUGMENTATION HOOK START === [Memori] Capturing conversation turn... [Memori] Augmentation successful! -
In a new session, ask a question that should trigger recall:
"Write a hello world script."
-
The agent should recall and apply your TypeScript preference automatically:
[Memori] === RECALL HOOK START === [Memori] Executing SDK Recall... [Memori] Successfully injected memory context.
What Happens Under the Hood
Once installed, the plugin works automatically on every conversation turn:
| Phase | Hook | What the plugin does |
|---|---|---|
| Before response | before_prompt_build | Queries Memori for relevant memories and injects them into the agent's context |
| After response | agent_end | Extracts the user/assistant exchange, sanitizes it, and sends it to Memori for fact extraction |
No changes to your agent's code or prompts are required. The plugin handles everything through OpenClaw's event lifecycle.