Use Palimem with OpenClaw
The Palimem OpenClaw adapter exposes memory-service through OpenClaw’s memory plugin slot. It provides memory_search and memory_get backed by the same governed SQLite store used by the MCP integration — inside a strict workspace sandbox.
- Plugin id:
ai-memory - Plugin kind:
memory - Tool surface:
memory_search,memory_get - Entrypoint:
index.js(Node) +bridge.py(Python)
Prerequisites
Section titled “Prerequisites”- OpenClaw with memory plugin slot support
- Node.js 18+
- Python 3.13+
- Repository cloned:
git clone https://github.com/palimem/palimem
Recommended install
Section titled “Recommended install”Point OpenClaw at the adapter directory. If you manage plugins from the repository directly:
adapters/openclawLink or copy the directory into your OpenClaw plugins location:
# Example: symlink into OpenClaw's plugin discovery pathln -s "$(pwd)/adapters/openclaw" \ ~/.openclaw/plugins/memory/ai-memoryConfig block
Section titled “Config block”In your OpenClaw config (legacy memory slot):
{ "plugins": { "entries": { "ai-memory": { "data_dir": ".ai-memory/data", "namespace": "my-project", "import_workspace_markdown": true } }, "slots": { "memory": "ai-memory" } }}Newer OpenClaw builds with memory role-slots can also point memory.recall at ai-memory.
Sample config: adapters/openclaw/openclaw.config.sample.json
| Key | Default | Notes |
|---|---|---|
data_dir |
.ai-memory/data |
Relative to workspace root unless absolute |
namespace |
workspace basename | Repository namespace for repository-scope reads |
import_workspace_markdown |
false |
Import MEMORY.md and memory/*.md on activation when changed |
Workspace sandbox
Section titled “Workspace sandbox”The adapter enforces a strict workspace sandbox. Only these paths are readable:
<workspace>/MEMORY.md<workspace>/memory/**<workspace>/.ai-memory/**
Requests outside the workspace root return invalid_request.
Verification
Section titled “Verification”Run the adapter smoke tests:
# Provider + bridge dispatch smokebash examples/claude-code/demo/phase3-smoke.shnode adapters/openclaw/smoke-openclaw-bridge.mjsSearch against an empty store:
python3 adapters/openclaw/bridge.py \ memory_search \ --workspace-root /tmp/openclaw-ai-memory-demo \ --payload '{"query":"project decisions"}'Expected: empty results (not an error).
Agent prompt
Section titled “Agent prompt”Paste this into your OpenClaw agent session to configure Palimem:
Set up Palimem as the OpenClaw memory provider for this session.
- Plugin: adapters/openclaw- Config: plugins.slots.memory = "ai-memory"- Data directory: .ai-memory/data- Verify: memory_search with an empty store returns empty results (not an error); memory_get by subject key returns the stored value
Do not enable cloud services.Tool surface
Section titled “Tool surface”| OpenClaw tool | Behavior |
|---|---|
memory_search |
Delegates to memory_service.memory_search; returns path, snippet, score, startLine, endLine |
memory_get |
Direct subject-key lookup; also accepts path aliases like memory/<topic>/<field>.md |
Both tools succeed on a fresh workspace with an empty store (empty results, not error).
Troubleshooting
Section titled “Troubleshooting”Plugin not discovered by OpenClaw
Check the plugin directory is in OpenClaw’s plugin discovery path. Verify the entrypoint exists: ls adapters/openclaw/index.js.
memory_search returns error on empty store
This is a bug in an older adapter version. The current adapter returns empty results on an empty store. Pull the latest main.
bridge.py not found
The bridge is at adapters/openclaw/bridge.py. Verify the adapter directory is intact.
Next steps
Section titled “Next steps”- Palimpsest model — how supersession and layered memory work
- Scopes — user, session, and repository memory
- MCP tools reference — all 11 tools with arguments
- Export & import — import Markdown memory files