[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6FYN66PY7QPHMEWV96P2XE1":3,"skill-same:01M6FYN66PY7QPHMEWV96P2XE1":108},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":22,"publishedAt":43,"linkOnly":44,"markdownContent":45,"markdownBody":46,"frontMatter":47,"refName":67,"commitSha":68,"skillDirectory":69,"forksCount":70,"repositoryHtmlUrl":71,"repositoryHomepageUrl":6,"ownerHtmlUrl":72,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":73,"install":74,"resources":87},"01M6FYN66PY7QPHMEWV96P2XE1","elite-longterm-memory",null,"Ultimate AI agent memory system. WAL protocol + vector search + git-notes + cloud backup. Never lose context again. Works with Claude, Cursor, GPT, OpenClaw agents.","kbarbel640-del\u002Fskills","kbarbel640-del","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F255315490?v=4","01M6CJPPQGCCESXMG3K7BBGQ5J","01M6CJPPX2PB2BCZERFVM2C2B3",1,"MIT","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fnextfrontierbuilds\u002Felite-longterm-memory\u002FSKILL.md",[17],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],"memory","elite longterm memory","agent memory system","agentic","memory system","ai agent memory","moltbot","persistent-context","git-notes","lancedb","vector-search","ai-agent","long-term-memory","never","api","vector","search","code","copilot","ai agent","2026-11-10 10:12:30",false,"---\nname: elite-longterm-memory\nversion: 1.2.1\ndescription: \"Ultimate AI agent memory system. WAL protocol + vector search + git-notes + cloud backup. Never lose context again. Works with Claude, Cursor, GPT, OpenClaw agents.\"\nauthor: NextFrontierBuilds\nkeywords: [memory, ai-agent, ai-coding, long-term-memory, vector-search, lancedb, git-notes, wal, persistent-context, claude, claude-code, gpt, cursor, copilot, openclaw, moltbot, openclaw, vibe-coding, agentic]\nmetadata:\n  openclaw:\n    emoji: \"?\"\n    requires:\n      env:\n        - OPENAI_API_KEY\n      plugins:\n        - memory-lancedb\n---\n\n# Elite Longterm Memory ?\n\n**The ultimate memory system for AI agents.** Combines 6 proven approaches into one bulletproof architecture.\n\nNever lose context. Never forget decisions. Never repeat mistakes.\n\n## Architecture Overview\n\n```\n┌─────────────────────────────────────────────────────────────────┐\n│                    ELITE LONGTERM MEMORY                        │\n├─────────────────────────────────────────────────────────────────┤\n│                                                                 │\n│  ┌─────────────┐  ┌─────────────┐  ┌─────────────┐             │\n│  │   HOT RAM   │  │  WARM STORE │  │  COLD STORE │             │\n│  │             │  │             │  │             │             │\n│  │ SESSION-    │  │  LanceDB    │  │  Git-Notes  │             │\n│  │ STATE.md    │  │  Vectors    │  │  Knowledge  │             │\n│  │             │  │             │  │  Graph      │             │\n│  │ (survives   │  │ (semantic   │  │ (permanent  │             │\n│  │  compaction)│  │  search)    │  │  decisions) │             │\n│  └─────────────┘  └─────────────┘  └─────────────┘             │\n│         │                │                │                     │\n│         └────────────────┼────────────────┘                     │\n│                          ▼                                      │\n│                  ┌─────────────┐                                │\n│                  │  MEMORY.md  │  ← Curated long-term           │\n│                  │  + daily\u002F   │    (human-readable)            │\n│                  └─────────────┘                                │\n│                          │                                      │\n│                          ▼                                      │\n│                  ┌─────────────┐                                │\n│                  │ SuperMemory │  ← Cloud backup (optional)     │\n│                  │    API      │                                │\n│                  └─────────────┘                                │\n│                                                                 │\n└─────────────────────────────────────────────────────────────────┘\n```\n\n## The 5 Memory Layers\n\n### Layer 1: HOT RAM (SESSION-STATE.md)\n**From: bulletproof-memory**\n\nActive working memory that survives compaction. Write-Ahead Log protocol.\n\n```markdown\n# SESSION-STATE.md — Active Working Memory\n\n## Current Task\n[What we're working on RIGHT NOW]\n\n## Key Context\n- User preference: ...\n- Decision made: ...\n- Blocker: ...\n\n## Pending Actions\n- [ ] ...\n```\n\n**Rule:** Write BEFORE responding. Triggered by user input, not agent memory.\n\n### Layer 2: WARM STORE (LanceDB Vectors)\n**From: lancedb-memory**\n\nSemantic search across all memories. Auto-recall injects relevant context.\n\n```bash\n# Auto-recall (happens automatically)\nmemory_recall query=\"project status\" limit=5\n\n# Manual store\nmemory_store text=\"User prefers dark mode\" category=\"preference\" importance=0.9\n```\n\n### Layer 3: COLD STORE (Git-Notes Knowledge Graph)\n**From: git-notes-memory**\n\nStructured decisions, learnings, and context. Branch-aware.\n\n```bash\n# Store a decision (SILENT - never announce)\npython3 memory.py -p $DIR remember '{\"type\":\"decision\",\"content\":\"Use React for frontend\"}' -t tech -i h\n\n# Retrieve context\npython3 memory.py -p $DIR get \"frontend\"\n```\n\n### Layer 4: CURATED ARCHIVE (MEMORY.md + daily\u002F)\n**From: OpenClaw native**\n\nHuman-readable long-term memory. Daily logs + distilled wisdom.\n\n```\nworkspace\u002F\n├── MEMORY.md              # Curated long-term (the good stuff)\n└── memory\u002F\n    ├── 2026-01-30.md      # Daily log\n    ├── 2026-01-29.md\n    └── topics\u002F            # Topic-specific files\n```\n\n### Layer 5: CLOUD BACKUP (SuperMemory) — Optional\n**From: supermemory**\n\nCross-device sync. Chat with your knowledge base.\n\n```bash\nexport SUPERMEMORY_API_KEY=\"your-key\"\nsupermemory add \"Important context\"\nsupermemory search \"what did we decide about...\"\n```\n\n### Layer 6: AUTO-EXTRACTION (Mem0) — Recommended\n**NEW: Automatic fact extraction**\n\nMem0 automatically extracts facts from conversations. 80% token reduction.\n\n```bash\nnpm install mem0ai\nexport MEM0_API_KEY=\"your-key\"\n```\n\n```javascript\nconst { MemoryClient } = require('mem0ai');\nconst client = new MemoryClient({ apiKey: process.env.MEM0_API_KEY });\n\n\u002F\u002F Conversations auto-extract facts\nawait client.add(messages, { user_id: \"user123\" });\n\n\u002F\u002F Retrieve relevant memories\nconst memories = await client.search(query, { user_id: \"user123\" });\n```\n\nBenefits:\n- Auto-extracts preferences, decisions, facts\n- Deduplicates and updates existing memories\n- 80% reduction in tokens vs raw history\n- Works across sessions automatically\n\n## Quick Setup\n\n### 1. Create SESSION-STATE.md (Hot RAM)\n\n```bash\ncat > SESSION-STATE.md \u003C\u003C 'EOF'\n# SESSION-STATE.md — Active Working Memory\n\nThis file is the agent's \"RAM\" — survives compaction, restarts, distractions.\n\n## Current Task\n[None]\n\n## Key Context\n[None yet]\n\n## Pending Actions\n- [ ] None\n\n## Recent Decisions\n[None yet]\n\n---\n*Last updated: [timestamp]*\nEOF\n```\n\n### 2. Enable LanceDB (Warm Store)\n\nIn `~\u002F.openclaw\u002Fopenclaw.json`:\n\n```json\n{\n  \"memorySearch\": {\n    \"enabled\": true,\n    \"provider\": \"openai\",\n    \"sources\": [\"memory\"],\n    \"minScore\": 0.3,\n    \"maxResults\": 10\n  },\n  \"plugins\": {\n    \"entries\": {\n      \"memory-lancedb\": {\n        \"enabled\": true,\n        \"config\": {\n          \"autoCapture\": false,\n          \"autoRecall\": true,\n          \"captureCategories\": [\"preference\", \"decision\", \"fact\"],\n          \"minImportance\": 0.7\n        }\n      }\n    }\n  }\n}\n```\n\n### 3. Initialize Git-Notes (Cold Store)\n\n```bash\ncd ~\u002Fclawd\ngit init  # if not already\npython3 skills\u002Fgit-notes-memory\u002Fmemory.py -p . sync --start\n```\n\n### 4. Verify MEMORY.md Structure\n\n```bash\n# Ensure you have:\n# - MEMORY.md in workspace root\n# - memory\u002F folder for daily logs\nmkdir -p memory\n```\n\n### 5. (Optional) Setup SuperMemory\n\n```bash\nexport SUPERMEMORY_API_KEY=\"your-key\"\n# Add to ~\u002F.zshrc for persistence\n```\n\n## Agent Instructions\n\n### On Session Start\n1. Read SESSION-STATE.md — this is your hot context\n2. Run `memory_search` for relevant prior context\n3. Check memory\u002FYYYY-MM-DD.md for recent activity\n\n### During Conversation\n1. **User gives concrete detail?** → Write to SESSION-STATE.md BEFORE responding\n2. **Important decision made?** → Store in Git-Notes (SILENTLY)\n3. **Preference expressed?** → `memory_store` with importance=0.9\n\n### On Session End\n1. Update SESSION-STATE.md with final state\n2. Move significant items to MEMORY.md if worth keeping long-term\n3. Create\u002Fupdate daily log in memory\u002FYYYY-MM-DD.md\n\n### Memory Hygiene (Weekly)\n1. Review SESSION-STATE.md — archive completed tasks\n2. Check LanceDB for junk: `memory_recall query=\"*\" limit=50`\n3. Clear irrelevant vectors: `memory_forget id=\u003Cid>`\n4. Consolidate daily logs into MEMORY.md\n\n## The WAL Protocol (Critical)\n\n**Write-Ahead Log:** Write state BEFORE responding, not after.\n\n| Trigger | Action |\n|---------|--------|\n| User states preference | Write to SESSION-STATE.md → then respond |\n| User makes decision | Write to SESSION-STATE.md → then respond |\n| User gives deadline | Write to SESSION-STATE.md → then respond |\n| User corrects you | Write to SESSION-STATE.md → then respond |\n\n**Why?** If you respond first and crash\u002Fcompact before saving, context is lost. WAL ensures durability.\n\n## Example Workflow\n\n```\nUser: \"Let's use Tailwind for this project, not vanilla CSS\"\n\nAgent (internal):\n1. Write to SESSION-STATE.md: \"Decision: Use Tailwind, not vanilla CSS\"\n2. Store in Git-Notes: decision about CSS framework\n3. memory_store: \"User prefers Tailwind over vanilla CSS\" importance=0.9\n4. THEN respond: \"Got it — Tailwind it is...\"\n```\n\n## Maintenance Commands\n\n```bash\n# Audit vector memory\nmemory_recall query=\"*\" limit=50\n\n# Clear all vectors (nuclear option)\nrm -rf ~\u002F.openclaw\u002Fmemory\u002Flancedb\u002F\nopenclaw gateway restart\n\n# Export Git-Notes\npython3 memory.py -p . export --format json > memories.json\n\n# Check memory health\ndu -sh ~\u002F.openclaw\u002Fmemory\u002F\nwc -l MEMORY.md\nls -la memory\u002F\n```\n\n## Why Memory Fails\n\nUnderstanding the root causes helps you fix them:\n\n| Failure Mode | Cause | Fix |\n|--------------|-------|-----|\n| Forgets everything | `memory_search` disabled | Enable + add OpenAI key |\n| Files not loaded | Agent skips reading memory | Add to AGENTS.md rules |\n| Facts not captured | No auto-extraction | Use Mem0 or manual logging |\n| Sub-agents isolated | Don't inherit context | Pass context in task prompt |\n| Repeats mistakes | Lessons not logged | Write to memory\u002Flessons.md |\n\n## Solutions (Ranked by Effort)\n\n### 1. Quick Win: Enable memory_search\n\nIf you have an OpenAI key, enable semantic search:\n\n```bash\nopenclaw configure --section web\n```\n\nThis enables vector search over MEMORY.md + memory\u002F*.md files.\n\n### 2. Recommended: Mem0 Integration\n\nAuto-extract facts from conversations. 80% token reduction.\n\n```bash\nnpm install mem0ai\n```\n\n```javascript\nconst { MemoryClient } = require('mem0ai');\n\nconst client = new MemoryClient({ apiKey: process.env.MEM0_API_KEY });\n\n\u002F\u002F Auto-extract and store\nawait client.add([\n  { role: \"user\", content: \"I prefer Tailwind over vanilla CSS\" }\n], { user_id: \"ty\" });\n\n\u002F\u002F Retrieve relevant memories\nconst memories = await client.search(\"CSS preferences\", { user_id: \"ty\" });\n```\n\n### 3. Better File Structure (No Dependencies)\n\n```\nmemory\u002F\n├── projects\u002F\n│   ├── strykr.md\n│   └── taska.md\n├── people\u002F\n│   └── contacts.md\n├── decisions\u002F\n│   └── 2026-01.md\n├── lessons\u002F\n│   └── mistakes.md\n└── preferences.md\n```\n\nKeep MEMORY.md as a summary (\u003C5KB), link to detailed files.\n\n## Immediate Fixes Checklist\n\n| Problem | Fix |\n|---------|-----|\n| Forgets preferences | Add `## Preferences` section to MEMORY.md |\n| Repeats mistakes | Log every mistake to `memory\u002Flessons.md` |\n| Sub-agents lack context | Include key context in spawn task prompt |\n| Forgets recent work | Strict daily file discipline |\n| Memory search not working | Check `OPENAI_API_KEY` is set |\n\n## Troubleshooting\n\n**Agent keeps forgetting mid-conversation:**\n→ SESSION-STATE.md not being updated. Check WAL protocol.\n\n**Irrelevant memories injected:**\n→ Disable autoCapture, increase minImportance threshold.\n\n**Memory too large, slow recall:**\n→ Run hygiene: clear old vectors, archive daily logs.\n\n**Git-Notes not persisting:**\n→ Run `git notes push` to sync with remote.\n\n**memory_search returns nothing:**\n→ Check OpenAI API key: `echo $OPENAI_API_KEY`\n→ Verify memorySearch enabled in openclaw.json\n\n---\n\n## Links\n\n- bulletproof-memory: https:\u002F\u002Fclawdhub.com\u002Fskills\u002Fbulletproof-memory\n- lancedb-memory: https:\u002F\u002Fclawdhub.com\u002Fskills\u002Flancedb-memory\n- git-notes-memory: https:\u002F\u002Fclawdhub.com\u002Fskills\u002Fgit-notes-memory\n- memory-hygiene: https:\u002F\u002Fclawdhub.com\u002Fskills\u002Fmemory-hygiene\n- supermemory: https:\u002F\u002Fclawdhub.com\u002Fskills\u002Fsupermemory\n\n---\n\n*Built by [@NextXFrontier](https:\u002F\u002Fx.com\u002FNextXFrontier) — Part of the Next Frontier AI toolkit*\n","# Elite Longterm Memory ?\n\n**The ultimate memory system for AI agents.** Combines 6 proven approaches into one bulletproof architecture.\n\nNever lose context. Never forget decisions. Never repeat mistakes.\n\n## Architecture Overview\n\n```\n┌─────────────────────────────────────────────────────────────────┐\n│                    ELITE LONGTERM MEMORY                        │\n├─────────────────────────────────────────────────────────────────┤\n│                                                                 │\n│  ┌─────────────┐  ┌─────────────┐  ┌─────────────┐             │\n│  │   HOT RAM   │  │  WARM STORE │  │  COLD STORE │             │\n│  │             │  │             │  │             │             │\n│  │ SESSION-    │  │  LanceDB    │  │  Git-Notes  │             │\n│  │ STATE.md    │  │  Vectors    │  │  Knowledge  │             │\n│  │             │  │             │  │  Graph      │             │\n│  │ (survives   │  │ (semantic   │  │ (permanent  │             │\n│  │  compaction)│  │  search)    │  │  decisions) │             │\n│  └─────────────┘  └─────────────┘  └─────────────┘             │\n│         │                │                │                     │\n│         └────────────────┼────────────────┘                     │\n│                          ▼                                      │\n│                  ┌─────────────┐                                │\n│                  │  MEMORY.md  │  ← Curated long-term           │\n│                  │  + daily\u002F   │    (human-readable)            │\n│                  └─────────────┘                                │\n│                          │                                      │\n│                          ▼                                      │\n│                  ┌─────────────┐                                │\n│                  │ SuperMemory │  ← Cloud backup (optional)     │\n│                  │    API      │                                │\n│                  └─────────────┘                                │\n│                                                                 │\n└─────────────────────────────────────────────────────────────────┘\n```\n\n## The 5 Memory Layers\n\n### Layer 1: HOT RAM (SESSION-STATE.md)\n**From: bulletproof-memory**\n\nActive working memory that survives compaction. Write-Ahead Log protocol.\n\n```markdown\n# SESSION-STATE.md — Active Working Memory\n\n## Current Task\n[What we're working on RIGHT NOW]\n\n## Key Context\n- User preference: ...\n- Decision made: ...\n- Blocker: ...\n\n## Pending Actions\n- [ ] ...\n```\n\n**Rule:** Write BEFORE responding. Triggered by user input, not agent memory.\n\n### Layer 2: WARM STORE (LanceDB Vectors)\n**From: lancedb-memory**\n\nSemantic search across all memories. Auto-recall injects relevant context.\n\n```bash\n# Auto-recall (happens automatically)\nmemory_recall query=\"project status\" limit=5\n\n# Manual store\nmemory_store text=\"User prefers dark mode\" category=\"preference\" importance=0.9\n```\n\n### Layer 3: COLD STORE (Git-Notes Knowledge Graph)\n**From: git-notes-memory**\n\nStructured decisions, learnings, and context. Branch-aware.\n\n```bash\n# Store a decision (SILENT - never announce)\npython3 memory.py -p $DIR remember '{\"type\":\"decision\",\"content\":\"Use React for frontend\"}' -t tech -i h\n\n# Retrieve context\npython3 memory.py -p $DIR get \"frontend\"\n```\n\n### Layer 4: CURATED ARCHIVE (MEMORY.md + daily\u002F)\n**From: OpenClaw native**\n\nHuman-readable long-term memory. Daily logs + distilled wisdom.\n\n```\nworkspace\u002F\n├── MEMORY.md              # Curated long-term (the good stuff)\n└── memory\u002F\n    ├── 2026-01-30.md      # Daily log\n    ├── 2026-01-29.md\n    └── topics\u002F            # Topic-specific files\n```\n\n### Layer 5: CLOUD BACKUP (SuperMemory) — Optional\n**From: supermemory**\n\nCross-device sync. Chat with your knowledge base.\n\n```bash\nexport SUPERMEMORY_API_KEY=\"your-key\"\nsupermemory add \"Important context\"\nsupermemory search \"what did we decide about...\"\n```\n\n### Layer 6: AUTO-EXTRACTION (Mem0) — Recommended\n**NEW: Automatic fact extraction**\n\nMem0 automatically extracts facts from conversations. 80% token reduction.\n\n```bash\nnpm install mem0ai\nexport MEM0_API_KEY=\"your-key\"\n```\n\n```javascript\nconst { MemoryClient } = require('mem0ai');\nconst client = new MemoryClient({ apiKey: process.env.MEM0_API_KEY });\n\n\u002F\u002F Conversations auto-extract facts\nawait client.add(messages, { user_id: \"user123\" });\n\n\u002F\u002F Retrieve relevant memories\nconst memories = await client.search(query, { user_id: \"user123\" });\n```\n\nBenefits:\n- Auto-extracts preferences, decisions, facts\n- Deduplicates and updates existing memories\n- 80% reduction in tokens vs raw history\n- Works across sessions automatically\n\n## Quick Setup\n\n### 1. Create SESSION-STATE.md (Hot RAM)\n\n```bash\ncat > SESSION-STATE.md \u003C\u003C 'EOF'\n# SESSION-STATE.md — Active Working Memory\n\nThis file is the agent's \"RAM\" — survives compaction, restarts, distractions.\n\n## Current Task\n[None]\n\n## Key Context\n[None yet]\n\n## Pending Actions\n- [ ] None\n\n## Recent Decisions\n[None yet]\n\n---\n*Last updated: [timestamp]*\nEOF\n```\n\n### 2. Enable LanceDB (Warm Store)\n\nIn `~\u002F.openclaw\u002Fopenclaw.json`:\n\n```json\n{\n  \"memorySearch\": {\n    \"enabled\": true,\n    \"provider\": \"openai\",\n    \"sources\": [\"memory\"],\n    \"minScore\": 0.3,\n    \"maxResults\": 10\n  },\n  \"plugins\": {\n    \"entries\": {\n      \"memory-lancedb\": {\n        \"enabled\": true,\n        \"config\": {\n          \"autoCapture\": false,\n          \"autoRecall\": true,\n          \"captureCategories\": [\"preference\", \"decision\", \"fact\"],\n          \"minImportance\": 0.7\n        }\n      }\n    }\n  }\n}\n```\n\n### 3. Initialize Git-Notes (Cold Store)\n\n```bash\ncd ~\u002Fclawd\ngit init  # if not already\npython3 skills\u002Fgit-notes-memory\u002Fmemory.py -p . sync --start\n```\n\n### 4. Verify MEMORY.md Structure\n\n```bash\n# Ensure you have:\n# - MEMORY.md in workspace root\n# - memory\u002F folder for daily logs\nmkdir -p memory\n```\n\n### 5. (Optional) Setup SuperMemory\n\n```bash\nexport SUPERMEMORY_API_KEY=\"your-key\"\n# Add to ~\u002F.zshrc for persistence\n```\n\n## Agent Instructions\n\n### On Session Start\n1. Read SESSION-STATE.md — this is your hot context\n2. Run `memory_search` for relevant prior context\n3. Check memory\u002FYYYY-MM-DD.md for recent activity\n\n### During Conversation\n1. **User gives concrete detail?** → Write to SESSION-STATE.md BEFORE responding\n2. **Important decision made?** → Store in Git-Notes (SILENTLY)\n3. **Preference expressed?** → `memory_store` with importance=0.9\n\n### On Session End\n1. Update SESSION-STATE.md with final state\n2. Move significant items to MEMORY.md if worth keeping long-term\n3. Create\u002Fupdate daily log in memory\u002FYYYY-MM-DD.md\n\n### Memory Hygiene (Weekly)\n1. Review SESSION-STATE.md — archive completed tasks\n2. Check LanceDB for junk: `memory_recall query=\"*\" limit=50`\n3. Clear irrelevant vectors: `memory_forget id=\u003Cid>`\n4. Consolidate daily logs into MEMORY.md\n\n## The WAL Protocol (Critical)\n\n**Write-Ahead Log:** Write state BEFORE responding, not after.\n\n| Trigger | Action |\n|---------|--------|\n| User states preference | Write to SESSION-STATE.md → then respond |\n| User makes decision | Write to SESSION-STATE.md → then respond |\n| User gives deadline | Write to SESSION-STATE.md → then respond |\n| User corrects you | Write to SESSION-STATE.md → then respond |\n\n**Why?** If you respond first and crash\u002Fcompact before saving, context is lost. WAL ensures durability.\n\n## Example Workflow\n\n```\nUser: \"Let's use Tailwind for this project, not vanilla CSS\"\n\nAgent (internal):\n1. Write to SESSION-STATE.md: \"Decision: Use Tailwind, not vanilla CSS\"\n2. Store in Git-Notes: decision about CSS framework\n3. memory_store: \"User prefers Tailwind over vanilla CSS\" importance=0.9\n4. THEN respond: \"Got it — Tailwind it is...\"\n```\n\n## Maintenance Commands\n\n```bash\n# Audit vector memory\nmemory_recall query=\"*\" limit=50\n\n# Clear all vectors (nuclear option)\nrm -rf ~\u002F.openclaw\u002Fmemory\u002Flancedb\u002F\nopenclaw gateway restart\n\n# Export Git-Notes\npython3 memory.py -p . export --format json > memories.json\n\n# Check memory health\ndu -sh ~\u002F.openclaw\u002Fmemory\u002F\nwc -l MEMORY.md\nls -la memory\u002F\n```\n\n## Why Memory Fails\n\nUnderstanding the root causes helps you fix them:\n\n| Failure Mode | Cause | Fix |\n|--------------|-------|-----|\n| Forgets everything | `memory_search` disabled | Enable + add OpenAI key |\n| Files not loaded | Agent skips reading memory | Add to AGENTS.md rules |\n| Facts not captured | No auto-extraction | Use Mem0 or manual logging |\n| Sub-agents isolated | Don't inherit context | Pass context in task prompt |\n| Repeats mistakes | Lessons not logged | Write to memory\u002Flessons.md |\n\n## Solutions (Ranked by Effort)\n\n### 1. Quick Win: Enable memory_search\n\nIf you have an OpenAI key, enable semantic search:\n\n```bash\nopenclaw configure --section web\n```\n\nThis enables vector search over MEMORY.md + memory\u002F*.md files.\n\n### 2. Recommended: Mem0 Integration\n\nAuto-extract facts from conversations. 80% token reduction.\n\n```bash\nnpm install mem0ai\n```\n\n```javascript\nconst { MemoryClient } = require('mem0ai');\n\nconst client = new MemoryClient({ apiKey: process.env.MEM0_API_KEY });\n\n\u002F\u002F Auto-extract and store\nawait client.add([\n  { role: \"user\", content: \"I prefer Tailwind over vanilla CSS\" }\n], { user_id: \"ty\" });\n\n\u002F\u002F Retrieve relevant memories\nconst memories = await client.search(\"CSS preferences\", { user_id: \"ty\" });\n```\n\n### 3. Better File Structure (No Dependencies)\n\n```\nmemory\u002F\n├── projects\u002F\n│   ├── strykr.md\n│   └── taska.md\n├── people\u002F\n│   └── contacts.md\n├── decisions\u002F\n│   └── 2026-01.md\n├── lessons\u002F\n│   └── mistakes.md\n└── preferences.md\n```\n\nKeep MEMORY.md as a summary (\u003C5KB), link to detailed files.\n\n## Immediate Fixes Checklist\n\n| Problem | Fix |\n|---------|-----|\n| Forgets preferences | Add `## Preferences` section to MEMORY.md |\n| Repeats mistakes | Log every mistake to `memory\u002Flessons.md` |\n| Sub-agents lack context | Include key context in spawn task prompt |\n| Forgets recent work | Strict daily file discipline |\n| Memory search not working | Check `OPENAI_API_KEY` is set |\n\n## Troubleshooting\n\n**Agent keeps forgetting mid-conversation:**\n→ SESSION-STATE.md not being updated. Check WAL protocol.\n\n**Irrelevant memories injected:**\n→ Disable autoCapture, increase minImportance threshold.\n\n**Memory too large, slow recall:**\n→ Run hygiene: clear old vectors, archive daily logs.\n\n**Git-Notes not persisting:**\n→ Run `git notes push` to sync with remote.\n\n**memory_search returns nothing:**\n→ Check OpenAI API key: `echo $OPENAI_API_KEY`\n→ Verify memorySearch enabled in openclaw.json\n\n---\n\n## Links\n\n- bulletproof-memory: https:\u002F\u002Fclawdhub.com\u002Fskills\u002Fbulletproof-memory\n- lancedb-memory: https:\u002F\u002Fclawdhub.com\u002Fskills\u002Flancedb-memory\n- git-notes-memory: https:\u002F\u002Fclawdhub.com\u002Fskills\u002Fgit-notes-memory\n- memory-hygiene: https:\u002F\u002Fclawdhub.com\u002Fskills\u002Fmemory-hygiene\n- supermemory: https:\u002F\u002Fclawdhub.com\u002Fskills\u002Fsupermemory\n\n---\n\n*Built by [@NextXFrontier](https:\u002F\u002Fx.com\u002FNextXFrontier) — Part of the Next Frontier AI toolkit*\n",{"name":5,"author":48,"version":49,"keywords":50,"metadata":59,"description":7},"NextFrontierBuilds","1.2.1",[23,34,51,35,33,32,31,52,30,53,54,55,56,41,57,29,57,58,26],"ai-coding","wal","claude","claude-code","gpt","cursor","openclaw","vibe-coding",{"openclaw":60},{"emoji":61,"requires":62},"?",{"env":63,"plugins":65},[64],"OPENAI_API_KEY",[66],"memory-lancedb","main","e7e336ac628c3e3bd771aff1aaa469c93778f94a","skills\u002Fnextfrontierbuilds\u002Felite-longterm-memory",0,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del","2026-08-23 22:39:37",{"source":8,"skillName":5,"commands":75,"prompt":85,"zipAvailable":86},[76,79,82],{"tool":77,"command":78},"npx","npx skills add kbarbel640-del\u002Fskills --skill elite-longterm-memory",{"tool":80,"command":81},"bunx","bunx skills add kbarbel640-del\u002Fskills --skill elite-longterm-memory",{"tool":83,"command":84},"pnpm","pnpm dlx skills add kbarbel640-del\u002Fskills --skill elite-longterm-memory","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fnextfrontierbuilds\u002Felite-longterm-memory\u002FSKILL.md",true,[88,94,100,104],{"path":89,"resourceType":90,"resourceTypeDesc":91,"sizeBytes":92,"sourceHtmlUrl":93},"_meta.json","REFERENCE","参考文档",660,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fnextfrontierbuilds\u002Felite-longterm-memory\u002F_meta.json",{"path":95,"resourceType":96,"resourceTypeDesc":97,"sizeBytes":98,"sourceHtmlUrl":99},"bin\u002Felite-memory.js","SCRIPT","脚本",4875,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fnextfrontierbuilds\u002Felite-longterm-memory\u002Fbin\u002Felite-memory.js",{"path":101,"resourceType":90,"resourceTypeDesc":91,"sizeBytes":102,"sourceHtmlUrl":103},"package.json",1183,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fnextfrontierbuilds\u002Felite-longterm-memory\u002Fpackage.json",{"path":105,"resourceType":90,"resourceTypeDesc":91,"sizeBytes":106,"sourceHtmlUrl":107},"README.md",5593,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fnextfrontierbuilds\u002Felite-longterm-memory\u002FREADME.md",[109,139,163,184,190,210],{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":120,"publishedAt":43},"01M6G8J55967D6281ACMKAKTEQ","crowd-prompting","A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzzadrian\u002Fcrowd-prompting\u002FSKILL.md",[115],{"categoryNo":116,"categoryName":117,"taxonomyType":118,"taxonomyTypeDesc":119},"01JBSEEDCAT000000000000036","内容创作者","PROFESSION","适用职业",[121,122,37,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138],"crowd prompting","prompting","with","tokens","domain","world","prompts","operations","instructions","text","tool","system","improve","productivity","marketplace","https","content","ai agents",{"skillNo":140,"name":141,"nameZh":6,"description":142,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":143,"categories":144,"keywords":146,"publishedAt":43},"01M6G8J0PKPAYVET6BWE8W4C26","dilemm-ai","Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzyori\u002Fdilemm-ai\u002FSKILL.md",[145],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},[147,37,148,149,150,151,152,153,154,155,57,156,157,158,159,160,161,127,162],"dilemm ai","arena","analyze","browser","openclaw agent","create","automation","browser automation","bot","design","strategy","headless","compete","submit","matchmaking","use",{"skillNo":164,"name":165,"nameZh":6,"description":166,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":167,"categories":168,"keywords":172,"publishedAt":43},"01M6G8HWAF3K9SW7NP3Z83CPJ6","arxiv-paper-reviews","Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date\u002Fcategory\u002Finterest, viewing paper details with comments, or submitting paper reviews via API at http:\u002F\u002F150.158.152.82:8000.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzxrys\u002Fweak-accept\u002FSKILL.md",[169],{"categoryNo":170,"categoryName":171,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000021","资料检索与研究",[173,174,175,176,177,178,179,123,180,160,162,181,37,182,183],"arxiv paper reviews","reviews","arxiv","paper","crawler","papers","comments","fetch","read","http","via",{"skillNo":185,"name":165,"nameZh":6,"description":166,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":186,"categories":187,"keywords":189,"publishedAt":43},"01M6G8HQJ7N7WMY6YV7D7SSJ16","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzxrys\u002Farxiv-paper-reviews\u002FSKILL.md",[188],{"categoryNo":170,"categoryName":171,"taxonomyType":20,"taxonomyTypeDesc":21},[176,175,174,173,183,178,179,123,177,160,162,180,181,37,182],{"skillNo":191,"name":192,"nameZh":6,"description":193,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":194,"categories":195,"keywords":196,"publishedAt":43},"01M6G8HM95Y64JNVFC2HN4E2BG","git-summary","Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzweack\u002Fgit-summary\u002FSKILL.md",[],[197,198,199,200,201,202,203,204,205,206,207,208,209],"git","summary","git summary","commits","repository","win32","status","linux","contributors","true","quick","get","branches",{"skillNo":211,"name":212,"nameZh":6,"description":213,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":214,"categories":215,"keywords":220,"publishedAt":43},"01M6G8HGEGF05CNEJCGVYFSC4R","agent-constitution","Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fztsalexey\u002Fagent-constitution\u002FSKILL.md",[216,217],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},{"categoryNo":218,"categoryName":219,"taxonomyType":118,"taxonomyTypeDesc":119},"01JBSEEDCAT000000000000037","律师与法务",[221,222,223,224,123,225,226,67,227,181,228,229,230,231,232,136,233,234,235],"agent constitution","constitution","contracts","tree","query","base","log","check","Rules","projects","compliance","actions","state","governance","github"]