Swap Memory Plugin
Auto-store conversations and retrieve context for OpenClaw agents.
Three-layer memory: hot (6h chunks) → warm (wiki session logs) → cold (wiki lessons).
No cron jobs, no external dependencies. Nothing is ever lost.
Installation
Add to openclaw.json:
{
"plugins": {
"entries": {
"swap-memory": {
"source": "workspace/plugins/swap-memory/src/index.js",
"enabled": true,
"config": {
"enabled": true,
"defaultAgent": "main",
"crossSearchEnabled": false
}
}
}
}
}
Restart: openclaw gateway restart
Usage
The plugin works automatically — it hooks into agent_end and before_prompt_build to store and retrieve conversation chunks.
Commands
| Slash | Description |
|---|---|
/swap-status | Show statistics: chunks, pins, retrievals |
/swap-dashboard | Visual progress bars per agent |
/swap-promote <keyword> | Pin matching chunks |
/swap-cross on|off | Toggle cross-agent search (OFF by default) |
Adding tools to custom agents
If your agent has a tools.profile (e.g. coding, messaging), add to alsoAllow:
"alsoAllow": ["swap_status","swap_dashboard","swap_promote","swap_cross"]
Requirements
- OpenClaw ≥ 2026.5
- Memory core enabled (
memory.enabled: true) - Wiki enabled (
wiki.enabled: true)