Skip to content
Palimem Docsspec v1.7.0

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)

  • OpenClaw with memory plugin slot support
  • Node.js 18+
  • Python 3.13+
  • Repository cloned: git clone https://github.com/palimem/palimem

Point OpenClaw at the adapter directory. If you manage plugins from the repository directly:

adapters/openclaw

Link or copy the directory into your OpenClaw plugins location:

Terminal window
# Example: symlink into OpenClaw's plugin discovery path
ln -s "$(pwd)/adapters/openclaw" \
~/.openclaw/plugins/memory/ai-memory

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

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.


Run the adapter smoke tests:

Terminal window
# Provider + bridge dispatch smoke
bash examples/claude-code/demo/phase3-smoke.sh
node adapters/openclaw/smoke-openclaw-bridge.mjs

Search against an empty store:

Terminal window
python3 adapters/openclaw/bridge.py \
memory_search \
--workspace-root /tmp/openclaw-ai-memory-demo \
--payload '{"query":"project decisions"}'

Expected: empty results (not an error).


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.

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).


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.