Skip to content
Back to search

yantrikdb-server

Cognitive memory database for AI agents — consolidates duplicates, detects contradictions, fades stale memories via temporal decay. Rust, Apache-2.0, ships as library / MCP server / HTTP cluster.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/yantrikos/yantrikdb-server with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/yantrikos/yantrikdb-server'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/yantrikos--yantrikdb-server/badge.svg)](/listings/yantrikos--yantrikdb-server)

HTML

<a href="/listings/yantrikos--yantrikdb-server"><img src="/api/listings/yantrikos--yantrikdb-server/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 464 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. # YantrikDB
  2. > ⚠ **Correction notice (2026-04-19):** Phase 3 benchmark writeups committed
  3. > earlier today (`docs/phase3a/`, `docs/phase3b/`, `docs/phase3c/`,
  4. > `docs/phase3d/`) used a Python simulator for the "structured memory"
  5. > condition — NOT the actual yantrikdb engine. Rerun with real yantrikdb
  6. > is in [`docs/phase3e/`](docs/phase3e/). Full audit trail, preliminary
  7. > corrected numbers, and the exact publication gate for a findings post
  8. > are in [`CORRECTIONS.md`](CORRECTIONS.md#whats-pending).
  9. **A memory database that forgets, consolidates, and detects contradictions.**
  10. Vector databases store memories. They don't manage them. After 10,000 memories, recall quality degrades because there's no consolidation, no forgetting, no conflict resolution. Your AI agent just gets noisier.
  11. YantrikDB is different. It's a **cognitive memory engine** — embed it, run it as a server, or connect via MCP. It thinks about what it stores.
  12. **Shortest path to try it:**
  13. ```bash
  14. pip install yantrikdb-mcp
  15. ```
  16. Add one config block to your MCP client and restart it — full steps in [Get started in 60 seconds →](#get-started-in-60-seconds--claude-code--cursor--windsurf).
  17. > **The bigger picture:** YantrikDB is the memory layer being built on the road to [YantrikOS](https://github.com/yantrikos) — an AI-native operating system where agents are first-class primitives, not apps on top. Memory was the bottleneck, so we're shipping it first.
  18. [![Crates.io](https://img.shields.io/crates/v/yantrikdb-server)](https://crates.io/crates/yantrikdb-server)
  19. [![PyPI](https://img.shields.io/pypi/v/yantrikdb)](https://pypi.org/project/yantrikdb/)
  20. [![Docker](https://img.shields.io/badge/docker-ghcr.io%2Fyantrikos%2Fyantrikdb-blue)](https://github.com/yantrikos/yantrikdb-server/pkgs/container/yantrikdb)
  21. [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.20128887.svg)](https://doi.org/10.5281/zenodo.20128887)
  22. [![License: Apache 2.0](https://img.shields.io/badge/license-Apache--2.0-blue)](LICENSE)
  23. > 📄 **New paper (May 2026):** [*Skill as Memory, Not Document*](https://doi.org/10.5281/zenodo.20128887) — measuring three failure modes when agent skill catalogs scale to 5,000 skills. Code + raw CSVs reproducible in [`benchmarks/skill_recall/`](benchmarks/skill_recall/).
  24. ![YantrikDB demo: storing three facts, recalling them, then think() flagging a contradiction between two memories](docs/images/demo.gif)
  25. ## 99.9% token savings vs file-based memory
  26. | Memories | File-Based (CLAUDE.md) | YantrikDB | Token Savings | Recall Precision |
  27. |---|---|---|---|---|
  28. | 100 | 1,770 tokens | 69 tokens | **96%** | 66% |
  29. | 500 | 9,807 tokens | 72 tokens | **99.3%** | 77% |
  30. | 1,000 | 19,988 tokens | 72 tokens | **99.6%** | 84% |
  31. | 5,000 | 101,739 tokens | 53 tokens | **99.9%** | 88% |
  32. At 500 memories, file-based memory exceeds 32K context. At 5,000, it doesn't fit in any model — not even 200K. YantrikDB stays at ~70 tokens per query. **Precision improves with more data** — the opposite of context stuffing.
  33. Reproduce: the script lives in [yantrikdb-mcp](https://github.com/yantrikos/yantrikdb-mcp/blob/main/benchmarks/bench_token_savings.py), not this repo -- `git clone https://github.com/yantrikos/yantrikdb-mcp && cd yantrikdb-mcp && python benchmarks/bench_token_savings.py`
  34. ---
  35. ## Three things no other database does
  36. ### 1. It forgets
  37. ```python
  38. db.record("read the SLA doc by Friday", importance=0.4, half_life=86400) # 1 day
  39. # 24 hours later, this memory's relevance score has decayed
  40. # 7 days later, recall stops surfacing it unless explicitly queried
  41. ```
  42. ### 2. It consolidates
  43. ```python
  44. # 20 similar memories about the same meeting
  45. for note in meeting_notes:
  46. db.record(note, namespace="standup-2026-04-12")
  47. db.think()
  48. # → {"consolidation_count": 5} # collapsed 20 fragments into 5 canonical memories
  49. ```
  50. ### 3. It detects contradictions
  51. ```python
  52. db.record("Acme is based in Boston.")
  53. db.record("Acme is based in Denver.") # added later, in another conversation
  54. db.think()
  55. # → {"conflicts_found": 1, ...}
  56. db.get_conflicts()
  57. # → [{"kind": "identity_fact", ...}]
  58. ```
  59. Detection runs over the **relations the extractor recognises** — here a
  60. location relation, single-valued at any moment — not over arbitrary sentences.
  61. Two limits are worth knowing before you rely on it:
  62. - **Claims are keyed by subject.** `"Alice is the CEO of Acme"` and
  63. `"Bob is the CEO of Acme"` have *different* subjects with one value each, so
  64. nothing compares. The constraint here is inverse-functional — it lives on the
  65. object ("CEO of Acme" admits one filler) — and that direction is not modelled.
  66. - **Copular attribute claims are off by default.** `"The logo is blue"` →
  67. `"The logo is green"` needs `ThinkConfig.extract_attribute_claims`; without
  68. it the copular path never runs.
  69. Both are tracked in [#95](https://github.com/yantrikos/yantrikdb-server/issues/95).
  70. Plus: temporal decay with configurable half-life, entity graph with relationship edges, personality derivation from memory patterns, session-aware context surfacing, multi-signal scoring (recency × importance × similarity × graph proximity).
  71. ---
  72. ## What makes this different
  73. YantrikDB isn't just storage with operations. The engine has a layer that makes agents feel less reactive:
  74. - **Proactive triggers** — the system surfaces what needs attention: pending conflicts, decaying important memories, approaching deadlines, patterns across domains. Agents don't have to ask what they should care about. The memory tells them.
  75. - **Derived personality** — stable tendencies extracted from memory patterns over time. "This user prefers X, reacts to Y, values Z." Informs default agent behavior across sessions.
  76. - **Procedural memory** — strategies that worked before get recorded and reinforced. Agents learn what to do, not just what they know.
  77. - **Temporal awareness** — `stale` surfaces important memories that haven't been touched recently. `upcoming` surfaces memories with approaching deadlines.
  78. Full cognitive architecture lives in the [standalone engine repo](https://github.com/yantrikos/yantrikdb). This server repo focuses on deployment, HTTP API, and cluster operations.
  79. ---
  80. ## Get started in 60 seconds — Claude Code / Cursor / Windsurf
  81. **The fastest adoption path.** One `pip install`, one config block, and your agent gets persistent memory that auto-recalls on conversation start, auto-remembers decisions, and flags contradictions — without you prompting it.
  82. ```bash
  83. pip install yantrikdb-mcp
  84. ```
  85. Add this to your MCP client config — typically `~/.claude.json` or `.mcp.json` in your project for Claude Code, and the equivalent `mcp` block in settings for Cursor/Windsurf ([Claude Code](https://docs.claude.com/en/docs/claude-code/mcp) · [Cursor](https://docs.cursor.com/context/model-context-protocol) · [Windsurf](https://docs.windsurf.com/mcp)):
  86. ```json
  87. {
  88. "mcpServers": {
  89. "yantrikdb": {
  90. "command": "yantrikdb-mcp"
  91. }
  92. }
  93. }
  94. ```
  95. That's it. No env vars. Uses a local SQLite memory file at `~/.yantrikdb/memory.db`. First call auto-initializes the schema. Restart your client — the `yantrikdb` MCP server will show up with 15 memory tools (see below).
  96. **Want a shared memory across machines or teammates?** Point at a YantrikDB cluster instead of local SQLite:
  97. ```json
  98. {
  99. "mcpServers": {
  100. "yantrikdb": {
  101. "command": "yantrikdb-mcp",
  102. "env": {
  103. "YANTRIKDB_SERVER_URL": "http://node1:7438,http://node2:7438",
  104. "YANTRIKDB_TOKEN": "ydb_your_database_token"
  105. }
  106. }
  107. }
  108. }
  109. ```
  110. **Want it over HTTP/SSE instead of stdio?** (For IDE integrations that don't support stdio MCP servers.)
  111. ```json
  112. {
  113. "mcpServers": {
  114. "yantrikdb": {
  115. "type": "sse",
  116. "url": "http://your-server:8420/sse",
  117. "headers": { "Authorization": "Bearer YOUR_API_KEY" }
  118. }
  119. }
  120. }
  121. ```
  122. Then start: `yantrikdb-mcp --transport sse --port 8420`.
  123. ### The 15 MCP tools your agent gets
  124. | | Tools |
  125. |---|---|
  126. | **Core memory** | `remember` · `recall` · `forget` · `correct` |
  127. | **Cognition** | `think` (consolidate + conflict-detect) · `memory` · `trigger` (proactive insights) |
  128. | **Knowledge graph** | `graph` (entities + relations) · `category` |
  129. | **Conflicts & corrections** | `conflict` (list + resolve contradictions) |
  130. | **Time** | `session` · `temporal` (stale/upcoming queries) |
  131. | **Behavior** | `procedure` (strategies) · `personality` (derived traits) |
  132. | **Ops** | `stats` (engine health + diagnostics) |
  133. Full tool reference and agent-integration patterns: **[yantrikdb-mcp →](https://github.com/yantrikos/yantrikdb-mcp)** · [docs](https://yantrikdb.com/guides/mcp/)
  134. ---
  135. ## Other ways to use it
  136. ### As a network server (binary API + HA cluster)
  137. ```bash
  138. docker run -p 7438:7438 ghcr.io/yantrikos/yantrikdb:latest
  139. curl -X POST http://localhost:7438/v1/remember -d '{"text":"hello"}'
  140. ```
  141. Single Rust binary. HTTP + binary wire protocol. 2-voter + 1-witness HA cluster via Docker Compose or Kubernetes. Per-tenant quotas, Prometheus metrics, AES-256-GCM at-rest encryption, runtime deadlock detection. See [docker-compose.cluster.yml](deploy/docker-compose.cluster.yml) and [k8s manifests](deploy/kubernetes/).
  142. ### As an embedded library (Python or Rust)
  143. ```bash
  144. pip install yantrikdb
  145. # or
  146. cargo add yantrikdb
  147. ```
  148. ```python
  149. import yantrikdb
  150. db = yantrikdb.YantrikDB("memory.db", embedding_dim=384)
  151. db.set_embedder(SentenceTransformer("all-MiniLM-L6-v2"))
  152. db.record("Alice leads engineering", importance=0.8)
  153. db.recall("who leads the team?", top_k=3)
  154. db.think() # consolidate, detect conflicts, derive personality
  155. ```
  156. ---
  157. ## Performance
  158. The numbers previously published here (1,689 memories, 112ms recall p50, 76 writes/sec) were from an April-2026 snapshot that didn't trace to any benchmark checked into this repo. They've been removed rather than repeated.
  159. The most recent throughput investigation actually in-repo is a 2-core LXC reliability bench from 2026-05-20 ([`benchmarks/throughput_2core_lxc/results_2026-05-20.md`](benchmarks/throughput_2core_lxc/results_2026-05-20.md)). It found fresh installs wedging permanently after 256 writes over HTTP, and read throughput collapsing under write load. The fix shipped the same day in v0.19.1's ancestor release (then v0.8.18, see [CHANGELOG.md](CHANGELOG.md)):
  160. | Behavior — 2-core LXC, fresh install | Pre-fix | Post-fix (v0.8.18) |
  161. |---|---|---|
  162. | Sustained write throughput, HTTP, concurrency 4, pre-computed embeddings | locks at 256 writes | **381/s** |
  163. | Engine ceiling, direct call (no HTTP), 32 concurrent writers | n/a — compactor wasn't spawned | **1,115/s** |
  164. That's the newest throughput data checked into the repo — it hasn't been re-run since (the server is 20+ releases past it now), and the read-collapses-under-write-load issue that same bench documented is still open. See [`benchmarks/`](benchmarks/) for raw results, harnesses, and caveats across every run; performance work is ongoing.
  165. ---
  166. ## Status
  167. **v0.20.0** — in production use. The embeddable engine has been used in production by the YantrikOS ecosystem since early 2026; the network server runs live on a multi-node Proxmox cluster with multiple tenants.
  168. Since the early alpha line, the server has moved from a raft-lite prototype to **openraft-based HA clustering** (2-voter + 1-witness), added **mounted read-only memory packs** (`/v1/packs`, `/v1/pack-context`), reached **HTTP route parity** with the embedded engine (RFC 032), and picked up the engine's **claim grounding + temporal validity windows** on recalled claims and its more precise entity/relation extraction. As of v0.20.0 it also ships **Studio**, a built-in admin console at `/admin` (dashboard, memory browser, query console, conflict review, and cluster ops), embedded in the binary with no separate install. Operational hardening from the original hardening sprint — `parking_lot` mutexes with runtime deadlock detection, per-handler Prometheus metrics, chaos-tested failover, per-tenant quotas — remains in place and has kept pace release-to-release.
  169. Full per-release detail, including engine-pin changes and test-suite results for each version, is in [CHANGELOG.md](CHANGELOG.md).
  170. Read the maturity notes: https://yantrikdb.com/server/quickstart/#maturity
  171. ## The Problem
  172. Current AI memory is:
  173. > Store everything → Embed → Retrieve top-k → Inject into context → Hope it helps.
  174. That's not memory. That's a search engine with extra steps.
  175. Real memory is hierarchical, compressed, contextual, self-updating, emotionally weighted, time-aware, and predictive. YantrikDB is built for that.
  176. ## Why Not Existing Solutions?
  177. | Solution | What it does | What it lacks |
  178. |----------|-------------|---------------|
  179. | **Vector DBs** (Pinecone, Weaviate) | Nearest-neighbor lookup | No decay, no causality, no self-organization |
  180. | **Knowledge Graphs** (Neo4j) | Structured relations | Poor for fuzzy memory, not adaptive |
  181. | **Memory Frameworks** (LangChain, Mem0) | Retrieval wrappers | Not a memory architecture — just middleware |
  182. | **File-based** (CLAUDE.md, memory files) | Dump everything into context | O(n) token cost, no relevance filtering |
  183. ### Benchmark: Selective Recall vs. File-Based Memory
  184. | Memories | File-Based | YantrikDB | Token Savings | Precision |
  185. |----------|-----------|-----------|---------------|-----------|
  186. | 100 | 1,770 tokens | 69 tokens | **96%** | 66% |
  187. | 500 | 9,807 tokens | 72 tokens | **99.3%** | 77% |
  188. | 1,000 | 19,988 tokens | 72 tokens | **99.6%** | 84% |
  189. | 5,000 | 101,739 tokens | 53 tokens | **99.9%** | 88% |
  190. At 500 memories, file-based exceeds 32K context windows. At 5,000, it doesn't fit in any context window — not even 200K. YantrikDB stays at ~70 tokens per query. Precision *improves* with more data — the opposite of context stuffing.
  191. ## Architecture
  192. ### Design Principles
  193. - **Embedded, not client-server** — single file, no server process (like SQLite)
  194. - **Local-first, sync-native** — works offline, syncs when connected
  195. - **Cognitive operations, not SQL** — `record()`, `recall()`, `relate()`, not `SELECT`
  196. - **Living system, not passive store** — does work between conversations
  197. - **Thread-safe** — `Send + Sync` with internal Mutex/RwLock, safe for concurrent access
  198. ### Five Indexes, One Engine
  199. ```
  200. ┌──────────────────────────────────────────────────────┐
  201. │ YantrikDB Engine │
  202. │ │
  203. │ ┌──────────┬──────────┬──────────┬──────────┐ │
  204. │ │ Vector │ Graph │ Temporal │ Decay │ │
  205. │ │ (HNSW) │(Entities)│ (Events) │ (Heap) │ │
  206. │ └──────────┴──────────┴──────────┴──────────┘ │
  207. │ ┌──────────┐ │
  208. │ │ Key-Value│ WAL + Replication Log (CRDT) │
  209. │ └──────────┘ │
  210. └──────────────────────────────────────────────────────┘
  211. ```
  212. 1. **Vector Index (HNSW)** — semantic similarity search across memories
  213. 2. **Graph Index** — entity relationships, profile aggregation, bridge detection
  214. 3. **Temporal Index** — time-aware queries ("what happened Tuesday", "upcoming deadlines")
  215. 4. **Decay Heap** — importance scores that degrade over time, like human memory
  216. 5. **Key-Value Store** — fast facts, session state, scoring weights
  217. ### Memory Types (Tulving's Taxonomy)
  218. | Type | What it stores | Example |
  219. |------|---------------|---------|
  220. | **Semantic** | Facts, knowledge | "User is a software engineer at Meta" |
  221. | **Episodic** | Events with context | "Had a rough day at work on Feb 20" |
  222. | **Procedural** | Strategies, what worked | "Deploy with blue-green, not rolling update" |
  223. All memories carry **importance**, **valence** (emotional tone), **domain**, **source**, **certainty**, and **timestamps** — used in a multi-signal scoring function that goes far beyond cosine similarity.
  224. ## Key Capabilities
  225. ### Relevance-Conditioned Scoring
  226. Not just vector similarity. Every recall combines:
  227. - **Semantic similarity** (HNSW) — what's topically related
  228. - **Temporal decay** — recent memories score higher
  229. - **Importance weighting** — critical decisions beat trivia
  230. - **Graph proximity** — entity relationships boost connected memories
  231. - **Retrieval feedback** — learns from past recall quality
  232. Weights are tuned automatically from usage patterns.
  233. ### Conflict Detection & Resolution
  234. When memories contradict, YantrikDB doesn't guess — it creates a conflict segment:
  235. ```
  236. "works at Google" (recorded Jan 15) vs. "works at Meta" (recorded Mar 1)
  237. → Conflict: identity_fact, priority: high, strategy: ask_user
  238. ```
  239. Resolution is conversational: the AI asks naturally, not programmatically.
  240. ### Semantic Consolidation
  241. After many conversations, memories pile up. `think()` runs:
  242. 1. **Consolidation** — merge similar memories, extract patterns
  243. 2. **Conflict scan** — find contradictions across the knowledge base
  244. 3. **Pattern mining** — cross-domain discovery ("work stress correlates with health entries")
  245. 4. **Trigger evaluation** — proactive insights worth surfacing
  246. ### Proactive Triggers
  247. The engine generates triggers when it detects something worth reaching out about:
  248. - Memory conflicts needing resolution
  249. - Approaching deadlines (temporal awareness)
  250. - Patterns detected across domains
  251. - High-importance memories about to decay
  252. - Goal tracking ("how's the marathon training?")
  253. Every trigger is grounded in real memory data — not engagement farming.
  254. ### Multi-Device Sync (CRDT)
  255. Local-first with append-only replication log:
  256. - **CRDT merging** — graph edges, memories, and metadata merge without conflicts
  257. - **Vector indexes rebuild locally** — raw memories sync, each device rebuilds HNSW
  258. - **Forget propagation** — tombstones ensure forgotten memories stay forgotten
  259. - **Conflict detection** — contradictions across devices are flagged for resolution
  260. ### Sessions & Temporal Awareness
  261. ```python
  262. sid = db.session_start("default", "claude-code")
  263. db.record("decided to use PostgreSQL") # auto-linked to session
  264. db.record("Alice suggested Redis for caching")
  265. db.session_end(sid)
  266. # → computes: memory_count, avg_valence, topics, duration
  267. db.stale(days=14) # high-importance memories not accessed recently
  268. db.upcoming(days=7) # memories with approaching deadlines
  269. ```
  270. ## Full API
  271. | Operation | Methods |
  272. |-----------|---------|
  273. | **Core** | `record`, `record_batch`, `recall`, `recall_with_response`, `recall_refine`, `forget`, `correct` |
  274. | **Knowledge Graph** | `relate`, `get_edges`, `search_entities`, `entity_profile`, `relationship_depth`, `link_memory_entity` |
  275. | **Cognition** | `think`, `get_patterns`, `scan_conflicts`, `resolve_conflict`, `derive_personality` |
  276. | **Triggers** | `get_pending_triggers`, `acknowledge_trigger`, `deliver_trigger`, `act_on_trigger`, `dismiss_trigger` |
  277. | **Sessions** | `session_start`, `session_end`, `session_history`, `active_session`, `session_abandon_stale` |
  278. | **Temporal** | `stale`, `upcoming` |
  279. | **Procedural** | `record_procedural`, `surface_procedural`, `reinforce_procedural` |
  280. | **Lifecycle** | `archive`, `hydrate`, `decay`, `evict`, `list_memories`, `stats` |
  281. | **Sync** | `extract_ops_since`, `apply_ops`, `get_peer_watermark`, `set_peer_watermark` |
  282. | **Maintenance** | `rebuild_vec_index`, `rebuild_graph_index`, `learned_weights` |
  283. ## Technical Decisions
  284. | Decision | Choice | Rationale |
  285. |----------|--------|-----------|
  286. | **Core language** | Rust | Memory safety, no GC, ideal for embedded engines |
  287. | **Architecture** | Embedded (like SQLite) | No server overhead, sub-ms reads, single-tenant |
  288. | **Bindings** | Python (PyO3), TypeScript | Agent/AI layer integration |
  289. | **Storage** | Single file per user | Portable, backupable, no infrastructure |
  290. | **Sync** | CRDTs + append-only log | Conflict-free for most operations, deterministic |
  291. | **Thread safety** | Mutex/RwLock, Send+Sync | Safe concurrent access from multiple threads |
  292. | **Query interface** | Cognitive operations API | Not SQL — designed for how agents think |
  293. ## Ecosystem
  294. | Package | What | Install | Source |
  295. |---------|------|---------|--------|
  296. | **[yantrikdb-mcp](https://github.com/yantrikos/yantrikdb-mcp)** | **MCP server for Claude Code / Cursor / Windsurf — start here** | `pip install yantrikdb-mcp` | [GitHub](https://github.com/yantrikos/yantrikdb-mcp) · [PyPI](https://pypi.org/project/yantrikdb-mcp/) |
  297. | [yantrikdb-client](https://github.com/yantrikos/yantrikdb-client) | Python client SDK for the HTTP server (typed memory, reflect, character primitives) | `pip install yantrikdb-client` | [GitHub](https://github.com/yantrikos/yantrikdb-client) · [PyPI](https://pypi.org/project/yantrikdb-client/) |
  298. | [yantrikdb-server](https://github.com/yantrikos/yantrikdb-server) | HTTP + wire-protocol server, HA cluster | `docker run ghcr.io/yantrikos/yantrikdb` | [GitHub](https://github.com/yantrikos/yantrikdb-server) |
  299. | [yantrikdb (Rust)](https://crates.io/crates/yantrikdb) | Embedded Rust engine | `cargo add yantrikdb` | [GitHub](https://github.com/yantrikos/yantrikdb) |
  300. | [yantrikdb (Python)](https://pypi.org/project/yantrikdb/) | Python bindings via PyO3 | `pip install yantrikdb` | [GitHub](https://github.com/yantrikos/yantrikdb) |
  301. | [langchain-yantrikdb](https://github.com/yantrikos/langchain-yantrikdb) | LangChain `VectorStore` + `ChatMessageHistory` with explainable recall | `pip install langchain-yantrikdb` | [GitHub](https://github.com/yantrikos/langchain-yantrikdb) · [PyPI](https://pypi.org/project/langchain-yantrikdb/) |
  302. | [yantrikdb-hermes-plugin](https://github.com/yantrikos/yantrikdb-hermes-plugin) | Memory provider for NousResearch/hermes-agent, with a reproducible recall benchmark | `pip install yantrikdb-hermes-plugin` | [GitHub](https://github.com/yantrikos/yantrikdb-hermes-plugin) · [PyPI](https://pypi.org/project/yantrikdb-hermes-plugin/) |
  303. | [yantrik-memory](https://github.com/yantrikos/yantrik-memory) | Framework-agnostic Python memory layer — traits, bond evolution, knowledge graph | `pip install yantrik-memory` | [GitHub](https://github.com/yantrikos/yantrik-memory) · [PyPI](https://pypi.org/project/yantrik-memory/) |
  304. | [openclaw-memory-yantrikdb](https://github.com/yantrikos/openclaw-memory-yantrikdb) | OpenClaw memory plugin — conflict-aware session briefings, recall with retrieval reasons, auto-capture | `openclaw plugins install npm:@yantrikos/openclaw-memory-yantrikdb` | [GitHub](https://github.com/yantrikos/openclaw-memory-yantrikdb) |
  305. ## Roadmap
  306. - [x] **V0** — Embedded engine, core memory model (record, recall, relate, consolidate, decay)
  307. - [x] **V1** — Replication log, CRDT-based sync between devices
  308. - [x] **V2** — Conflict resolution with human-in-the-loop
  309. - [x] **V3** — Proactive cognition loop, pattern detection, trigger system
  310. - [x] **V4** — Sessions, temporal awareness, cross-domain pattern mining, entity profiles
  311. - [ ] **V5** — Multi-agent shared memory, federated learning across users
  312. ## Research & Publications
  313. ### 📄 Skill as Memory, Not Document (May 2026)
  314. **[Sarkar, P. (2026). *Skill as Memory, Not Document: A Database-Native Substrate for Agent Skill Catalogs*. Zenodo.](https://doi.org/10.5281/zenodo.20128887)**
  315. ![Per-query top-K=5 prompt-token cost vs catalog size (log-log). Full-catalog and full-metadata disclosure grow linearly past production context windows; YantrikDB top-K stays constant at ~369 tokens.](docs/papers/zenodo-bundle/figure-token-cost.png)
  316. A measurement paper on what happens when LLM agent skill catalogs scale. On a 5,000-skill corpus:
  317. - **Token cost:** full-catalog disclosure consumes 919,200 tokens (exceeds Claude 3.7's 200K window). YantrikDB's indexed top-K disclosure: 369 tokens, constant in catalog size. The honest ratio against an indexed filesystem baseline is 1.49× — an ablation pinpoints the entire gap as YAML frontmatter overhead.
  318. - **Latency:** p50 = 87.3 ms, p95 = 106.3 ms at 5,000-skill scale, single-node.
  319. - **Invalid-skill admission:** YantrikDB rejects 70/70 adversarially-malformed skills (0%) at write time; a document-only baseline admits 68/70 (97%).
  320. Three failure modes for filesystem-shaped skill catalogs (token burn, slowdown, invalid-skill admission). One unifying framing: skill catalogs for autonomous learning aren't documents; they're memory.
  321. Code + scripts + raw CSVs are reproducible at [`benchmarks/skill_recall/`](benchmarks/skill_recall/). Full deposit (PDF + source + data + scripts) on Zenodo. Companion blog post: [yantrikdb.com/papers/skill-substrate](https://yantrikdb.com/papers/skill-substrate/).
  322. ### Earlier work
  323. - **U.S. Patent Application 19/573,392** (March 2026): "Cognitive Memory Database System with Relevance-Conditioned Scoring and Autonomous Knowledge Management"
  324. - **Zenodo (software):** [YantrikDB: A Cognitive Memory Engine for Persistent AI Systems](https://doi.org/10.5281/zenodo.18793952)
  325. ## Author
  326. **Pranab Sarkar** — [ORCID](https://orcid.org/0009-0009-8683-1481) · [LinkedIn](https://www.linkedin.com/in/pranab-sarkar-b0511160/) · developer@pranab.co.in
  327. ## License
  328. Apache-2.0. See [LICENSE](LICENSE) for the full text.
  329. The [MCP server](https://github.com/yantrikos/yantrikdb-mcp) is MIT-licensed.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.