{"skill":{"slug":"quickrecall","displayName":"QuickRecall - Zero-Dependency Memory Engine.  常用记忆优先出现。零依赖 AI 记忆引擎，纯 Node.js。/ Prioritizes frequently used memories. Zero deps.","summary":"Persistent memory engine for AI agents with semantic recall, hotness prioritization, importance weighting, time decay, and auto-compaction. Zero external dep...","description":"---\nname: memory-enhancement-engine\ndescription: Persistent memory engine for AI agents with semantic recall, hotness prioritization, importance weighting, time decay, and auto-compaction. Zero external dependencies. Pure Node.js.\ntags:\n  - memory\n  - persistent\n  - semantic-search\n  - hotness\n  - recall\n  - ai-agent\n  - nodejs\nfeatures:\n  - Hotness-prioritized recall\n  - Semantic search (bigram + character overlap)\n  - Importance weighting (0-2.0)\n  - Exponential time decay\n  - Auto-compaction and pruning\n  - Zero external dependencies\n  - Pure Node.js\n---\n\n# Memory Enhancement Engine\n\n**记忆增加引擎** — Persistent memory engine with hotness-prioritized semantic recall.\n\nMemories that are recalled more often appear first — not just keyword matches.\n\n## Quick Start\n\n```bash\n# Node.js API\nconst { MemorySystem } = require('./memory-enhancement-engine/memory.js');\nconst mem = new MemorySystem();\n\n# CLI tool (view / search / compact)\nnode memory-enhancement-engine/memo.cjs status\nnode memory-enhancement-engine/memo.cjs query \"something to find\"\n```\n\n## Core Usage\n\n```javascript\nconst { MemorySystem } = require('./memory-enhancement-engine/memory.js');\n\n// Create engine (stores to MEMORY_STORE.json automatically)\nconst mem = new MemorySystem({ decayHalfLifeHours: 2 });\n\n// Write a memory\nmem.add({\n  content: \"Paris is the capital of France.\",\n  importance: 1.5,\n  metadata: { tags: [\"geography\", \"fact\"] }\n});\n\n// Semantic search\nconst results = mem.query(\"France capital\");\nconsole.log(results);\n\n// Get recent memories\nconst recent = mem.recent(10);\n\n// Compact old memories (summarize low-importance clusters)\nmem.compact(5, 0.3);\n```\n\n## API\n\n| Method | Description |\n|--------|-------------|\n| `add(content, importance, metadata)` | Write a memory |\n| `retrieve(query, k)` | Semantic search (returns sorted by score) |\n| `getRecent(n)` | Get N most recent memories |\n| `remove(predicate)` | Remove memories matching predicate |\n| `compact(groupSize, minImportance)` | Compact old memories into summaries |\n| `getStatus()` | Get engine stats (count, size, etc.) |\n\n## Scoring Formula\n\n```\nscore = similarity × 0.5 + recency × 0.3 + hotness × 0.2\n```\n\nWhere hotness = log(1 + access_count) × exp(-time_delta / 86400)\n\n## Features\n\n- **Hotness-Prioritized Recall** — Frequently accessed memories get boosted scores\n- **Semantic Search** — Bigram overlap + character-level similarity\n- **Importance Weighting** — 0.0 (trivial) to 2.0 (critical)\n- **Time Decay** — Half-life configurable (default 2 hours)\n- **Auto-Prune** — Beyond 1000 entries, least important are pruned\n- **Auto-Compaction** — Merge low-importance groups into summaries\n- **No Server Needed** — Direct Node.js require, stores to local JSON\n\n## Installation\n\n| Method | Command |\n|--------|---------|\n| Copy | Copy `memory.js` + `memo.cjs` to your project |\n| ClawHub | `clawhub install memory-enhancement-engine` |\n\n## File Structure\n\n```\nmemory-enhancement-engine/\n├── SKILL.md\n├── memory.js            # Core engine\n├── memo.cjs             # CLI tool\n├── package.json\n├── assets/\n│   └── icon.svg\n├── references/\n│   ├── API_SPEC.md\n│   └── USE_GUIDE.md\n└── scripts/\n    ├── init-memory.mjs  # One-time migration\n    └── test-client.js\n```\n\n## License\n\nMIT\n","tags":{"latest":"1.0.5","zero-dependency":"1.0.0"},"stats":{"comments":0,"downloads":569,"installsAllTime":1,"installsCurrent":1,"stars":0,"versions":6},"createdAt":1777720746687,"updatedAt":1778492830283},"latestVersion":{"version":"1.0.5","createdAt":1777896080725,"changelog":"Version 1.0.5\n\n- No changes detected in the skill files or documentation.\n- No new features, fixes, or updates in this release.","license":"MIT-0"},"metadata":null,"owner":{"handle":"chen-feng123","userId":"s173bjpr98qcngds2npjsk01ah85y9vx","displayName":"CHEN-feng123","image":"https://avatars.githubusercontent.com/u/257892428?v=4"},"moderation":null}