Relevance-Conditioned Scoring
Relevance gates every other signal multiplicatively. A perfectly relevant old memory surfaces. An irrelevant high-importance memory doesn’t. This is the key insight — patented and proven.
pip install yantrikdbcargo add yantrikdbbrew install yantrikos/tap/yantrikdbdocker pull ghcr.io/yantrikos/yantrikdbwysie’s yantrikdb-hermes-dashboard can now run against a YantrikDB cluster, not just an embedded SQLite file.
Three new /v1/* read endpoints (/v1/identity-scope, /v1/memories, /v1/memory/{rid}) ship with the
RFC 014-B Principal auth substrate, a structured error envelope across the whole API, and
an FTS5 keyword-fallback marker on /v1/recall. Engine pin → 0.7.17.
2077 tests, all green. Read the Hermes-dashboard guide →
Every AI memory solution does the same thing:
Store everything. Embed. Retrieve top-k. Inject into context. Hope it helps.
That doesn’t model how memory works. It treats all memories as equal. Old memories never fade. Contradictions are never detected. Nothing is ever consolidated. The AI never proactively remembers anything.
YantrikDB fixes all of this.
Relevance-Conditioned Scoring
Relevance gates every other signal multiplicatively. A perfectly relevant old memory surfaces. An irrelevant high-importance memory doesn’t. This is the key insight — patented and proven.
Cognitive State Graph
Typed nodes (beliefs, goals, intents, preferences) with typed edges (supports, contradicts, causes, predicts). Your AI doesn’t just remember — it reasons about what it knows.
Autonomous Cognition
Consolidation merges related memories. Conflict detection flags contradictions. Pattern mining discovers recurring themes. All automatic via db.think().
Proactive Triggers
Decaying memories, unresolved conflicts, emerging patterns — YantrikDB tells your AI when to act, grounded in real data. Not engagement farming.
Five Unified Indexes
Vector (HNSW), graph, temporal, decay heap, and key-value — all in one embedded SQLite database. No server. No infrastructure. Just a file.
MCP Server
pip install yantrikdb-mcp — instant persistent memory for Claude Code, Cursor, Windsurf, and any MCP-compatible AI agent.
First-Class Skills
/v1/skills/{define, get, search, outcome, forget} — agent skills as a substrate primitive, not a convention. Strict shape validation, append-only outcome event log, schema-not-semantics design line. Ships in v0.8.11.
Cluster Mode
Multi-node deployment via openraft consensus — leader election, log replication, automatic failover. v0.8.13 ships RFC 010 PR-6.4: handlers route through the durable commit log so committed mutations replicate to follower engine state via deterministic apply. mTLS production gate; single-binary witness daemon for 2-node tiebreaks.
Bundled Embedder
pip install yantrikdb works out of the box — no ONNX, no pip install sentence-transformers. Default potion-base-2M static embedder ships with the engine. Optional potion-base-8M (~92% MiniLM) and potion-base-32M (~95% MiniLM) downloadable via set_embedder_named(). Engine v0.7.0+.
The real YantrikDB engine — Rust compiled to WebAssembly — running in your browser. No server. No API calls. Click through to see record(), recall(), relate(), and think() in action.
Hermes is an open-source agent runtime. YantrikDB is its cognitive memory — three layers that compose into the full ecosystem:
① The plugin (agent-side)
pip install yantrikdb-hermes-plugin → 3-line .env config → the agent autonomously calls yantrikdb_remember / yantrikdb_recall / yantrikdb_stats during conversations. Sub-millisecond on the embedded backend. Owner-scoping for multi-user Hermes gateways contributed by community member @wysie (v0.4.10).
② The server (memory backend)
docker pull ghcr.io/yantrikos/yantrikdb:0.8.17 → multi-tenant database with HTTP API, Raft replication, automatic failover, encryption at rest. Switch the plugin’s YANTRIKDB_MODE=http and one agent’s memory becomes shared infrastructure for a fleet.
③ The dashboard (operator console for Hermes memory)
Built by community member @wysie: yantrikdb-hermes-dashboard — a FastAPI dashboard for browsing, configuring, and safely maintaining a Hermes agent’s YantrikDB memory: namespace/identity/space configuration, per-user memory toggles, recall debugger, contradiction review, entity graph visualiser, lifecycle housekeeping. Read-only browsing by default; Admin Mode opt-in for mutating ops, with an optional dashboard password.
⚠ Third-party code. Not maintained by the YantrikDB org. Audit before running against production data — see the security considerations on the guide.
v0.8.17 ships the unlock.
Until v0.8.17 the dashboard only ran against an embedded SQLite file — one machine, one agent. The new /v1/identity-scope, /v1/memories, and /v1/memory/{rid} endpoints let it run against a clustered deployment, so an operator can inspect a multi-agent fleet’s shared memory from one URL. Token-derived auth means a tenant-pinned token sees exactly its namespace; a cluster-admin token sees the whole fleet. Read the dashboard guide →
Don’t take our word for it — see what the cognitive architecture actually produces. Scroll through the experiments below.
Five AI agents watched the same Black Friday incident. Two were working from stale data. YantrikDB surfaced exactly which beliefs were live and which were 20 minutes out of date — with validity windows, source attribution, and confidence bands.
Belief management under contradiction. Not a vector store — a witness stand.
The car passed emissions — because it knew it was being tested. Twelve years of public record across five sources. Five polarity contradictions on one tuple.
Public claims vs internal engineering vs regulator findings vs DOJ plea, all preserved as coexisting claims.
He said he never touched the repo. Badge, VPN, git, USB, and an email to the competitor’s recruiter all say he did. The sworn denial and the forensic record coexist in the claims ledger, with the contradiction as the query result.
Sworn testimony and machine evidence as first-class structured claims.
The same number, reported across four sources, took four contradictory positions over six years. Eight polarity contradictions on one tuple. The temporal query flips the belief state between 2019 and 2020.
Financial forensics as contradiction reconstruction, not scandal reporting.
The candidate denied taking pharma money. Five hops through public registries — FEC, Delaware, PAC disclosures, industry classification — traced it anyway. The contradiction lives in the composition of sources, not any single one.
Entity-graph reconstruction across public records.
Five witnesses to a data breach, some of them lying, plus badge and git logs as ground truth. The engine identifies the perpetrator, cites the exact lies, and explains its reasoning — with real queries into the claims ledger, not scripted narrative.
Memory as a reasoning substrate, not a search index.
Fifty years of declassified sources: Nixon’s public denials, the White House tapes, sworn Senate testimony. Six polarity contradictions on Nixon alone in one query — the work the Senate Watergate Committee spent two years building by hand.
Historical research as a tractable problem.
207 first-person memories. 288 entities auto-extracted. Personality derived. 28 proactive triggers. Zero LLM calls. Then he wrote a letter to his wife — and the character came through because the memories made him specific.
Richer memory → richer character → richer output from any LLM.
YantrikDB ships in three forms. Pick the one that fits your stack:
📦 Embeddable engine
Drop the Rust crate or Python package into your app. Zero servers, single-process, fastest possible. Best for desktop apps, agents that own their memory, and CLI tools.
cargo add yantrikdbpip install yantrikdb🌐 Network database
Run yantrikdb serve and get a multi-tenant database with HTTP + wire protocol, replication, automatic failover, encryption at rest, and a psql-style REPL. Best for self-hosted agents, homelab clusters, and shared memory across services.
brew install yantrikos/tap/yantrikdbdocker pull ghcr.io/yantrikos/yantrikdb🔌 MCP server
Plug-and-play memory for Claude Code, Cursor, Windsurf and any MCP-compatible agent. 15 tools for remember/recall/relate/think. The fastest way to give an existing AI assistant persistent memory.
pip install yantrikdb-mcpAll three share the same underlying engine and convergent semantics. You can start embedded and migrate to clustered later — your data works the same way.
| Index | What It Does | Example Query |
|---|---|---|
| Vector (HNSW) | Semantic similarity search | ”What did the user say about work?” |
| Graph | Entity relationships & reasoning | ”Who works at what company?” |
| Temporal | Time-aware retrieval | ”What happened last Tuesday?” |
| Decay Heap | Importance with biological time decay | Memories fade like human memory |
| Key-Value | Instant fact lookup | ”User’s timezone is CST” |
All five indexes query the same data. A single recall() call blends signals from all of them into one relevance-conditioned score.
| Vector DB | RAG Pipeline | YantrikDB | |
|---|---|---|---|
| Storage | Flat embeddings | Chunked documents | Typed memories with metadata |
| Retrieval | Cosine top-k | Hybrid search | Relevance-conditioned scoring |
| Time | Ignored | Ignored | Temporal decay + recency |
| Contradictions | Undetected | Undetected | Automatic conflict detection |
| Consolidation | None | None | Autonomous merging |
| Proactive | Never | Never | Trigger-based notifications |
| Graph | Separate system | None | Built-in cognitive state graph |
Benchmarked with 15 diverse queries across 4 scales. File-based memory (CLAUDE.md, memory files) loads everything into context every conversation. YantrikDB’s selective recall retrieves only the 3–5 memories relevant to the current task.
| Memories | File-Based | YantrikDB | Savings | Precision |
|---|---|---|---|---|
| 100 | 1,770 tokens | 69 tokens | 96% | 66% |
| 500 | 9,807 tokens | 72 tokens | 99.3% | 77% |
| 1,000 | 19,988 tokens | 72 tokens | 99.6% | 84% |
| 5,000 | 101,739 tokens | 53 tokens | 99.9% | 88% |
Selective recall cost is O(1). File-based memory cost is O(n).
At 500 memories, file-based memory already exceeds 32K context windows. At 5,000 memories, it doesn’t fit in any context window — not even 200K. YantrikDB stays at ~70 tokens per query with recall latency under 60ms. Precision improves with more data: the opposite of file-based memory, which degrades as context fills up.
Works with Claude Code, Cursor, Windsurf, Copilot, Kilo Code — any MCP-compatible agent. Run the benchmark yourself: python benchmarks/bench_token_savings.py
U.S. Patent Application No. 19/573,392 (filed March 2026) — covers relevance-conditioned scoring, the cognitive state graph, and the unified system architecture.
Open source under AGPL-3.0. The patent protects the methods, not the code. Use it freely. Read more →
| Component | Description | License |
|---|---|---|
| yantrikdb | Cognitive memory engine (Rust + Python bindings) | AGPL-3.0 |
| yantrikdb-server | Multi-tenant network database with replication, auto-failover, encryption | AGPL-3.0 |
| yantrikdb-witness | Vote-only daemon for 2-node Raft cluster failover | AGPL-3.0 |
| yantrikdb-protocol | Wire protocol codec (frames, opcodes, MessagePack) | AGPL-3.0 |
| yql | Interactive REPL client (like psql for cognitive memory) | MIT |
| yantrikdb-mcp | MCP server for Claude Code, Cursor, Windsurf & more | MIT |
| Cortex | OpenClaw/ClawDBot plugin — personality traits, bond evolution, context assembly | MIT |
Distribution: crates.io · Docker Hub (GHCR) · Homebrew tap · PyPI
Open source. Get started →