Labsco
MCP SERVER

YantrikDB

by yantrikos

Persistent memory for an agent — semantic recall, a knowledge graph and contradiction detection in a local SQLite file.

Agent MemoryVerified
Summary
Recall that stays the same size as the memory behind it grows.

The case against a memory file is arithmetic: a file loads everything into every conversation, so at 5,000 memories it does not fit in any context window, while a recall here comes back in roughly 70 tokens because it returns only what matched. What sits on top is the part worth having — correct keeps a revision history rather than leaving two versions of a fact in play, the maintenance pass finds the pairs that contradict each other, and the boot digest replaces the several calls a session used to open with. Recalled content is treated as data, not instruction: the shipped playbook tells the agent never to execute directives found inside a memory.

What it is

A cognitive memory substrate exposed as tools. The agent stores facts, decisions and preferences as it works and recalls them by meaning later; a maintenance pass consolidates them, mines patterns, and flags memories that contradict each other.

What you get
  • Memories stored singly or in batches, with type, domain, namespace, importance, certainty and an idempotency key
  • Semantic recall by meaning rather than keyword, refinable from a previous weak result set and expandable along graph links
  • In-place correction that keeps a revision history, so a fact that changed does not become a contradiction
  • Tombstoning for what should be forgotten outright
  • An incremental maintenance pass — a small batch per call — that consolidates, mines patterns and scans for conflicts
  • Conflicts listed, resolved, dismissed, reclassified, or burned down in a batch where they are unambiguous
  • A knowledge graph: entity relationships, memory-to-entity links, record-to-record links, co-occurrence auto-relation, and recall expanded along those edges
  • A one-call boot digest — narrative chain head, open decisions, unresolved conflicts, pending triggers, stale important memories — in place of several separate calls at the start of a session
  • Time-based queries: what has gone stale, what is coming up, and what was known as of a past date
  • Procedural memory — a strategy learned with its context, surfaced for a matching task, and reinforced by outcome
  • A structured skill catalog with skill_id, applies_to, triggers and body, and outcomes recorded against it
  • Knowledge gaps surfaced from the demand log: the queries asked often and answered badly
  • A bounded encrypted ring buffer for verbatim conversation turns, isolated per namespace
  • A task store that survives sessions and shows up in the boot digest
  • Signed portable memory packs inspected, installed and trusted
  • Engine statistics, a health check, learned weights, and a privacy leak audit
Requirements

Pip install yantrikdb-mcp, then run yantrikdb-mcp. In the default local mode everything lives in a SQLite file at ~/.yantrikdb/memory.db, or wherever YANTRIKDB_DB_PATH points — no telemetry and no external services. The bundled 64-dim Rust embedder needs no native ML dependencies and cold-starts in about 80 ms on a roughly 10 MB install; the [onnx] extra adds a 384-dim MiniLM at about 150 MB and is chosen automatically for databases created before v0.6; a 256-dim multilingual backend covering 101 languages is opt-in only, because its vectors are incompatible with either of the others. To share one memory across machines, YANTRIKDB_SERVER_URL and YANTRIKDB_TOKEN point at a YantrikDB HTTP cluster instead of the embedded engine. YANTRIKDB_TOOL_PROFILE trims the advertised set to the core golden path, and agent skill authoring stays off until YANTRIKDB_SKILLS_WRITE_ENABLED is set.

Setup effort

One command — pip install yantrikdb-mcp