Built by Meshari Almejlad.
A long-term memory plugin for OpenClaw that gives your AI agent persistent memory across sessions — with auto-recall before every reply and auto-capture after every reply. Works 100% locally with no cloud dependency and no native build requirements.
Every conversation turn:
before_prompt_build hook
│
└── Searches active container
└── Injects top-K relevant memories as prependSystemContext
[Agent replies]
llm_output hook
└── Extracts durable facts via LLM (or keyword heuristics)
└── Appends to the active container's JSONL file
| Feature | Description |
|---|---|
| Auto-Recall | Queries memory and injects relevant facts before every reply |
| Auto-Capture | Extracts and stores durable facts after every reply |
| 100% Local | Works out of the box with zero external dependencies |
| Container Routing | Separate memories into work, personal, or custom containers |
| Lexical Search | Built-in bag-of-words similarity — no embeddings API needed |
| Embeddings (Optional) | Plug in any OpenAI-compatible API for semantic search |
| LLM Extraction | Uses api.runtime.llm.complete to extract facts |
| Heuristic Fallback | Captures explicit cues ("remember that...") if LLM is unavailable |
| Manual Tools | memory_remember, memory_recall, memory_forget, memory_list_containers |
| MIT Licensed | Fully open source |
openclaw plugins install /path/to/openclaw-mymemory
openclaw plugins enable mymemory
openclaw gateway restartSee USAGE.md for how to use the plugin day-to-day.
Or during local development:
// openclaw.json
{
plugins: {
load: { paths: ["~/plugins/openclaw-mymemory"] },
entries: {
mymemory: {
enabled: true,
config: {
defaultContainer: "personal",
containerRouting: {
"agent:sales-bot": "work",
"channel:C0123WORKSLACK": "work",
},
autoRecall: { enabled: true, topK: 6 },
autoCapture: { enabled: true, useLLMExtraction: true },
embeddings: { provider: "none" }, // or "openai-compatible"
},
},
},
},
}| Feature | Supermemory / Mem0 | openclaw-mymemory |
|---|---|---|
| Auto-Recall | ✅ (cloud) | ✅ (local) |
| Auto-Capture | ✅ (cloud) | ✅ (local) |
| Custom Containers | ✅ | ✅ |
| Zero external deps | ❌ | ✅ |
| Works offline | ❌ | ✅ |
| No API key needed | ❌ | ✅ |
| Open source | ❌ | ✅ |
| Lexical search (free) | ❌ | ✅ |
| Semantic search (optional) | ✅ | ✅ (OpenAI-compatible) |
- Search quality without embeddings: Uses bag-of-words lexical similarity, not true semantic vector search. Enable
embeddings.provider: "openai-compatible"if you need higher accuracy. - Hook field names:
before_prompt_buildandllm_outputfield names (e.g.payload.prompt,payload.output) are based on OpenClaw hook documentation. Runopenclaw plugins inspect mymemory --runtime --jsonand check logs to verify correct names on your setup; adjustindex.jsif needed. - No periodic dreaming: Unlike OpenClaw's built-in
memory-core, this plugin does not merge or deduplicate old memories automatically. A future cron job could add this.
openclaw-mymemory/
├── package.json
├── openclaw.plugin.json
├── index.js # Plugin entry — registers hooks + tools
├── lib/
│ ├── store.js # JSONL storage + lexical search engine
│ ├── embed.js # Optional OpenAI-compatible embeddings
│ ├── container.js # Container routing logic
│ └── extract.js # LLM fact extraction + heuristic fallback
└── skills/mymemory/SKILL.md # Skill file explaining tools to the agent
Meshari Almejlad — almjlad@gmail.com
Issues and pull requests welcome on github.com/me515/openclaw-mymemory.
Ideas for follow-up work: periodic memory merging/dedup, real vector index option, per-message container override.
MIT — see LICENSE.