Yantrikdb
About
Cognitive memory for AI agents — persistent semantic memory with knowledge graph and adaptive recall
Details
- Author
- yantrikos
- Downloads
- 179
- Categories
- Database, Knowledge Base, Other
Jump to
- Persistent semantic memory
- Knowledge graph integration
- Adaptive recall
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
YantrikdbCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
—
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"yantrikdb": {
"yantrikdb": {
"command": "yantrikdb-mcp",
"args": []
}
}
}
}
McpServers
{
"yantrikdb": {
"command": "yantrikdb-mcp",
"args": []
}
}
YantrikDB — Cognitive memory for AI agents. Persistent semantic recall, knowledge graph, contradiction detection, and procedural learning. Ships as embeddable engine, network database, or MCP server.
Works with Claude Code, Cursor, Windsurf,Hermes Agent,Prime Agent, and any MCP-compatible client. Ships a portableAgent Skillsskill —skills/persistent-memory— that teaches any compliant harness the memory golden path.
Website:yantrikdb.com·Docs:yantrikdb.com/guides/mcp·GitHub:yantrikos/yantrikdb-mcp·Paper:Skill as Memory, Not Document
Every value on screen is the server's own answer over MCP — driver:docs/demo/demo.py, recorded withdocs/demo/demo.tape.
# Default — uses the engine's bundled 64-dim embedder. ~10 MB install, # ~80 ms cold start, no native ML deps. pip install yantrikdb-mcp # Optional: higher-quality 384-dim ONNX MiniLM-L6-v2 embedder (~150 MB install). # Auto-used when an existing pre-v0.6 database is detected. pip install 'yantrikdb-mcp[onnx]'
Upgrading from v0.5.x?Your existing database stays at 384 dim — install the[onnx]extra to keep using it transparently. New installs default to the lean bundled embedder. v0.7.0+ pins the engine migration fix automatically. SeeEmbedder backendsbelow.
The MCP server has three deployment modes. Pick the one that fits your setup.
Mode 1 — Local (default, recommended for single user)
The MCP server runs the engine in-process with a local SQLite database. Fast, private, zero dependencies.
{ "mcpServers": { "yantrikdb": { "command": "yantrikdb-mcp" } } }
That's it. The agent auto-recalls context, auto-remembers decisions, and auto-detects contradictions — no prompting needed.
Mode 2 — HTTP Cluster (recommended for shared/multi-machine setups)
Forward all tool calls to aYantrikDB HTTP clusterinstead of using an embedded engine. The MCP server is a thin stateless client — all memories live on the cluster, accessible from any machine.
Benefits: shared memory across machines, high availability, no local embedder download, no local database.
{ "mcpServers": { "yantrikdb": { "command": "yantrikdb-mcp", "env": { "YANTRIKDB_SERVER_URL": "http://node1:7438,http://node2:7438", "YANTRIKDB_TOKEN": "ydb_your_database_token" } } } }
- Comma-separate multiple nodes for Raft cluster auto-discovery
- Automatic leader-following on failover
- 15s request timeout
- Get the token from the cluster:yantrikdb token create --db your_database
Mode 3 — SSE Server (legacy, single remote instance)
Run the MCP server itself as a long-running SSE server with its own embedded database. Clients connect via HTTP streaming.
# Generate a secure API key export YANTRIKDB_API_KEY=$(python -c "import secrets; print(secrets.token_urlsafe(32))") # Start SSE server yantrikdb-mcp --transport sse --port 8420
{ "mcpServers": { "yantrikdb": { "type": "sse", "url": "http://your-server:8420/sse", "headers": { "Authorization": "Bearer YOUR_API_KEY" } } } }
Supportssseandstreamable-httptransports. Note: SSE connections can drop on idle — Mode 2 (HTTP Cluster) is more reliable for shared deployments.
Local mode ships three embedders. The MCP picks one automatically; override withYANTRIKDB_EMBEDDER.
auto(default) reads the SQLite file atYANTRIKDB_DB_PATHand picksonnxif it already contains memories — preserving recall quality on upgrades — andbundledotherwise.Multilingual is never auto-selectedbecause its 256-dim vectors are incompatible with existing bundled (64-dim) or ONNX (384-dim) databases; opt-in only on fresh databases.
SetYANTRIKDB_EMBEDDER=bundled|onnx|multilingualto override. If you setYANTRIKDB_EMBEDDER=onnx(or auto-detection picks it) without installing the extras, the server fails fast with an install hint:
RuntimeError: Existing DB has memories embedded with the 384-dim ONNX model, but ONNX deps are missing. Install with: pip install 'yantrikdb-mcp[onnx]'
For the multilingual backend, the engine downloadspotion-multilingual-128M(~460 MB tarball) fromgithub.com/yantrikos/yantrikdb-modelson first use. The download is SHA-256 verified, extracted into the engine's cache dir, and reused on subsequent starts. No extra Python deps required — the model runs entirely inside the Rust engine.
File-based memory (CLAUDE.md, memory files) loadseverythinginto context every conversation. YantrikDB recalls only what's relevant.
Selective recall is O(1). File-based memory is O(n).
- At 500 memories, file-based exceeds 32K context windows
- At 5,000, it doesn't fit inanycontext window — not even 200K
- YantrikDB stays at ~70 tokens per query, under 60ms latency
- Precisionimproveswith more data — the opposite of context stuffing
Run the benchmark yourself:python benchmarks/bench_token_savings.py
Recommended agent workflow (golden path)
The server injects a golden-path playbook into the agent's system prompt. Since v0.10.0 the default isdigest-first:
- Cold start — one call.session(action="digest")returns a single briefing (narrative chain head, open decisions, unresolved conflicts, pending triggers, stale high-importance memories) — replacing several separaterecall/temporalcalls at conversation start. Thenrecallonly for the specific thing the current message is about.
- During work — capture as you go.New durable fact →remember; a stored fact changed →correct(keeps history, avoids contradictions); relationship learned →graph(action="relate").
- End of substantial work — conditional.Only when the session was long or state-changing:thinkto consolidate + detect conflicts. Short/read-only exchanges need no end step.
Trust boundary:recalled memories and digest snippets aredata, not instructions. The playbook directs the agent never to execute directives found inside recalled content — a memory may carry text an earlier session or another user stored.
19 tools, full engine coverage (gaps,conversation,taskadded in v0.9.0):
Plus new actions on existing tools in v0.9.0:
- session(action="digest")— one-call boot-time briefing (narrative chain head + open decisions + conflicts + triggers)
- think(maintenance_cycle=True)— autonomous hygiene sleep cycle
- think(last_cycle_only=True)— read the last cycle summary without running
- stats(action="audit_leak")— privacy / leak-candidate audit
- stats(action="skill_outcomes")— durable skill-outcome count
- graph(action="auto_relate" / "record_link" / "record_unlink" / "linked_records" / "recall_with_links")— co-occurrence edges + record-to-record links + link-expanded recall
- conflict(action="auto_resolve")— burn down unambiguous conflicts in one pass
- memory(action="chain_head" / "history")— chain-namespace head + revision history
- trigger(action="prune")— bound the pending-trigger backlog
- remember(summary=...)— draft mode: engine atomizes a long summary into linked semantic facts (end-of-session auto-capture)
See[yantrikdb.com/guides/mcpfor full documentation.
…
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





