musememory 2.2.1 โ 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/artifacts/2026-10-20-lifeos-memory-distillation-plan.md +865 -0
- package/.agents/artifacts/HANDOFF.md +22 -0
- package/.agents/artifacts/audit-and-realigned-roadmap-20261015.md +152 -0
- package/.agents/artifacts/bench-graph-baseline.json +519 -0
- package/.agents/artifacts/bench-graph-baseline.md +139 -0
- package/.agents/artifacts/brief-dayos-inspired-site-redo.md +89 -0
- package/.agents/artifacts/handoff-20261015-143202.md +109 -0
- package/.agents/artifacts/plan-competitor-adaptation-dashboard-graph.md +99 -0
- package/.agents/artifacts/session-report-2026-10-01-memory-gaps-and-website.md +94 -0
- package/.agents/artifacts/wave-3-sdd-ledger.md +18 -0
- package/.agents/artifacts/wave-4-sdd-ledger.md +18 -0
- package/.agents/context/architecture.md +1 -0
- package/.agents/context/current.md +168 -3
- package/.agents/context/decisions.md +4 -0
- package/.agents/context/deep-research-agentic-memory-evolution.md +261 -0
- package/.agents/context/deep-research-memory-adaptation-2026-10.md +107 -0
- package/.agents/context/deep-research-memory-improvement-2026-10.md +420 -0
- package/.agents/context/deep-research-memory-mechanisms-2026-09.md +334 -0
- package/.agents/context/index.md +5 -0
- package/.agents/context/product.md +2 -1
- package/.agents/context/roadmap.md +361 -7
- package/.agents/context/ticket-plan.md +553 -0
- package/.agents/plans/2026-10-20-wave-22-failure-attribution-negative-mining-design.md +198 -0
- package/.agents/plans/2026-10-20-wave-22-failure-attribution-negative-mining-plan.md +274 -0
- package/.agents/plans/EVOLUTION_PLAN.md +351 -0
- package/.agents/plans/local-embeddings-llama-cpp.md +37 -0
- package/.agents/plans/recall-eval-harness.md +31 -0
- package/.agents/research/ecosystem-teardown-2026-10.md +289 -0
- package/.agents/research/research-brief-walrus-memory-architecture.md +189 -0
- package/.agents/research/retirement-audit-2026-10.md +45 -0
- package/.agents/skills/muse-current/SKILL.md +47 -17
- package/.agents/standards/git-workflow.md +5 -0
- package/.agents/standards/workflows.md +13 -0
- package/README.md +141 -54
- package/dist/index.js +21008 -8958
- package/package.json +20 -10
- package/schema.json +39 -2
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
# ๐ง Deep Research: Memory System Mechanisms โ October 2026 Update
|
|
2
|
+
|
|
3
|
+
**Date**: 2026-10-02
|
|
4
|
+
**Scope**: Mechanisms from 9 newly-researched memory systems, scored adaptation shortlist, and a concrete plan to upgrade Muse Memory's search, storage, and hands-free capture โ with a production-readiness and monetization lens.
|
|
5
|
+
**Prerequisite reading**: [`deep-research-memory-mechanisms-2026-09.md`](./deep-research-memory-mechanisms-2026-09.md) (86-system study) and [`deep-research-memory-adaptation-2026-10.md`](./deep-research-memory-adaptation-2026-10.md) (A1โA14 scored shortlist, top-3: hooks, starts-full install, incremental symbol-index).
|
|
6
|
+
**Sources verified**: Primary repos, docs, and the carsteneu/ai-memory-comparison project. Evidence cited inline below.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Table of Contents
|
|
11
|
+
|
|
12
|
+
1. [Executive Summary](#1-executive-summary)
|
|
13
|
+
2. [The Nine New Systems โ Mechanism Profiles](#2-the-nine-new-systems--mechanism-profiles)
|
|
14
|
+
3. [Cross-System Mechanism Matrix](#3-cross-system-mechanism-matrix)
|
|
15
|
+
4. [What This Means for Muse โ Updated Gap Scorecard (ยง14 โ ยง15)](#4-what-this-means-for-muse--updated-gap-scorecard-ยง14--ยง15)
|
|
16
|
+
5. [Scored Adaptation Shortlist (A15โA22)](#5-scored-adaptation-shortlist-a15-a22)
|
|
17
|
+
6. [Search Engine Upgrade Path](#6-search-engine-upgrade-path)
|
|
18
|
+
7. [Memory Data Storage Architecture Recommendations](#7-memory-data-storage-architecture-recommendations)
|
|
19
|
+
8. [Production-Readiness & Monetization Plan](#8-production-readiness--monetization-plan)
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## 1. Executive Summary
|
|
24
|
+
|
|
25
|
+
The October 2026 wave of agentic memory systems converges on three new themes that were **emergent** rather than mature twelve months ago:
|
|
26
|
+
|
|
27
|
+
| Theme | What it means for Muse |
|
|
28
|
+
|---|---|
|
|
29
|
+
| **Git-versioned memory** | Memoir brings branch-aware memory, `blame`/rollback, and hierarchical semantic paths (`profile.professional.skills.python`). Context contamination on `git checkout` is a solved problem. |
|
|
30
|
+
| **Compile-over-retrieve** | ai-memory adopts Karpathy's "compile, don't retrieve" principle: extractive compaction, access-weighted retention, and per-tier decay curves โ zero LLM by default. |
|
|
31
|
+
| **JIT (just-in-time) memory** | GAM introduces a dual-agent Memorizer/Researcher architecture where memory is *assembled at query time* from a lossless page-store, not pre-compressed. |
|
|
32
|
+
|
|
33
|
+
**Key takeaway**: Muse already ships the strongest retrieval engine (lexical-first, <2 ms, keyless). The *next leap* is not faster vectors โ it is **versioned memory**, **compile-over-retrieve consolidation**, and **hands-free hook capture at full coverage**. The adaptation shortlist (A15โA22) below prioritizes these, ranked by impact ร feasibility.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## 2. The Nine New Systems โ Mechanism Profiles
|
|
38
|
+
|
|
39
|
+
### 2.1 GAM โ General Agentic Memory via Deep Research (VectorSpaceLab)
|
|
40
|
+
|
|
41
|
+
**Repo**: https://github.com/VectorSpaceLab/general-agentic-memory ยท **Paper**: arxiv 2511.18423
|
|
42
|
+
**Architecture**: Dual-agent โ *Memorizer* (offline, lightweight memory + lossless page-store) and *Researcher* (online, JIT deep-research over the page-store).
|
|
43
|
+
**Key innovations**:
|
|
44
|
+
- **JIT compilation principle**: memory is *generated at runtime* for the specific request, not pre-compressed. The Memorizer keeps a "light memory" + complete page-store; the Researcher performs iterative retrieval โ reflection โ refinement until the client's need is met.
|
|
45
|
+
- **Hierarchical directory organization** (Taxonomy): memories organized into a auto-generated directory tree.
|
|
46
|
+
- **Incremental addition**: new content appended to existing GAMs without rebuild.
|
|
47
|
+
- **Multi-modal**: supports text, video, and long-horizon agent trajectories.
|
|
48
|
+
- **Benchmarks**: LoCoMo, HotpotQA, RULER, NarrativeQA โ "consistently and significantly outperforms existing methods."
|
|
49
|
+
|
|
50
|
+
**Relevance to Muse**: The JIT dual-agent pattern is the strongest counterpoint to Muse's current "retrieve-then-inject" model. While Muse already does consolidation (raw โ observation โ lesson โ crystal), GAM suggests the *final retrieval pass* should re-research from the page-store rather than returning pre-ranked memories. This maps to Muse's R21 (local vectors) but is **LLM-free** if the Researcher uses lexical+graph retrieval.
|
|
51
|
+
|
|
52
|
+
### 2.2 ai-memory (akitaonrails) โ Git-Backed Markdown Wiki
|
|
53
|
+
|
|
54
|
+
**Repo**: https://github.com/akitaonrails/ai-memory ยท **Language**: Rust ยท **License**: Apache 2.0
|
|
55
|
+
**Architecture**: Git-backed markdown wiki as the source of truth; SQLite as a derived index; optional HTTP server; lifecycle hooks.
|
|
56
|
+
**Key innovations**:
|
|
57
|
+
- **Compile-over-retrieve** (Karpathy LLM Wiki principle): extractive compaction, access-weighted retention, contradiction flagging โ all zero-LLM.
|
|
58
|
+
- **Git-backed as source of truth**: plain `.md` files are the store; the DB is derived and rebuildable. No binary blob to babysit. `git blame` and `git checkout` work on memory.
|
|
59
|
+
- **Lifecycle hooks**: 20+ harnesses (Claude Code, Codex, Cursor, Gemini CLI, OpenCode, etc.) feed one shared memory. Hooks for session-start, user-prompt-submit, and stop.
|
|
60
|
+
- **Per-tier decay curves** (v2.4): memories decay on a schedule tuned per tier; frequently accessed memories decay slower.
|
|
61
|
+
- **Access-weighted retention**: always-on, "can only ever keep memory longer." Cold notes can be compacted down to durable facts instead of dropped; near-duplicates collapse.
|
|
62
|
+
- **Zero-LLM default**: capture, search, handoffs all work with no API key. LLM consolidation is opt-in and off by default.
|
|
63
|
+
- **One self-contained binary**, purge commands that say what "deleted" means, measured write ceiling (~700/s).
|
|
64
|
+
|
|
65
|
+
**Relevance to Muse**: The git-backed markdown wiki is a **direct architectural parallel** to Muse's YAML mirror design. ai-memory's innovation is the *access-weighted retention* and *extractive compaction* without any LLM. Muse should adopt access-weighted retention (ยง2.6 A15) and git-blamable memory files (ยง2.6 A16).
|
|
66
|
+
|
|
67
|
+
### 2.3 Memoir โ Git for AI Memory (zhangfengcdt)
|
|
68
|
+
|
|
69
|
+
**Repo**: https://github.com/zhangfengcdt/memoir ยท **Docs**: https://zhangfengcdt.github.io/memoir/
|
|
70
|
+
**Architecture**: Hierarchical memory with Git-like version control. ProllyTree (probabilistic tree) storage. Python SDK + CLI + MCP server.
|
|
71
|
+
**Key innovations**:
|
|
72
|
+
- **Git-like versioning**: `branch`, `commit`, `merge`, `rollback` with cryptographic integrity. Memoir is explicit about *why* versioned memory matters: context contamination on `git checkout`, prefix-cache invalidation from global memory files, and the inability to audit who taught an agent a rule.
|
|
73
|
+
- **Semantic paths**: replace UUIDs with meaningful paths like `preferences.coding.style.python`.
|
|
74
|
+
- **O(log n) lookups** via hierarchical tree, not vector search.
|
|
75
|
+
- **Performance**: 0.1โ1 ms search latency (vs 150โ750 ms for vector databases); 20โ30 ms storage latency (vs 200โ600 ms).
|
|
76
|
+
- **MCP server**: `memoir-mcp` with `memoir_branches`, `memoir_checkout`, `memoir_commits` โ versioning tools no other memory server ships.
|
|
77
|
+
|
|
78
|
+
**Relevance to Muse**: Memoir's **branch-aware memory** is the single most important pattern Muse lacks. When a developer `git checkout feature/auth-v2`, Muse's global `~/.memory` still applies โ potentially contaminating the session. A `memory branch` + `memory checkout` command (ยง2.6 A16) would solve this. The semantic-path addressing also inspires a **namespaced memory ID** scheme alongside Muse's existing `id` field.
|
|
79
|
+
|
|
80
|
+
### 2.4 Mnemory (fpytloun) โ Self-Hosted Secure Memory
|
|
81
|
+
|
|
82
|
+
**Repo**: https://github.com/fpytloun/mnemory
|
|
83
|
+
**Architecture**: Python-based, self-hosted, secure feature-rich memory system for AI agents and assistants.
|
|
84
|
+
**Key innovations**:
|
|
85
|
+
- **Intelligent fact extraction and deduplication**: facts are extracted from conversation turns and deduplicated semantically.
|
|
86
|
+
- **OpenWebUI integration**: ships as a plugin with a memory-provider pattern.
|
|
87
|
+
- **Self-hosted, secure**: runs entirely locally; security is a first-class constraint.
|
|
88
|
+
|
|
89
|
+
**Relevance to Muse**: Mnemory's fact-extraction model confirms Muse's `distillation โ candidate confirmation โ observations` pipeline (capability #15). The OpenWebUI plugin pattern suggests a **Muse plugin for popular agents** (ยง2.6 A17). The "fact extraction + dedup" pattern is already partially in Muse but could be made more explicit as a standalone `memory consolidate` phase.
|
|
90
|
+
|
|
91
|
+
### 2.5 Engram โ Neuroscience-Grounded Memory
|
|
92
|
+
|
|
93
|
+
**Repo**: https://github.com/Gentleman-Programming/engram ยท **Language**: Go ยท **License**: MIT
|
|
94
|
+
**Architecture**: Single SQLite file, neuroscience-grounded (ACT-R activation, Ebbinghaus forgetting, Hebbian learning, dual-trace consolidation).
|
|
95
|
+
**Key innovations**:
|
|
96
|
+
- **Neuroscience model**: 4 memory types with category-based half-lives; ACT-R activation for urgency, Ebbinghaus forgetting for decay, Hebbian learning for co-activation.
|
|
97
|
+
- **Emotional bus**: memories tagged with emotional valence that influences retrieval priority.
|
|
98
|
+
- **Synthesis engine**: consolidates related memories into coherent narratives.
|
|
99
|
+
- **Rust core** (newer version): performance-focused.
|
|
100
|
+
- **Obsidian graph export**: knowledge exported to Obsidian for human review.
|
|
101
|
+
|
|
102
|
+
**Relevance to Muse**: Engram's **category-based half-life decay** (ยง2.6 A18) is the strongest evolution of Muse's existing staleness policy. Muse's `staleness_policy` per `MemoryType` could evolve to support Ebbinghaus-style exponential decay curves. The **co-activation strengthening** pattern (ยง2.6 A19) maps directly to Muse's A14 adaptation candidate.
|
|
103
|
+
|
|
104
|
+
### 2.6 TencentDB Agent Memory (TencentAILab-Hunter)
|
|
105
|
+
|
|
106
|
+
**Repo**: https://github.com/tencent-ailab-hunter/Agent-Memory ยท **Language**: Python
|
|
107
|
+
**Architecture**: Symbolic short-term memory (Mermaid canvas) + layered long-term memory (L0โL1โL2โL3). 4 memory assets: Chat Memory, Skill, LLM-Wiki, CodeGraph.
|
|
108
|
+
**Key innovations**:
|
|
109
|
+
- **Layered memory model**: L0 (hot/active), L1 (short-term summary), L2 (knowledge), L3 (permanent) โ with progressive disclosure.
|
|
110
|
+
- **4 memory assets**: Chat Memory (conversations), Skill (tool-calling workflows), LLM-Wiki (documents/knowledge), CodeGraph (code relationships).
|
|
111
|
+
- **Full traceback to evidence**: every memory links back to its source with full attribution.
|
|
112
|
+
|
|
113
|
+
**Relevance to Muse**: TencentDB's 4-asset model (Chat Code Skill Wiki) maps cleanly onto Muse's existing tiers (observations โ candidates โ ADRs/wiki โ rollups). The **progressive disclosure** pattern (L0 abstracts โ full content) (ยง2.6 A20) is already partially in Muse's L0/L1 cache but not exposed to agents as a disclosure tier.
|
|
114
|
+
|
|
115
|
+
### 2.7 BrainCTL โ Brain Regions Model
|
|
116
|
+
|
|
117
|
+
**Repo**: https://github.com/braindb/brainctl ยท **Language**: Python/Rust ยท **License**: Apache 2.0
|
|
118
|
+
**Architecture**: Single SQLite file, MCP server with 100 tools, brain regions model (27 nuclei).
|
|
119
|
+
**Key innovations**:
|
|
120
|
+
- **Brain regions model**: 27 nuclei (brain regions) modeling different memory functions โ hippocampus (episodic), neocortex (semantic), striatum (procedural), etc.
|
|
121
|
+
- **FTS5 default with optional vector** (sqlite-vec + Ollama): keyless-first, vectors optional.
|
|
122
|
+
- **Hybrid RRF**: BM25 + vector + graph, fused by RRF.
|
|
123
|
+
- **Knowledge graph with entity linking**: typed entity extraction and graph edges.
|
|
124
|
+
- **Signed exports**: memory exports are cryptographically signed for tamper evidence.
|
|
125
|
+
- **Solana marketplace**: memory trading on-chain (experimental).
|
|
126
|
+
|
|
127
|
+
**Relevance to Muse**: BrainCTL's **27-nuclei brain model** (ยง2.6 A21) provides a taxonomy for Muse's existing memory types. Muse already has typed memory (`decision`, `fix`, `lesson`, `adr`, `anti_pattern`) but lacks a formal "brain region" abstraction. The **signed exports** pattern is already in Muse's `SyncPacket` but could be extended to individual memory exports.
|
|
128
|
+
|
|
129
|
+
### 2.8 NeuraKeep โ Durable Facts with Provenance
|
|
130
|
+
|
|
131
|
+
**Website**: https://neurakeep.com
|
|
132
|
+
**Architecture**: Local-first memory layer with source citations, proposal-reviewed durable facts, failure memory, MCP access.
|
|
133
|
+
**Key innovations**:
|
|
134
|
+
- **Source citations**: every memory must cite its source; citations are verified and traceable.
|
|
135
|
+
- **Proposal-reviewed durable facts**: facts go through a proposal โ review โ accept lifecycle.
|
|
136
|
+
- **Failure memory**: explicit capture of failures and lessons.
|
|
137
|
+
- **Audit trail**: full audit of who created/modified each memory.
|
|
138
|
+
- **Hosted plans**: offers hosted (cloud) options alongside local-first.
|
|
139
|
+
|
|
140
|
+
**Relevance to Muse**: NeuraKeep's **proposal-reviewed durable facts** (ยง2.6 A22) maps to Muse's `propose โ candidate โ confirm` lifecycle, but NeuraKeep makes the review explicit as a UI workflow. The **failure memory** pattern is already in Muse's `anti_pattern` / `negative memory` type but could be more prominent. The hosted plans model is a **monetization pattern** Muse should consider.
|
|
141
|
+
|
|
142
|
+
### 2.9 Kage โ Trust-Gate Memory (already studied)
|
|
143
|
+
|
|
144
|
+
**Repo**: https://github.com/kage-core/Kage ยท **Key innovations**: Write-time citation verification (Kage's moat), recall-time freshness gate (0% stale-served), BM25 + sparse lexical scoring.
|
|
145
|
+
**Relevance to Muse**: Kage was the basis for Muse's GAP-1, GAP-2, GAP-3 (already shipped per `current.md` #35โ37). The new adaptation is to extend verification to *cross-repository* anchors and *multi-hop causal walks* (ยง2.6 A14 from the prior adaptation doc).
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## 3. Cross-System Mechanism Matrix
|
|
150
|
+
|
|
151
|
+
| Mechanism | GAM | ai-memory | Memoir | Mnemory | Engram | TencentDB | BrainCTL | NeuraKeep | Muse v2.3 |
|
|
152
|
+
|---|---|---|---|---|---|---|---|---|---|
|
|
153
|
+
| **Zero-LLM default** | โ (opt-in) | โ | โ keyless | โ | โ | partial | โ | partial | โ |
|
|
154
|
+
| **Git-versioned memory** | โ | โ | โ | โ | โ | โ | partial | โ | โ |
|
|
155
|
+
| **Branch-aware memory** | โ | partial | โ | โ | โ | โ | โ | โ | โ |
|
|
156
|
+
| **Lifecycle hooks** | โ | โ 20+ harnesses | โ hooks+recall | partial | โ | โ | โ | partial | โ 3 events (GAP-2 shipped) |
|
|
157
|
+
| **Starts full (retroindex)** | โ | โ | partial | partial | โ | โ | partial | โ | partial (GAP-A2) |
|
|
158
|
+
| **Write-time citation verify** | โ | โ | โ | โ | โ | partial | partial | โ | โ (GAP-1 shipped) |
|
|
159
|
+
| **Recall-time freshness gate** | โ | partial | โ | โ | partial | โ | partial | โ | โ (GAP-3 shipped) |
|
|
160
|
+
| **Per-tier decay curves** | โ | โ | โ | partial | โ | โ | partial | โ | partial (staleness policy) |
|
|
161
|
+
| **Access-weighted retention** | โ | โ | โ | โ | partial | โ | โ | โ | โ |
|
|
162
|
+
| **Extractive compaction** | โ | โ | โ | โ | partial | partial | partial | partial | partial (observation tier) |
|
|
163
|
+
| **Hierarchical semantic paths** | partial (Taxonomy) | โ | โ | โ | partial | โ | partial | โ | partial (tags + scope) |
|
|
164
|
+
| **MCP server** | โ | โ | โ | partial | partial | partial | โ 100 tools | โ | โ 69 tools |
|
|
165
|
+
| **Multi-agent shared store** | โ | โ | single-user | โ | partial | partial | partial | hosted | โ mesh |
|
|
166
|
+
| **Signed exports** | โ | partial | โ | partial | partial | partial | โ | โ | โ (SyncPacket) |
|
|
167
|
+
| **Single binary** | โ (Python) | โ (Rust) | โ (Python) | โ (Python) | โ (Go) | โ (Python) | partial | hosted | โ (bun) |
|
|
168
|
+
| **Local dashboard over store** | Web UI | โ | โ `memoir ui` | partial | โ TUI + cloud | โ | partial | โ | โ (Observability Studio) |
|
|
169
|
+
|
|
170
|
+
**Observation**: Muse ships the strongest retrieval and observability. The gaps are concentrated in **versioned memory** (Git-backed), **access-weighted retention**, and **hierarchical semantic paths** โ all of which are achievable without LLMs or new dependencies.
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## 4. What This Means for Muse โ Updated Gap Scorecard (ยง14 โ ยง15)
|
|
175
|
+
|
|
176
|
+
Building on the September 2026 scorecard (42/44 speed+observability, 11/20 hands-free, 7/10 trust), the new systems refine the gaps:
|
|
177
|
+
|
|
178
|
+
### Updated Scorecard (0โ2 scale)
|
|
179
|
+
|
|
180
|
+
| Category | # | Mechanism | September Score | October Score | Evidence in Muse | New Priority |
|
|
181
|
+
|---|---|---|---|---|---|---|
|
|
182
|
+
| **Speed** | 6 | Sub-ms measured lookup | 1 | 1 | Hot cache sub-50ยตs, no per-store median published | A22 (publish) |
|
|
183
|
+
| **Hands-free** | 9 | Full lifecycle hooks (6+ events) | 0 โ **2 (shipped GAP-2)** | 2 | 3 of 6 events shipped in `src/hooks/pack.ts` | Complete to 6 events (A1) |
|
|
184
|
+
| **Hands-free** | 13 | Retroactive "starts full" indexing | 1 | 1 | `memory_search_transcripts` exists, no `--retroindex` CLI verb | A22 |
|
|
185
|
+
| **Trust** | 16 | Write-time citation verification | 0 โ **2 (shipped GAP-1)** | 2 | `src/anchors/verify-write.ts` enforces at attach time | Extend to multi-repo |
|
|
186
|
+
| **Trust** | 17 | Recall-time freshness gate | 1 โ **2 (shipped GAP-3)** | 2 | `freshness.ts` withholds drifted/orphaned anchors | None |
|
|
187
|
+
| **Compounding** | 22 | Decay/suppression instead of delete | 2 | 2 | 7-state lifecycle + archival ladder | Evolve to category-half-life (A18) |
|
|
188
|
+
| **Compounding** | 23 | Stable topic keys | 1 | 1 | `supersede` chains exist | Add semantic-path addressing (A21) |
|
|
189
|
+
| **Compounding** | 24 | Idle/dream consolidation | 1 | 1 | 7d/48h idle optimize cadence | Add event-driven triggers (A4) |
|
|
190
|
+
| **Observability** | 26 | Local dashboard over same store | 2 | 2 | Web Observability Studio | None |
|
|
191
|
+
| **Observability** | 29 | Session replay / timeline | 2 | 2 | Session nodes + observations.jsonl | Extend to agent replay |
|
|
192
|
+
|
|
193
|
+
### New Gap: Versioned Memory (Git-backed)
|
|
194
|
+
|
|
195
|
+
| Category | Mechanism | Score | Evidence in Muse |
|
|
196
|
+
|---|---|---|---|
|
|
197
|
+
| **New** | G1 | Git-branch-aware memory (context contamination prevention) | 0 | No branch-aware memory; `~/.memory` is global regardless of branch |
|
|
198
|
+
| **New** | G2 | Git-blamable memory files (who wrote what) | 1 | YAML mirrors are git-trackable but no attribution metadata |
|
|
199
|
+
| **New** | G3 | Rollback / checkpoint restore | 0 | `restoreSnapshot` exists for DB, not for individual memories |
|
|
200
|
+
|
|
201
|
+
**Three new systemic gaps (ranked by leverage)**:
|
|
202
|
+
|
|
203
|
+
1. **G1 โ Branch-aware memory** (highest leverage): When a developer `git checkout feature/foo`, Muse's global memory still applies โ potential contamination. A `memory branch` + `memory checkout` workflow would solve this.
|
|
204
|
+
2. **G2 โ Access-weighted retention** (high leverage): Muse's existing staleness policy is time-based; Engram and ai-memory show that *access frequency* should slow decay โ keeping useful memories and dropping noise without any LLM.
|
|
205
|
+
3. **G3 โ Semantic-path addressing** (medium leverage): Muse's `id` is a UUID. Memoir's `preferences.coding.style.python` pattern suggests a namespaced, human-readable addressing scheme alongside the structural anchor system.
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## 5. Scored Adaptation Shortlist (A15โA22)
|
|
210
|
+
|
|
211
|
+
Building on the A1โA14 shortlist from the September research, these 8 new candidates are ranked by **impact ร feasibility** (both 1โ5). Impact is measured against the October gap scorecard; feasibility discounts anything requiring an LLM, an API key, a daemon, or host support that doesn't exist yet.
|
|
212
|
+
|
|
213
|
+
| # | Candidate | Mechanism (primary source) | What Muse already has | Adaptation | Impact | Feas | Score |
|
|
214
|
+
|---|---|---|---|---|---|---|---|
|
|
215
|
+
| A15 | **Access-weighted retention** | ai-memory per-tier decay curves; Engram Ebbinghaus + co-activation | `staleness_policy` per `MemoryType`; `utility ROI` (`application_count`, `successful_applications`) | Track `last_accessed_at` per memory; slow decay rate proportional to access frequency. Non-linear: memories used โฅ2ร in session get +50% longevity. | 4 | 5 | **20** |
|
|
216
|
+
| A16 | **Git-branch-aware memory** | Memoir `branch`/`checkout`/`blame`; ai-memory per-project git-backed wiki | `project` filter in ranking; mesh scoping | `memory branch <name>`: snapshot active `.memory/` + global `~/.memory` scope for current git branch. `memory checkout <branch>`: swap to that branch's memory view. `memory blame <id>`: who created/modified this memory. | 5 | 3 | **15** |
|
|
217
|
+
| A17 | **Agent plugin registry** | Mnemory OpenWebUI plugin; ai-memory 20+ harness plugins | 80+ platform auto-detection in `connect.ts` | Ship `memory plugin install <agent>`: installs a thin plugin into the agent's plugin directory that calls `muse_context` at session start + `create_observation` at stop. Extends the MCP registration to plugin registration. | 4 | 4 | **16** |
|
|
218
|
+
| A18 | **Category-based half-life decay** | Engram 4 memory types with category-based half-lives | 7-state lifecycle + `staleness_policy` | Evolve `staleness_policy` from simple TTL to a half-life curve: `half_life_days` per `MemoryType` (e.g., `fix` = 60d, `adr` = 365d, `anti_pattern` = permanent). Access reinforces (Ebbinghaus). | 4 | 5 | **20** |
|
|
219
|
+
| A19 | **Co-activation strengthening** | Engram Hebbian learning; Vestige `dream_compile` | `related_memory_ids`, graph overlap in ranking | During consolidation, when memory A is used and memory B is in its `related_memory_ids`, strengthen B's recency and utility by a small delta. Zero-LLM: just a ranking boost. | 3 | 5 | **15** |
|
|
220
|
+
| A20 | **Progressive disclosure (L0/L1/L2)** | OpenViking `.abstract.md` + `.overview.md`; TencentDB L0โL3 | Wiki pages + L0/L1 cache | Return a one-line abstract for each ranked candidate plus a drill-down handle. Agent scans cheaply, expands only winners. Expose via `include_abstract: true` in `muse_context`. | 3 | 4 | **12** |
|
|
221
|
+
| A21 | **Semantic-path addressing** | Memoir `profile.professional.skills.python`; TencentDB 4 assets | `id` (UUID) + `tags` + `scope` | Introduce `mem_path` field: a dotted-path like `auth.session.jwt-expiry`. `muse_get <path>` resolves semantically. Backwards-compatible: UUID still works. | 3 | 4 | **12** |
|
|
222
|
+
| A22 | **Per-store median publishing** | deja-vu per-store medians; Kage "18% faster than grep" | `memory benchmark` exists | Add `memory benchmark --median` that runs 5 warm calls and publishes per-store per-query-type medians to `.memory/.benchmarks.json`. Surface in Observability Studio. | 2 | 5 | **10** |
|
|
223
|
+
|
|
224
|
+
### Top 3 Ranked (A15, A16, A18) โ All Score 20 except A16 at 15
|
|
225
|
+
|
|
226
|
+
**A15 โ Access-weighted retention (score 20)**
|
|
227
|
+
- **Why**: The existing `utility ROI` tracking (`application_count`, `successful_applications`) already measures engagement. Adding `last_accessed_at` and a decay multiplier is a pure data-tracking upgrade โ no LLM, no daemon, no new dependencies. Engram proves the pattern works (category-based half-life + co-activation).
|
|
228
|
+
- **Acceptance criteria**:
|
|
229
|
+
- `last_accessed_at` is updated on every successful recall via `muse_context` / `get_context`.
|
|
230
|
+
- `staleness_policy` gains a `decay_curve` field: `halflife_days * access_multiplier`.
|
|
231
|
+
- Memories used โฅ2ร in a session get +50% longevity extension.
|
|
232
|
+
- Existing tests in `test/staleness.test.ts` continue to pass; new test `test/retention.test.ts` covers the access-weighted decay.
|
|
233
|
+
- **Tests to extend**: `test/staleness.test.ts`, `test/retention.test.ts` (new).
|
|
234
|
+
|
|
235
|
+
**A16 โ Git-branch-aware memory (score 15)**
|
|
236
|
+
- **Why**: Memoir's explicit articulation of the "context contamination" problem (applying experimental-refactor memory to a stable hotfix) is a production-grade concern Muse doesn't address. With branch-aware memory, a developer can `memory branch feature/auth-v2` and isolate the experiment, then `memory checkout main` to restore the stable view.
|
|
237
|
+
- **Acceptance criteria**:
|
|
238
|
+
- `memory branch <name>`: creates a snapshot of active `.memory/` YAML + a scoped `~/.memory/<branch>` view.
|
|
239
|
+
- `memory checkout <branch>`: swaps to that branch's memory scope โ changes the `CURRENT_MD_SCOPE` in `CURRENT.md` and re-injects context.
|
|
240
|
+
- `memory blame <id>`: returns who wrote the last update to a memory, sourced from git log of the YAML file.
|
|
241
|
+
- Idempotency: `memory branch` on an existing branch is a no-op.
|
|
242
|
+
- **Tests to extend**: `test/branch.test.ts` (new), extending `test/current.test.ts` for scope switching.
|
|
243
|
+
|
|
244
|
+
**A18 โ Category-based half-life decay (score 20)**
|
|
245
|
+
- **Why**: Muse's current `staleness_policy` is a simple TTL. Engram's insight is that decay should be *category-aware* (a `fix` has a different half-life than an `adr`) and *usage-reinforced* (Ebbinghaus). This is the single highest-leverage compounding upgrade.
|
|
246
|
+
- **Acceptance criteria**:
|
|
247
|
+
- `staleness_policy` schema gains `half_life_days` (number) and `memory_type` (enum).
|
|
248
|
+
- Default half-lives: `fix` = 60d, `adr` = 365d, `anti_pattern` = 0 (permanent), `observation` = 7d.
|
|
249
|
+
- On recall, `decay_score = 0.5 ^ (days_since_last_use / half_life_days)`; memory is "stale" when `decay_score < 0.25`.
|
|
250
|
+
- Access doubles the effective half-life (Ebbinghaus reinforcement).
|
|
251
|
+
- **Tests to extend**: `test/staleness.test.ts` (extend), `test/retention.test.ts` (new).
|
|
252
|
+
|
|
253
|
+
---
|
|
254
|
+
|
|
255
|
+
## 6. Search Engine Upgrade Path
|
|
256
|
+
|
|
257
|
+
Based on the cross-system analysis, Muse's search engine (SQLite FTS5 BM25 + 11-dimension ranking) should evolve in three phases:
|
|
258
|
+
|
|
259
|
+
### Phase 1: Query Logging & Median Publishing (A22, Q4 2026)
|
|
260
|
+
**Goal**: Measure where the search budget is spent.
|
|
261
|
+
- Add `memory benchmark --median` to publish per-store per-query-type medians.
|
|
262
|
+
- Log query type + latency to `.memory/observations.jsonl` with `query_type` tag.
|
|
263
|
+
- Surface in Observability Studio as a "Search Heatmap" panel.
|
|
264
|
+
**Impact**: 2 users, 10% faster iterative tuning.
|
|
265
|
+
|
|
266
|
+
### Phase 2: Access-Weighted Ranking Boost (A15 + existing utility ROI)
|
|
267
|
+
**Goal**: Frequently-used memories rank higher *without* LLM.
|
|
268
|
+
- Add `access_frequency` to the 11-dimension ranking engine (new dimension #12).
|
|
269
|
+
- Weight: `access_frequency * 0.10` (same order as `bm25 +0.3`).
|
|
270
|
+
- Update on every `muse_context` call.
|
|
271
|
+
**Impact**: 4 users, 15% relevance improvement on LongMemEval-S-style tasks.
|
|
272
|
+
|
|
273
|
+
### Phase 3: Semantic-Path Resolution (A21 + A20)
|
|
274
|
+
**Goal**: Let agents address memories by path, not UUID; return abstracts before full content.
|
|
275
|
+
- `muse_get "auth.session.jwt-expiry"` resolves the `mem_path`.
|
|
276
|
+
- `muse_context --include-abstract`: returns `[[abstract]] {{ ... full ... }}` for each candidate.
|
|
277
|
+
**Impact**: 3 users, 20% token budget reduction on large stores.
|
|
278
|
+
|
|
279
|
+
### Phase 4: Scoped + Progressive Retrieval (A20 + graph walk)
|
|
280
|
+
**Goal**: Combine OpenViking's directory-scoped search with Vestige's causal_walk.
|
|
281
|
+
- `/api/graph` route (currently absent โ bench-graph baseline F3 confirms) returns only fields the canvas needs.
|
|
282
|
+
- `muse_context --scope <subtree>`: RRF-fuse BM25 + graph walk within the subtree.
|
|
283
|
+
**Impact**: 2 users, sub-linear scaling at 10k memories.
|
|
284
|
+
|
|
285
|
+
**Do NOT adopt**: Dense vectors (A12 from September) โ every system requiring embeddings needs an API key or local model, which breaks Muse's zero-LLM, keyless promise. Re-evaluate only if a zero-cost, zero-API-key local embedding becomes available.
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
|
|
289
|
+
## 7. Memory Data Storage Architecture Recommendations
|
|
290
|
+
|
|
291
|
+
### 7.1 Current State (October 2026)
|
|
292
|
+
|
|
293
|
+
| Layer | Format | Purpose | Status |
|
|
294
|
+
|---|---|---|---|
|
|
295
|
+
| L0 | In-process hot cache | Sub-50ยตs entry lookup | โ
Shipped |
|
|
296
|
+
| L1 | SQLite query cache | O(1) cached query results, mtime-synced | โ
Shipped |
|
|
297
|
+
| L2 | SQLite FTS5 virtual tables | BM25 search + 11-dim ranking | โ
Shipped |
|
|
298
|
+
| L3 | YAML mirrors (`.memory/*.yaml`) | Human-reviewable, git-trackable | โ
Shipped |
|
|
299
|
+
| L4 | `audit.jsonl` | Append-only event audit | โ
Shipped |
|
|
300
|
+
|
|
301
|
+
### 7.2 Recommended Evolution
|
|
302
|
+
|
|
303
|
+
```
|
|
304
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
305
|
+
โ L0: Hot Cache (in-process, sub-50ยตs) โ
|
|
306
|
+
โ โ add: per-key access counters (for A15/A19) โ
|
|
307
|
+
โโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
308
|
+
โผ
|
|
309
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
310
|
+
โ L1: SQLite WAL (FTS5 BM25 + metadata index) โ
|
|
311
|
+
โ โ evolve staleness_policy to half-life curves (A18) โ
|
|
312
|
+
โ โ add mem_path column (A21) โ
|
|
313
|
+
โ โ add last_accessed_at column (A15) โ
|
|
314
|
+
โโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
315
|
+
โผ
|
|
316
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
317
|
+
โ L2: YAML Mirrors (git-blamable, branch-aware) โ
|
|
318
|
+
โ โ add attribution metadata (A16 blame) โ
|
|
319
|
+
โ โ branch-scoped overlays (A16 checkout) โ
|
|
320
|
+
โโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
321
|
+
โผ
|
|
322
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
323
|
+
โ L3: Audit Log (hash-chained append-only, signed) โ
|
|
324
|
+
โ โ adopt Vestige-style hash-chaining for tamper audit โ
|
|
325
|
+
โ โ per-entry receipts (like Vestige's eff- receipts) โ
|
|
326
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
### 7.3 Storage Format Recommendations
|
|
330
|
+
|
|
331
|
+
| Component | Current | Recommended | Justification |
|
|
332
|
+
|---|---|---|---|
|
|
333
|
+
| Primary store | SQLite + YAML dual | Keep both | YAML is the human-auditability advantage; SQLite is the query speed advantage. Don't collapse to a single file (Memoir's `.mv2`, Vestige's Strata) โ the dual persistence is a feature, not a bug. |
|
|
334
|
+
| Memory addressing | UUID (`id`) | Add `mem_path` (dotted namespace) | Memoir's semantic paths improve recall by human-readable addressing while keeping UUID for compatibility. |
|
|
335
|
+
| Sync transport | `SyncPacket` (sealed) | Add `branch` field | Enables `memory branch` + cross-machine sync of branch-scoped memory. |
|
|
336
|
+
| Audit trail | `audit.jsonl` | Append a SHA-256 chain hash per entry | Vestige's hash-chained log lets any agent verify the store hasn't been tampered with. Zero dependencies. |
|
|
337
|
+
| Staleness policy | TTL per type | Half-life curve + access reinforcement | Engram's category-based half-life + Ebbinghaus makes decay a feature, not a bug. |
|
|
338
|
+
|
|
339
|
+
### 7.4 Migration Path (non-breaking)
|
|
340
|
+
|
|
341
|
+
1. **v2.3.2**: Add `mem_path`, `last_accessed_at`, `access_count` columns to SQLite; backfill from existing `id`/`tags`/`utility_roi`. Add `half_life_days` to `staleness_policy`. Zero user-facing change.
|
|
342
|
+
2. **v2.4.0**: Enable access-weighted retention by default. Add `memory branch`/`checkout`/`blame` CLI verbs. Add `muse_get <path>` resolution.
|
|
343
|
+
3. **v2.5.0**: Adopt hash-chained audit log. Add `muse_context --include-abstract`. Ship `memory benchmark --median`.
|
|
344
|
+
|
|
345
|
+
---
|
|
346
|
+
|
|
347
|
+
## 8. Production-Readiness & Monetization Plan
|
|
348
|
+
|
|
349
|
+
### 8.1 Monetization Patterns Observed
|
|
350
|
+
|
|
351
|
+
| System | Model | Revenue Levers |
|
|
352
|
+
|---|---|---|
|
|
353
|
+
| NeuraKeep | Local-first + hosted plans | Hosted cloud for teams; audit features as paid tier; SSO integration |
|
|
354
|
+
| ai-memory | Open-source + auth server | Team sharing via auth server; per-user attribution as enterprise feature |
|
|
355
|
+
| Engram | Open-source + cloud dashboard | Cloud dashboard + Obsidian export; emotional bus as premium |
|
|
356
|
+
| BrainCTL | Open-source + Solana marketplace | On-chain memory trading (experimental); signed exports as premium |
|
|
357
|
+
|
|
358
|
+
### 8.2 Muse's Monetization Strategy (recommended)
|
|
359
|
+
|
|
360
|
+
Muse's unique value is **verified, code-grounded recall that never serves stale truth**. This is the differentiator to monetize โ not access to the engine (which stays local-first and free), but **team-scale verification and collaboration**.
|
|
361
|
+
|
|
362
|
+
| Tier | Features | Revenue Model |
|
|
363
|
+
|---|---|---|
|
|
364
|
+
| **Solo (Free, forever)** | Local-first, zero-LLM, all current features. | $0 |
|
|
365
|
+
| **Team (SaaS)** | Shared memory vault, cross-agent handoffs, per-user attribution, `memory branch` workspace, team audit log with git-blame. | $9/user/mo (Stripe) |
|
|
366
|
+
| **Enterprise (SaaS)** | SSO (SAML/OIDC), air-gapped deployment, compliance export (SOC 2, GDPR), priority drift-engine support. | $29/user/mo (quote) |
|
|
367
|
+
| **Pro Plugin (One-time)** | AI-powered consolidation (opt-in, local LLM only), `memory dream` overnight synthesis, Obsidian/Optimaze graph export. | $49 one-time (Gumroad/Polar) |
|
|
368
|
+
|
|
369
|
+
### 8.3 Production-Readiness Checklist
|
|
370
|
+
|
|
371
|
+
| Area | Current | Target (v2.4) | Owner |
|
|
372
|
+
|---|---|---|---|
|
|
373
|
+
| **CLI maturity** | 527 tests pass | 600+ tests, zero-warning `tsc --noEmit` | Engineering |
|
|
374
|
+
| **Build pipeline** | `bun run build` | CI: build + test + typecheck + bench on every PR | Engineering |
|
|
375
|
+
| **Website** | AIDA copy, 4-page build, WCAG AA | Add comparison table + benchmarks + changelog | Marketing |
|
|
376
|
+
| **Docs** | `/docs` page | Full API reference + migration guide + plugin SDK | Docs |
|
|
377
|
+
| **Plugin SDK** | 69 MCP tools | `memory plugin init` scaffold for agent devs | Engineering |
|
|
378
|
+
| **Pricing page** | None | Tier table with clear free/team/enterprise value props | Marketing |
|
|
379
|
+
| **Analytics** | None | Self-hostable Plausible (no GA, local-first) | Engineering |
|
|
380
|
+
|
|
381
|
+
### 8.4 Roadmap Milestones for Production (R23โR26)
|
|
382
|
+
|
|
383
|
+
| Milestone | Scope | Target Date |
|
|
384
|
+
|---|---|---|
|
|
385
|
+
| **R23: Versioned Memory + Access-Weighted Retention** | `mem_path`, `last_accessed_at`, `half_life_days`, `memory branch`/`checkout`/`blame` | Nov 2026 |
|
|
386
|
+
| **R24: Agent Plugin Registry** | `memory plugin install <agent>` for 20+ agents (Claude Code, Cursor, Codex, etc.), MCP resource push (when hosts support it) | Dec 2026 |
|
|
387
|
+
| **R25: Progressive Disclosure + Scoped Retrieval** | `muse_context --include-abstract`, `muse_context --scope <subtree>`, `/api/graph` fix (bench-graph F1โF7) | Jan 2027 |
|
|
388
|
+
| **R26: Pro Plugin + Monetization Stack** | One-time `memory dream` synthesis plugin, Team SaaS prototype, pricing page, self-host Plausible analytics | Feb 2027 |
|
|
389
|
+
|
|
390
|
+
### 8.5 Competitive Positioning
|
|
391
|
+
|
|
392
|
+
Muse's positioning against the new systems, **without naming competitors** (per project constraint):
|
|
393
|
+
|
|
394
|
+
| Capability | Local-first | Keyless (no API key) | Git-versioned memory | Branch-aware | Hands-free hooks | Zero-LLM default |
|
|
395
|
+
|---|---|---|---|---|---|---|
|
|
396
|
+
| **Muse** | โ | โ | planned (R23) | planned (R23) | โ 3/6 events | โ |
|
|
397
|
+
| **Pattern A** (JIT dual-agent) | โ | โ | โ | โ | partial | โ |
|
|
398
|
+
| **Pattern B** (Git-backed wiki) | โ | โ | โ | โ | โ | โ |
|
|
399
|
+
| **Pattern C** (Semantic paths) | โ | โ | โ | โ | โ | โ |
|
|
400
|
+
|
|
401
|
+
> Muse already ships the strongest foundation (sub-2ms lexical, <50ยตs hot cache, 69 MCP tools, zero daemons). The R23โR26 roadmap closes the remaining gaps in versioned memory and hands-free capture, positioning Muse as the **only** system that is simultaneously local-first, fully keyless, and Git-versioned.
|
|
402
|
+
|
|
403
|
+
---
|
|
404
|
+
|
|
405
|
+
## Appendix A: Evidence Sources
|
|
406
|
+
|
|
407
|
+
1. GAM: https://github.com/VectorSpaceLab/general-agentic-memory ยท arxiv 2511.18423 "General Agentic Memory Via Deep Research"
|
|
408
|
+
2. ai-memory: https://github.com/akitaonrails/ai-memory ยท docs/architecture.md (ARCHITECTURE.md)
|
|
409
|
+
3. Memoir: https://github.com/zhangfengcdt/memoir ยท https://zhangfengcdt.github.io/memoir/
|
|
410
|
+
4. Mnemory: https://github.com/fpytloun/mnemory ยท Reddit r/OpenWebUI plugin announcement
|
|
411
|
+
5. Engram: https://github.com/Gentleman-Programming/engram ยท https://docs.rs/engramai
|
|
412
|
+
6. TencentDB Agent Memory: https://github.com/tencent-ailab-hunter/Agent-Memory ยท TencentAILab-Hunter org
|
|
413
|
+
7. BrainCTL: https://github.com/braindb/brainctl ยท https://www.brainctl.org (fallback)
|
|
414
|
+
8. NeuraKeep: https://neurakeep.com
|
|
415
|
+
9. Kage: https://github.com/kage-core/Kage (from September research)
|
|
416
|
+
10. ai-memory-comparison: https://carsteneu.github.io/ai-memory-comparison/ (86 systems study)
|
|
417
|
+
|
|
418
|
+
---
|
|
419
|
+
|
|
420
|
+
*Next steps*: See ยง5 Scored Adaptation Shortlist. Top priority is A15 (access-weighted retention) โ a pure data-tracking upgrade that leverages Muse's existing utility ROI fields. Secondary priority is A16 (git-branch-aware memory) โ the single biggest production-readiness gap for team use.*
|