Introduction
The Problem
Section titled “The Problem”AI systems today have no coherent memory architecture. They bolt together generic databases — vector stores, knowledge graphs, key-value caches — none designed for how cognition works.
| Solution | What it does | What it lacks |
|---|---|---|
| Vector DBs (Pinecone, Weaviate) | High-dimensional nearest-neighbor | No time awareness, no causality, no self-organization |
| Knowledge Graphs (Neo4j) | Structured relations | Hard to scale dynamically, not adaptive |
| Memory Frameworks (LangChain, LlamaIndex) | Retrieval wrappers | Not true memory — just middleware |
| Mem0 | Memory layer for AI | Wrapper around existing DBs, no cognitive operations |
The Thesis
Section titled “The Thesis”AI needs a purpose-built memory engine with native support for:
- Temporal decay — memories age and fade like human memory
- Semantic consolidation — patterns are extracted, redundancy is compressed
- Conflict resolution — contradictions are detected and resolved conversationally
- Proactive cognition — background processing that gives AI genuine reasons to initiate
- Multi-device replication — local-first CRDT-based sync
All in a single embedded engine — no server, no network hops.
Key Innovation: Relevance-Conditioned Scoring
Section titled “Key Innovation: Relevance-Conditioned Scoring”Traditional retrieval uses additive scoring:
score = w1*similarity + w2*recency + w3*importanceYantrikDB uses multiplicative gating:
gate = sigmoid((similarity - tau) / temperature)score = gate * (w1*decay + w2*recency + w3*importance)If relevance is low, the gate collapses the entire score — no matter how important or recent the memory is. This prevents irrelevant memories from polluting context.
Built With
Section titled “Built With”- Rust — memory safety, zero-cost abstractions, sub-ms reads
- SQLite — single-file storage, battle-tested
- HNSW — approximate nearest neighbor for vector search
- CRDTs — conflict-free replication across devices
- PyO3 — native Python bindings