Closes #347 ## What - New OpenClaw plugin at plugins/openclaw/ following the same architecture as Claude Code / Codex plugins - .openclaw-plugin/plugin.json manifest - Stop hook (hooks/auto_memory.py) with detached daemon pattern, using OPENCLAW_PLUGIN_ROOT env var - Memory recall skill (skills/reme-memory/SKILL.md) adapted for OpenClaw's native MCP management - Bundled .mcp.json for HTTP MCP connection, documented openclaw mcp set/add workflow - Full README with install, prerequisites, structure, and troubleshooting ## Why - ReMe already ships plugins for Claude Code and Codex. OpenClaw was requested in #347 with a help-wanted label, and the contributor-provided design note aligned with the existing plugin architecture (manifest, Stop hook for auto_memory_cc, recall skill, MCP-configured via the host natively). - Keeping OpenClaw aligned with the other plugins makes behavior and maintenance predictable. ## Not in scope - No vector-database or storage backend work (covered by #386) - No change to the MCP boundary, core steps, or server-side agents ## Testing - [x] Pre-commit on all new files: check-json, ast, black, flake8, pylint, pyroma, add-trailing-comma, whitespace, private-key — all PASS - [x] auto_memory.py validated syntactically (python -m py_compile) - [x] JSON files parse cleanly (no trailing commas) - Manual OpenClaw integration steps are documented in README: the plugin ships .mcp.json so users can point openclaw mcp set at it ## Impact - Breaking change: none - Affected modules: new directory plugins/openclaw/ (no existing code touched) - Docs: README.md under plugins/openclaw/ |
||
|---|---|---|
| .. | ||
| .openclaw-plugin | ||
| reme | ||
| README.md | ||
ReMe Plugin for OpenClaw
Connect OpenClaw to ReMe — file-native long-term memory
for AI agents. The plugin gives OpenClaw recall (read long-term memory) and records every
session automatically via a Stop hook. Consolidation of daily notes into long-term digest/
knowledge runs server-side in ReMe.
What you get
- MCP tools from the
remeserver:search,traverse,daily_list,frontmatter_read,read,auto_memory_cc, and more. - Stop hook (
hooks/auto_memory.py) — when a session ends it calls ReMe's server-sideauto_memory_cctool in a detached background process, passing only the session id. The server resolves that session's transcript on disk and records the durable facts into today's daily note. Recording is fully automatic and asynchronous — the agent never records by hand, and stopping is never delayed. Best-effort: if the server is down it logs and gives up silently. - Skill
reme-memory— recall long-term memory before answering (semanticsearch, topologicaltraverse, statedaily_list/frontmatter_read, thenreadwith citations), plus a server status check. Recording is handled silently by the Stop hook.
Deployment model
The plugin connects to a shared HTTP MCP server you start once — it does not spawn ReMe. One server means one set of background watchers / dream cron across all your OpenClaw windows.
Prerequisites
-
Install ReMe (Python 3.11+):
pip install "reme-ai[core]" -
Configure model credentials in a
.env(seeexample.env):EMBEDDING_API_KEY=sk-xxx EMBEDDING_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1 LLM_API_KEY=sk-xxx LLM_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1 -
Start the ReMe MCP server (one time, leave it running):
reme start service.backend=mcp service.transport=streamable-httpIt serves
http://127.0.0.1:2333/mcp. To use a different port, start withservice.port=<port>and update theurlin.mcp.jsonto match.
Install the plugin
OpenClaw manages MCP servers natively via its openclaw mcp command. The plugin ships a bundled
.mcp.json and a Stop-hook manifest for auto-recording.
-
Copy or symlink the plugin directory to your OpenClaw plugins location:
cp -r plugins/openclaw/ ~/.openclaw/plugins/reme -
Configure the MCP connection (OpenClaw natively handles MCP registration):
# Option A — point OpenClaw at the bundled MCP config: openclaw mcp set reme file://~/.openclaw/plugins/reme/reme/.mcp.json # Option B — register the URL directly: openclaw mcp add reme http --url http://127.0.0.1:2333/mcp -
Restart OpenClaw. Verify the
remeserver and its tools are connected, then thereme-memoryskill can recall memory and report server health.
Plugin structure
plugins/openclaw/
├── .openclaw-plugin/
│ └── plugin.json # OpenClaw plugin manifest
└── reme/
├── hooks/
│ ├── hooks.json # Stop hook configuration
│ └── auto_memory.py # Fire-and-forget session recording hook
├── skills/
│ └── reme-memory/
│ └── SKILL.md # Memory recall skill
└── .mcp.json # MCP server connection config
Notes
- The plugin's MCP server URL lives in
plugins/openclaw/reme/.mcp.json. Keep it in sync with how you start ReMe (host/port). The Stop hook reads this same file to find the server (override withREME_HOST/REME_PORTenv vars). - The Stop hook needs
python3onPATH. It logs toplugins/openclaw/reme/logs/auto_memory_hook.log. - Recording is best-effort: if the server is down, the hook logs and gives up silently without blocking the session.
Troubleshooting
Tools not showing up
- Verify ReMe is running:
curl -s http://127.0.0.1:2333/health_check - Check the MCP URL matches your ReMe port:
openclaw mcp list - Re-register the MCP server and restart OpenClaw
Stop hook not recording
- Check the log:
cat ~/.openclaw/plugins/reme/reme/logs/auto_memory_hook.log - Verify
python3is onPATH - Ensure the ReMe server is running when you end a session
Connection refused
The MCP server may not be running. Start it with:
reme start service.backend=mcp service.transport=streamable-http
Then retry.