Memory-Alchemist
Memory-Alchemist is now packaged as an OpenClaw-native TypeScript plugin. It focuses on memory lifecycle governance:
- structured memory records
- credit-assignment scoring
- recall ranked by similarity plus importance
- automatic
keep,compress,merge, andforget - automatic sync to
MEMORY.md - explicit
/remember,/memories,/forgetmemcommands
What This Version Is
This folder is designed to be loaded directly by OpenClaw as a local plugin. The plugin entry is index.ts and the main implementation is plugin.ts.
The previous Python prototype is still kept in memory_alchemist/ as a legacy reference, but OpenClaw should use the TypeScript plugin.
Direct Use
Option 1: one-step install on your machine
Run:
powershell -ExecutionPolicy Bypass -File D:\develop\Memory-Alchemist\install-openclaw.ps1
This script:
- adds
D:\develop\Memory-Alchemisttoplugins.load.paths - enables the
memory-alchemistplugin - enables prompt-context injection for the plugin
- sets the memory slot to
memory-alchemist
Then restart OpenClaw gateway.
Option 2: manual config
Edit openclaw.json and make sure it contains something like:
{
"plugins": {
"load": {
"paths": ["D:\\develop\\Memory-Alchemist"]
},
"slots": {
"memory": "memory-alchemist"
},
"entries": {
"memory-alchemist": {
"enabled": true,
"hooks": {
"allowPromptInjection": true
}
}
}
}
}
How It Works
Memory-Alchemist uses OpenClaw lifecycle hooks:
- before agent start: recalls relevant memories and injects them into context
- agent end: scores recalled memories based on outcome and auto-captures new durable facts/preferences
- session end / background maintenance: compresses, merges, promotes, or forgets memories
The plugin stores its state by default in:
~/.openclaw/memory/memory-alchemist.json
When enabled, it also syncs high-value memories into:
~/.openclaw/workspace/MEMORY.md
The plugin writes only to a managed block inside that file, so your own handwritten notes outside the block are preserved.
Commands
After the plugin is enabled, you can use:
/remember <text>: store a memory explicitly/memories: show stats/memories <query>: search memories/forgetmem <id or query>: delete matching memories
CLI commands:
openclaw memory-alchemist stats
openclaw memory-alchemist search "weekly report"
Files
package.json: OpenClaw package manifestopenclaw.plugin.json: plugin metadataindex.ts: plugin entryplugin.ts: hook registration and commandsengine.ts: scoring, recall, governanceexporter.ts: sync toMEMORY.mdstore.ts: JSON persistencehelpers.ts: tokenization, similarity, heuristicsinstall-openclaw.ps1: Windows installer script





