6-layer persistent memory system for AI agents: WAL protocol, vector search, git-notes, and cloud backup so you never lose context again.
npx clawhub@latest install elite-longterm-memoryRequirements
Elite Longterm Memory combines six proven memory approaches into one architecture for AI coding agents. It layers hot RAM (session state), semantic vector search via LanceDB, a git-notes knowledge graph, curated markdown archives, optional cloud backup via SuperMemory, and automatic fact extraction via Mem0. The result: your agent retains preferences, decisions, and context across sessions, compactions, and restarts — without repeating mistakes or losing prior work.
npx clawhub@latest install elite-longterm-memoryClick the Install button at the top of this page for one-click setup
OPENAI_API_KEY; the skill won't reach its full potential without it.State is written to SESSION-STATE.md before the agent responds, not after. This prevents context loss during compaction, crashes, or mid-conversation interruptions — a guarantee that naive memory approaches can't provide.
All memories are indexed in a local LanceDB vector store. Auto-recall injects the most relevant prior context into each response, and manual memory_store / memory_recall commands let you query or filter by category and importance score.
Structured decisions, learnings, and branch-aware context are stored as git notes — silent, version-controlled, and exportable as JSON. They persist permanently alongside your repo history.
Mem0 automatically extracts facts, preferences, and decisions from raw conversation history, deduplicates them, and surfaces relevant memories on demand. This eliminates the need to pass full chat history and cuts token consumption by up to 80%.
Optionally sync your knowledge base to SuperMemory for cross-device access and natural-language querying of stored context. Requires a SUPERMEMORY_API_KEY.
A MEMORY.md root file and dated daily logs under memory/YYYY-MM-DD.md give both agent and developer a clear, browsable record of what was decided, learned, and remembered — no opaque database required.
As the project evolves across days or weeks, the agent writes tech decisions (e.g. "Use Tailwind, not vanilla CSS") to git-notes and SESSION-STATE.md. On every new session it reads prior context automatically, so it never asks what framework you're using again.
When the context window fills and the agent compacts, SESSION-STATE.md acts as hot RAM that survives the reset. The WAL protocol ensures that anything said in the last exchange is already persisted before the compaction fires.
Context stored in git-notes and LanceDB can be queried by any spawned sub-agent at task start, so parallel agents share the same decisions and preferences without manual re-briefing.
User preferences, recurring deadlines, and corrected mistakes are auto-extracted by Mem0 and stored across sessions. The agent builds an accurate, deduplicated model of the user over time without growing the prompt.
OPENAI_API_KEY) — Required. Powers semantic vector search (LanceDB) and memory embedding. Must be set for memory_search to function.MEM0_API_KEY) (recommended) — Enables automatic fact extraction and deduplication from conversation history.SUPERMEMORY_API_KEY) (optional) — Enables cloud backup and cross-device sync of your knowledge base.memory-lancedb plugin must be enabled in ~/.openclaw/openclaw.json.npx clawhub@latest install elite-longterm-memoryRequirements
Log in to write a review
No reviews yet. Be the first to share your experience!