Every other memory layer just grows. Smriti consolidates — like your brain does during sleep. Frequently-used knowledge hardens into durable schemas. Stale facts get flagged. Every claim cites its source. Every write is hash-chained. Your agents remember what matters and forget what doesn't. Zero cloud. Zero data leaks.
Built for production AI agents · Peer-reviewed design (6 arXiv papers) · Built in Rust · CLS-inspired memory consolidation
Plays nicely with your stack
What is Smriti?
Smriti (Sanskrit: memory) is a self-hosted knowledge graph and integrity layer built in Rust. Notes connect through wiki-links to form a traversable graph. Agents store memories with typed relationships, temporal metadata, and conflict-aware updates. Every claim cites its source. Every write is hash-chained. Ships with a web dashboard, HTTP + stdio MCP transport, and an interactive CLI — all in a single binary, one SQLite file, zero cloud.
Memory Consolidation
Every other AI memory layer grows unboundedly — Mem0, Zep, Letta, LangMem. Eventually they drown in noise. Smriti is the first agent memory modeled on how the human brain actually works: hippocampal episodes replay during rest, and the neocortex extracts durable schemas. It's called Complementary Learning Systems (McClelland 1995). We implemented it.
Every read, search hit, and graph traversal is logged as a replay signal. Notes that get used frequently, from diverse contexts, and with high structural centrality score higher — just like memories your brain replays during sleep.
When enough related episodes cluster above the consolidation threshold, Smriti promotes them into a durable schema — a compressed abstraction with full lineage. The episodes stay queryable. The schema becomes the canonical reference.
Low-score notes are flagged for review — never deleted. Under the Aggressive policy, flagged notes past the grace period are archived into an immutable audit trail. Your graph gets cleaner. Your compliance team stays happy.
Conservative: flag only, never auto-promote — safe for healthcare. Standard: promote clusters, flag low-scorers. Aggressive: auto-archive stale nodes past the grace period. You choose the risk posture.
# Dry-run consolidation pass — see what would change $ smriti consolidate --dry-run Scanned 847 episodes Promotion-eligible: 12 (score > 0.80) Flagged for review: 34 (score < 0.15) Archive candidates: 0 (Conservative policy) # Explain why a specific note scored the way it did $ smriti consolidate --explain note_a7f3c access_count: 142 (component: 0.614) degree: 23 edges (component: 0.197) context_diversity: 0.72 (component: 0.216) recency: 3.2 days (component: 0.091) Score: 0.927 — schema-eligible
Core Features
Wiki-links auto-create typed edges. Traverse causal, semantic, and temporal layers. BFS in 235 nanoseconds.
FTS5 keywords + sqlite-vec embeddings fused with reciprocal rank fusion. Beats pure vector on multi-hop tasks.
Key-value with namespaces, TTL, and AGM belief revision. Four conflict policies: Overwrite, Reject, VersionAndKeep, Invalidate.
18 tools over JSON-RPC via stdio and HTTP. Plug into Claude, Cursor, or any MCP agent. Includes semantic search, graph path queries, consolidation, and integrity tools.
valid_from and valid_until on every link. Know when relationships were true, not just when recorded.
Rust + SQLite. No Postgres. No Neo4j. No Redis. No Docker required. Everything in one .db file.
Built-in React SPA with D3 graph visualization, full-text search, note editor with CodeMirror, and KV store browser. Embedded in the binary.
Both transports share the same dispatcher. POST /mcp for HTTP agents, stdio for Claude Desktop. Localhost-only CORS for security.
smriti new — guided note creation with fuzzy search, relationship type picker, and live preview. Shell completions for bash, zsh, fish.
| Tool | Category | What it does |
|---|---|---|
notes_create | Knowledge Graph | Create a wiki-linked note. [[wiki-link]] syntax auto-creates typed graph edges. |
notes_read | Knowledge Graph | Read by ID or title. Instruments access for consolidation scoring. |
notes_search | Knowledge Graph | FTS5 full-text search. Search hits feed the CLS replay signal. |
notes_list | Knowledge Graph | List notes with tag filter and sort options. |
notes_graph | Knowledge Graph | BFS traversal with typed layer filter. Shortest path queries. Graph traversals log as replay signal. |
notes_search_semantic | Knowledge Graph | Semantic search via sqlite-vec. Optional hybrid FTS5+cosine with reciprocal rank fusion. |
notes_consolidate | Consolidation | CLS-inspired consolidation pass. Scores every episode, flags/archives low-value notes, surfaces promotion candidates. Never deletes. |
memory_store | Agent Memory | KV store with namespace, TTL, and AGM belief revision. Four conflict policies. |
memory_retrieve | Agent Memory | Retrieve by agent_id + namespace + key. |
memory_list | Agent Memory | List all memory entries for an agent, with optional namespace filter. |
memory_history | Agent Memory | Full belief revision history. See how preferences evolved, not just current value. |
wiki_transaction_submit | Integrity | Atomic multi-write with enforced provenance. Every claim must cite a source or be rejected. |
wiki_transaction_commit | Integrity | Commit a reviewed pending transaction. |
wiki_transaction_reject | Integrity | Reject with reason. Full rollback, no partial state. |
wiki_transaction_list_pending | Integrity | Review inbox: pending transactions awaiting human sign-off. |
wiki_verify | Integrity | Full integrity sweep: referential, provenance, hash chain, orphans. Never mutates. |
contradictions_detect | Integrity | Confidence-weighted contradiction scan. Candidates surface for human review. |
contradictions_list | Integrity | Open contradiction inbox with scores and source evidence. |
Tool descriptions are optimized for AI discoverability — Claude, Cursor, and any MCP-compatible agent auto-discovers when to invoke each tool.
Integrity Layer (v0.2)
Every feature traces to a peer-reviewed paper. This is not a bolt-on — it is the core architectural difference between Smriti and every other knowledge tool.
Every link records valid_from and valid_until. Know what the rules said when a decision was made — not what they say now. Critical for protocol amendments, policy changes, and compliance audits.
21 CFR 312.32 · SOX temporal accuracy · arXiv:2501.13956
Every claim must cite a source. FACTUM overlap scoring measures how closely each claim matches its cited source. Claims with weak grounding are flagged. AI-generated content without attribution is rejected at write time.
ICH E6(R3) data integrity · arXiv:2601.05866
When new information conflicts with existing knowledge, Smriti surfaces the contradiction with a confidence score. Contradictions land in a human review inbox — never auto-resolved. Prevents silent overwrites that erase correct information.
AGM belief revision · arXiv:2603.17244
Every write appends an event with a SHA-256 hash of the previous event. If any record is tampered with, the chain breaks at the exact point. smriti verify --chain walks the entire history and reports integrity in seconds.
21 CFR Part 11 · SOC 2 audit evidence · eIDAS
| Tool | Category | What it does |
|---|---|---|
wiki_transaction_submit | Integrity | Atomic batch of create/update/link/source ops inside a SQLite SAVEPOINT. Every content write must carry claim_spans or be rejected. |
wiki_transaction_commit | Integrity | Commit a pending transaction after human review. |
wiki_transaction_reject | Integrity | Reject a transaction with a reason. Full rollback, no partial state. |
wiki_transaction_list_pending | Integrity | List all transactions awaiting human review. |
wiki_verify | Audit | Run referential integrity + provenance re-check + hash chain walk. Returns pass/fail. Never mutates. |
contradictions_detect | Audit | Pairwise scan using weighted scoring (semantic · recency · authority). Candidates land in the review inbox. |
contradictions_list | Audit | The review inbox: all open contradictions with confidence scores and source evidence. |
# Full integrity sweep — check every claim, every hash, every link $ smriti verify Referential integrity ............ OK Provenance (47 claims) ........... 46 PASS, 1 FAIL Patient-14-Screening: overlap 0.31 — needs review Event chain (312 events) ......... INTACT Contradictions ................... 1 OPEN Completed in 3.2 seconds # Detect contradictions across recent notes $ smriti detect-contradictions Found 1 candidate (confidence: 0.87) "started aspirin Feb 15" vs "continues aspirin since May 2025" # List pending review inbox $ smriti contradictions 1 open | 0 resolved since last sweep
Use Cases
You spend 20 minutes re-explaining your codebase architecture at the start of every Claude session. Next session — gone.
Smriti stores architectural decisions as linked notes. [[AuthModule]] → [[JWT Strategy]] → [[RefreshTokenFlow]]. Next session, Claude traverses the graph and arrives already knowing your system.
notes_createnotes_graphmemory_storeSite coordinators manage 8+ trials across OneNote, binders, and PDFs. Nothing links. 30%+ of audit findings come from disconnected source documentation.
Protocol amendments tracked bi-temporally. SAE narratives grounded against visit notes with provenance scoring. Pre-monitor integrity sweep in 3.2 seconds. Hash-chained audit trail meets Part 11 technical intent.
wiki_verifycontradictions_detectwiki_transaction_submit11pm. Your advisor texts: “Are you sure about that number in Table 3?” You spend 40 minutes digging through PDFs to find the original source.
Every claim cites its source with a measurable overlap score. supports, refutes, and replicates edges map the evidence landscape. smriti verify checks your entire thesis in seconds.
notes_searchwiki_verifynotes_graphAnalysts build theses on AI-summarized filings. The AI confidently cites a revenue figure that doesn’t exist in the 10-K. The thesis goes to the investment committee.
Every claim must cite a source filing with a provenance score. revised_guidance and contradicts edges detect when new guidance conflicts with prior consensus.
wiki_verifynotes_graphcontradictions_listA project agent runs daily. Monday it learns “client prefers async.” Friday it suggests a sync meeting. New writes silently overwrite old ones.
memory_store with conflict_policy: VersionAndKeep. Old preferences move to memory_history. Query what changed and when — not just the current value.
memory_storememory_historymemory_retrieveObsidian Import
The whole point of Obsidian is the graph. When you import to a vector database, you lose it. Smriti is the first AI memory layer that imports your vault and keeps every link intact.
[[wiki-links]] → preserved# Import your entire vault $ smriti import ~/ObsidianVault --recursive # Imported 3,241 notes # Preserved 18,472 [[wiki-links]] # Graph rebuilt in 2.1s # Claude can now traverse your knowledge graph
“Your Obsidian graph is your most valuable intellectual asset. Now your AI agent can actually use it.”
Performance
Criterion benchmarks on Apple Silicon. Run cargo bench yourself.
| Operation | p50 | Context |
|---|---|---|
| Insert 1 note | 32.5 µs | Includes FTS5 index |
| Insert 100 notes | 2.0 ms | ~20 µs/note |
| Insert 1,000 notes | 23.1 ms | ~23 µs/note |
| FTS5 search (1k) | 331 µs | Keyword match |
| FTS5 search (10k) | 2.86 ms | Sub-linear scaling |
| Graph build (1k) | 216 µs | petgraph DiGraph |
| BFS depth-2 | 235 ns | Cached graph |
| BFS depth-3 | 410 ns | Cached graph |
| KV store (100 keys) | 513 µs | ~5 µs/key |
| KV retrieve (hit) | 2.48 µs | Single lookup |
| KV retrieve (miss) | 2.25 µs | Same speed |
Comparison
| Smriti | Mem0 | Letta | Zep | |
|---|---|---|---|---|
| Self-hosted | Yes | Cloud only | Yes | Partial |
| Knowledge graph | Native | — | — | Neo4j |
| Typed edges | Yes | — | — | Yes |
| Bi-temporal edges | Yes | — | — | Yes |
| Enforced provenance | Yes | — | — | — |
| Cryptographic audit trail | Yes | — | — | Partial |
| Contradiction detection | Yes | — | — | — |
verify integrity sweep | Yes | — | — | — |
| Belief revision | AGM | — | — | — |
| Memory consolidation (CLS) | Yes | — | — | — |
| MCP native | 18 tools | — | — | — |
| Hybrid search | FTS5+vec RRF | Vector | Vector | Vector+kw |
| Language | Rust | Python | Python | Python |
| Deploy | 1 binary | SaaS | Docker+PG | Docker+Neo4j |
| KV latency | ~2.5 µs | ~100 ms | ~30 ms | ~10 ms |
Bold rows = capabilities unique to Smriti. All benchmarks on Apple Silicon, in-memory SQLite.
Research Foundation
Bi-temporal edges improve recall by 18.5% on LongMemEval.
arXiv:2601.05866Structural citation verification without LLM-as-judge. Provenance scoring.
arXiv:2603.17244AGM postulates for memory conflict resolution in agent systems.
arXiv:2510.13614Confidence-weighted contradiction scoring with temporal decay.
arXiv:2601.03236Typed graph layers reduce token usage by 95% vs flat retrieval.
arXiv:2602.05665Graph+BM25 hybrid beats pure vector for multi-hop retrieval.
Get Started
# Single binary — no Docker, no Postgres, no Redis $ smriti serve --port 3000 Smriti v0.2.0 running on http://0.0.0.0:3000 MCP stdio ready · 18 tools registered · Web UI at / # Create knowledge with provenance $ smriti create "Attention Mechanisms" \ --content "Core of [[rel:causal|LLM Architecture]]. See #transformers" Created: Attention Mechanisms (1 causal link, 1 tag) # Run a consolidation pass — see what your agent remembers $ smriti consolidate --dry-run Scanned 847 episodes · 12 promotion-eligible · 34 flagged
One binary. One file. Zero cloud. The only AI memory with consolidation, provenance, and a cryptographic audit trail.
Early access includes a self-hosted binary, onboarding call, and direct Slack support. Limited to 50 teams.
We'll be in touch when your spot opens up. Watch your inbox for next steps.
Something went wrong. Email us directly at hello@smriti.app and we'll get you in.