Compare commits
1 Commits
step35/595
...
step35/419
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4426cfcbfa |
204
docs/memory-provider-overlap-analysis-2026-04-29.md
Normal file
204
docs/memory-provider-overlap-analysis-2026-04-29.md
Normal file
@@ -0,0 +1,204 @@
|
|||||||
|
# Hermes Memory Providers vs MemPalace — Overlap Analysis & Vendor Lock-in Report
|
||||||
|
|
||||||
|
**Issue:** [#419](https://forge.alexanderwhitestone.com/Timmy_Foundation/timmy-config/issues/419)
|
||||||
|
**Created:** 2026-04-29
|
||||||
|
**Status:** Draft
|
||||||
|
**Author:** STEP35 Research Spike
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Executive Summary
|
||||||
|
|
||||||
|
Hermes Agent ships with **8 external memory provider plugins**. We already have a custom **MemPalace** system (via `sovereign_store.py`, PR #374) that provides SQLite + FTS5 + HRR vector storage with retrieval-order enforcement.
|
||||||
|
|
||||||
|
**Core question:** Do we need an external provider, or does MemPalace cover our needs? Are we creating confusion by running multiple memory systems?
|
||||||
|
|
||||||
|
**Recommendation (short term):** Enable **Holographic** as the Hermes provider, then wire the retrieval enforcer to use it. Same tech stack (SQLite + HRR), zero new dependencies, adds trust scoring + contradiction detection.
|
||||||
|
|
||||||
|
**Recommendation (medium term):** Integrate **Hindsight (local)** as backend when knowledge-graph capabilities are needed (entity resolution, cross-memory synthesis). MIT license, Docker self-hosted, Ollama-compatible.
|
||||||
|
|
||||||
|
**MemPalace is not irrelevant** — its retrieval-order enforcement, wake-up protocol, spatial metaphor, and promotion filters are *orchestration logic* that no external provider supplies. The providers are *storage backends*. MemPalace is the *discipline layer* on top.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Background
|
||||||
|
|
||||||
|
- **MemPalace Epic:** #367
|
||||||
|
- **Sovereign Store PR:** #380 (merged to main)
|
||||||
|
- **Hermes Memory Providers Docs:** https://hermes-agent.nousresearch.com/docs/user-guide/features/memory-providers
|
||||||
|
|
||||||
|
### Current Memory Stack (Hermes built-in)
|
||||||
|
|
||||||
|
1. `MEMORY.md` — flat file, always active
|
||||||
|
2. `USER.md` — user profile, always active
|
||||||
|
3. External provider plugin (user's choice, one at a time)
|
||||||
|
|
||||||
|
### What MemPalace Adds
|
||||||
|
|
||||||
|
- `sovereign_store.py`: SQLite + FTS5 + HRR vectors
|
||||||
|
- `retrieval_enforcer.py`: L0→L1→L2→L3→L4 retrieval order
|
||||||
|
- `wakeup.py`: Palace-first boot (identity + top rooms in 238 tokens)
|
||||||
|
- `promotion.py`: Quality gates before writing to durable memory
|
||||||
|
- `scratchpad.py`: Ephemeral session context
|
||||||
|
- `identity.txt` + `mempalace.yaml`: Persistent identity + spatial rooms
|
||||||
|
- Nightly re-mine cron (Bezalel pattern)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## The 8 Hermes Memory Providers — Vendor Lock-in Assessment
|
||||||
|
|
||||||
|
### Zero Lock-in (fully self-hosted, open source)
|
||||||
|
|
||||||
|
| Provider | License | Storage | Cost | Dependencies | Unique Capability |
|
||||||
|
|----------|---------|---------|------|--------------|-------------------|
|
||||||
|
| **Holographic** | Ships w/ Hermes (MIT) | Local SQLite | Free | None | HRR algebra, trust scoring, contradiction detection |
|
||||||
|
| **Hindsight (local)** | MIT | Embedded PostgreSQL (Docker) | Free | Docker + LLM (Ollama ok) | Knowledge graph, 4-network memory, `reflect` synthesis |
|
||||||
|
| **OpenViking** | AGPL-3.0 | Self-hosted server | Free | `openviking` + server | Filesystem hierarchy, tiered retrieval (L0/L1/L2) |
|
||||||
|
|
||||||
|
### Partial Lock-in (OSS exists but cloud is default)
|
||||||
|
|
||||||
|
| Provider | License | Storage | Cost | Risk |
|
||||||
|
|----------|---------|---------|------|------|
|
||||||
|
| **Mem0 (self-hosted)** | OSS | Docker (3 containers) | Free | Cloud/OSS feature parity may drift |
|
||||||
|
| **Honcho** | OSS option | Cloud or self-hosted | Free/Paid | Self-host path less documented |
|
||||||
|
| **ByteRover (local)** | Unclear | Local default | Free | CLI not clearly OSS |
|
||||||
|
|
||||||
|
### Full Lock-in (cloud-only, proprietary)
|
||||||
|
|
||||||
|
| Provider | Storage | Cost | Risk |
|
||||||
|
|----------|---------|------|------|
|
||||||
|
| **Supermemory** | Cloud only | Paid | High — no self-host, data on their servers |
|
||||||
|
| **RetainDB** | Cloud only | $20/mo | High — proprietary, no exit path |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Overlap Analysis: MemPalace vs External Providers
|
||||||
|
|
||||||
|
### What MemPalace Already Does (merged in main)
|
||||||
|
|
||||||
|
- ✅ SQLite + FTS5 + HRR vectors (same tech as Holographic)
|
||||||
|
- ✅ L0→L1→L2→L3→L4 retrieval order enforcement
|
||||||
|
- ✅ Palace-first wake-up (identity + top rooms, 238 tokens)
|
||||||
|
- ✅ Quality gates before writing (`promotion.py`)
|
||||||
|
- ✅ Ephemeral session scratchpad
|
||||||
|
- ✅ Persistent agent identity + spatial room metaphor
|
||||||
|
- ✅ Nightly re-mine cron
|
||||||
|
|
||||||
|
### What External Providers Add That MemPalace Doesn't
|
||||||
|
|
||||||
|
| Capability | Which Provider | MemPalace Gap |
|
||||||
|
|------------|----------------|---------------|
|
||||||
|
| Knowledge graph with entity resolution | Hindsight | Stores flat facts, no entity linking |
|
||||||
|
| Cross-memory synthesis (`reflect`) | Hindsight | No "what do I believe about X across all memories?" |
|
||||||
|
| Trust scoring with feedback loops | Holographic | `sovereign_store.py` has no confidence/trust mechanism |
|
||||||
|
| Contradiction detection | Holographic | MemPalace can store conflicting facts without noticing |
|
||||||
|
| Tiered context loading (100 tok → 2k → full) | OpenViking | MemPalace loads full content, no progressive disclosure |
|
||||||
|
| Server-side LLM fact extraction | Mem0, Hindsight | MemPalace extraction is heuristic (regex/length), not LLM-powered |
|
||||||
|
| Cross-agent memory federation | Honcho | MP-6 (cross-agent federation) was designed but never implemented |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## The Confusion Risk
|
||||||
|
|
||||||
|
Hermes already runs **3 memory layers simultaneously**:
|
||||||
|
|
||||||
|
1. **Built-in:** `MEMORY.md` + `USER.md` (always active)
|
||||||
|
2. **External provider:** whichever plugin is configured (one at a time)
|
||||||
|
3. **MemPalace:** our custom `sovereign_store.py` + retrieval enforcer
|
||||||
|
|
||||||
|
If we enable an external provider **alongside** MemPalace, agents will have:
|
||||||
|
|
||||||
|
- `MEMORY.md` (built-in flat file)
|
||||||
|
- `USER.md` (built-in user profile)
|
||||||
|
- `sovereign_store.py` (our SQLite palace)
|
||||||
|
- External provider tools (e.g., `hindsight_retain`, `hindsight_recall`)
|
||||||
|
|
||||||
|
**This is 4 places to store/retrieve memories.** An agent won't know which source of truth to trust.
|
||||||
|
|
||||||
|
The retrieval enforcer checks the palace first, but it doesn't know about the external provider. The external provider tools bypass the enforcer entirely.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Decision Options
|
||||||
|
|
||||||
|
### Option A: MemPalace Only (status quo)
|
||||||
|
|
||||||
|
- Keep `sovereign_store.py` as the sole external memory
|
||||||
|
- Accept the gaps (no knowledge graph, no trust scoring, no entity resolution)
|
||||||
|
- Zero dependencies, zero lock-in, fully sovereign
|
||||||
|
- **Risk:** We miss real capabilities that would make agents smarter
|
||||||
|
|
||||||
|
### Option B: Replace MemPalace with Holographic
|
||||||
|
|
||||||
|
- Holographic uses the exact same tech (SQLite + FTS5 + HRR) but is more mature
|
||||||
|
- Adds trust scoring + contradiction detection we'd have to build ourselves
|
||||||
|
- Ships with Hermes — zero extra dependencies
|
||||||
|
- **Risk:** We lose the spatial metaphor (rooms/drawers) and retrieval-order enforcement
|
||||||
|
|
||||||
|
### Option C: Replace MemPalace with Hindsight (local)
|
||||||
|
|
||||||
|
- Most capable option: knowledge graph, entity resolution, reflect synthesis
|
||||||
|
- MIT licensed, Docker self-hosted, Ollama for fully offline
|
||||||
|
- 91.4% on LongMemEval benchmark (best-in-class for OSS)
|
||||||
|
- **Risk:** Adds Docker + LLM dependency for fact extraction. More moving parts.
|
||||||
|
|
||||||
|
### Option D: MemPalace as orchestration layer, Hindsight as backend
|
||||||
|
|
||||||
|
- Keep retrieval enforcer + wake-up protocol + spatial metaphor
|
||||||
|
- Replace `sovereign_store.py` SQLite backend with Hindsight API calls
|
||||||
|
- Best of both: our retrieval discipline + their knowledge graph
|
||||||
|
- **Risk:** Integration complexity. Two codebases to maintain.
|
||||||
|
|
||||||
|
### Option E: MemPalace + Holographic as Hermes provider *(recommended short-term)*
|
||||||
|
|
||||||
|
- Enable Holographic as the Hermes external provider (one config line)
|
||||||
|
- Keep MemPalace retrieval enforcer but wire it to query Holographic's fact_store
|
||||||
|
- Gets us trust scoring + contradiction detection with minimal change
|
||||||
|
- Same tech stack (SQLite), zero new dependencies
|
||||||
|
- **Risk:** Still two systems, but they speak the same storage language
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Recommendation
|
||||||
|
|
||||||
|
### Short Term → Option E
|
||||||
|
|
||||||
|
Enable Holographic as the Hermes provider and wire the retrieval enforcer to use it.
|
||||||
|
|
||||||
|
- Same storage technology (SQLite + FTS5 + HRR) — no migration pain
|
||||||
|
- Adds trust scoring and contradiction detection "for free"
|
||||||
|
- Zero new dependencies (Holographic ships with Hermes)
|
||||||
|
- Minimal integration work
|
||||||
|
|
||||||
|
### Medium Term → Option D
|
||||||
|
|
||||||
|
When knowledge-graph capabilities become blocking (entity resolution, cross-memory synthesis), migrate the backend to Hindsight local.
|
||||||
|
|
||||||
|
- MIT license, fully self-hostable
|
||||||
|
- Ollama-compatible LLM for fact extraction
|
||||||
|
- Best-in-class LongMemEval performance (91.4%)
|
||||||
|
- More moving parts, but tolerable for the capability gain
|
||||||
|
|
||||||
|
### Why MemPalace Isn't Obsolete
|
||||||
|
|
||||||
|
MemPalace's **orchestration layer** (retrieval enforcer, wake-up protocol, promotion filters, spatial metaphor) is value that no external provider supplies. The providers are *storage backends*. The fix is to **choose a backend that matches our discipline layer**, not discard the discipline.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Action Items
|
||||||
|
|
||||||
|
- [ ] Review recommendation with Timmy
|
||||||
|
- [ ] Check Holographic integration test suite
|
||||||
|
- [ ] Prototype retrieval-enforcer → Holographic fact_store wiring
|
||||||
|
- [ ] Evaluate Hindsight local install overhead (Docker + Ollama)
|
||||||
|
- [ ] Update `docs/MEMORY_ARCHITECTURE.md` to reflect chosen path
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## References
|
||||||
|
|
||||||
|
- MemPalace epic: #367
|
||||||
|
- Sovereign store PR: #380
|
||||||
|
- Hermes memory providers: https://hermes-agent.nousresearch.com/docs/user-guide/features/memory-providers
|
||||||
|
- Hindsight (MIT, self-hosted): https://github.com/vectorize-io/hindsight
|
||||||
|
- OpenViking (AGPL, self-hosted): https://github.com/volcengine/OpenViking
|
||||||
Reference in New Issue
Block a user