MemPalace: palace architecture, AAAK compression, knowledge graph

The memory system:
- Palace structure: Wings (people/projects) → Rooms (topics) → Closets (AAAK compressed) → Drawers (verbatim transcripts)
- Halls connect related rooms within a wing
- Tunnels cross-reference rooms across wings
- AAAK: 30x lossless compression dialect for AI agents
- Knowledge graph: temporal entity-relationship triples (SQLite)
- Palace graph: room-based navigation with tunnel detection
- MCP server: 19 tools — search, graph traversal, agent diary, AAAK auto-teach
- Onboarding: guided setup generates wing config + AAAK entity registry
- Contradiction detection: catches wrong pronouns, names, ages
- Auto-save hooks for Claude Code

96.6% Recall@5 on LongMemEval — highest zero-API score published.
100% with optional Haiku rerank (500/500).
Local. Free. No API key required.
This commit is contained in:
Milla Jovovich
2026-04-04 18:16:04 -07:00
committed by MSL
commit 068dbd9a7b
39 changed files with 9210 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
#!/usr/bin/env python3
"""Example: mine a project folder into the palace."""
import sys
project_dir = sys.argv[1] if len(sys.argv) > 1 else "~/projects/my_app"
print("Step 1: Initialize rooms from folder structure")
print(f" mempalace init {project_dir}")
print("\nStep 2: Mine everything")
print(f" mempalace mine {project_dir}")
print("\nStep 3: Search")
print(" mempalace search 'why did we choose this approach'")