Persistent memory that tracks relationships, handles knowledge updates, and retrieves context via spreading activation. Not another vector store.
## observe, retrieve, repeat from kizuna_mem import Client mem = Client(tenant_id="user-42") # ingest a fact mem.observe("User switched to Pro plan") # spreading activation retrieval ctx = mem.retrieve("billing info?") # → Pro plan (2m ago), payment method, # upgrade history, related preferences
RAG and vector stores treat memories as isolated chunks of text ranked by cosine similarity. They can't track what changed, what's connected, or what matters right now.
Your agent learns preferences, context, history — then forgets it all. Users repeat themselves. Trust erodes.
session 1: "I prefer dark mode" session 2: "What theme do you prefer?"
Free tier in January, Pro in March. Vector stores return both ranked by similarity. Without temporal validity, your agent serves outdated facts confidently.
✗ sim=0.94 "free tier" ← stale ✓ sim=0.91 "pro plan" ← current
Vector stores treat each memory as an independent point in embedding space. They can't connect "Sarah works on Alpha" to "Sarah's on vacation" — because those chunks aren't similar, they're related.
vector: "alpha" ↛ sarah ↛ vacation
graph: alpha → sarah → vacation mar 20
"Project Strawberry" (a codename) and "strawberries at the market" are close in embedding space but completely unrelated. Vector search conflates them. Graph memory knows the difference because it tracks what things are, not just what they sound like.
✗ cosine "strawberry" → groceries, recipes, project ✓ graph "strawberry" → entity:project → sprint, team
Three phases mirror how human memory works: immediate capture, pattern recognition, long-term consolidation. Grounded in ACT-R cognitive architecture.
Raw conversations hit the graph immediately. Entities extracted, relationships mapped, timestamps recorded. WAL ensures zero data loss.
input: "User switched to Pro plan" creates: node user-42 edge has_plan node pro_plan t_event 2024-03-14T10:32:00Z
Deduplicates facts, resolves entities, supersedes stale data. Old facts aren't deleted — they're temporally invalidated.
free_tier → invalidated pro_plan → current entity resolution: "John" + "John Smith" → entity:john_smith
Builds community clusters, extracts stable user traits, produces multi-level hierarchy. Episodes → facts → entities → communities → profile.
profile: plan: pro (since mar) theme: dark (stable) communities: billing ← plan / payment / invoices prefs ← theme / notifications / lang
When you query Kizuna-Mem, it doesn't just find similar text. It finds anchor nodes in the graph, then propagates activation energy outward through edges — like ripples in water.
Vector search asks: "what text looks like this query?" Spreading activation asks: "what in the graph is connected to what this query is about?"
query: "billing info?" payment_method ╱ 0.61 ● billing ━━━▸ ● pro_plan 1.0 0.82 0.82 ╲ ╲ upgrade_history ╲ 0.48 ╲ ╲ free_tier invoices 0.31 ✗ stale 0.29
query: "billing info?" activation path: billing ━━0.82━▸ pro_plan ┣━0.61━▸ payment_method ┣━0.48━▸ upgrade_history ┗━0.29━▸ invoices billing ━━0.31━▸ free_tier (superseded) returned: 4 active nodes, 1 filtered fan decay applied at pro_plan (4 edges)
Returns chunks ranked by cosine distance. No relationships. No temporal filtering. "Strawberry" matches groceries and projects alike.
Propagates energy through typed edges. Fan decay prevents popular nodes dominating. Recency + frequency boost via ACT-R base-level.
Event time (when it happened) and ingestion time (when the system learned it). Answer ‘what did we know on Tuesday?’ accurately.
Every API call scoped by tenant_id. Complete memory isolation between users. Built-in, not bolted on.
Write-ahead log ensures every observation persists before acknowledgement. Crash, restart, lose nothing.
The Reflector automatically merges references to the same entity. Aliases, nicknames, partial mentions — resolved into a single graph node.
The Consolidator groups related entities into communities — billing, preferences, projects — with generated summaries for fast context loading.
Stable patterns extracted automatically: preferences, habits, communication style. Your agent gets smarter the longer it knows someone.
Thin HTTP client wrappers. Install, connect, observe, retrieve. Same API shape in every language.
Latency numbers are measured from the test suite. LongMemEval-S and LoCoMo scores are targets — academic evaluation runs are planned for Phase 2.
| System | LongMemEval-S | LoCoMo | P95 Latency | Temporal | Graph |
|---|---|---|---|---|---|
| Kizuna-Mem | ≥85% (target) | ≥88% (target) | 31ms | ✓ | ✓ |
| EverMemOS | 83.0% | 93.1% | — | ✓ | ✗ |
| Cortex / HydraDB | 90.2% | — | — | ✗ | ✓ |
| Zep / Graphiti | 71.2% | — | — | ✗ | ✓ |
| TiMem | 76.9% | — | — | ✓ | ✗ |
Two processes, each playing to their language's strengths. Shared-memory IPC with CRC32 checksums. No GC pauses on the hot path.
Open source. Early access.
git clone https://github.com/kizuna/kizuna-mem