About Yantrikdb
Yantrikdb is an MCP server published by yantrikos in the RAG category: cognitive memory engine for AI agents — temporal decay, contradiction detection, autonomous consolidation, knowledge graph, ANN recall via HNSW. Embeddable Rust library with Python bindings; powers yantrikdb-server (HTTP gateway, MCP server, openraft cluster). AGPL. Conduid read 14 tools from its source: conflict_list, conflict_resolve, entity_edges, entity_relate, memory_correct, memory_forget and 8 more. It is published to PyPI as yantrikdb and runs with uvx.
The repository has 81 stars and 26 forks, and its last commit was on 1 Dec 2026. Conduid has no tagged release on record for it. It passes all 1 static checks Conduid ran on the repository. Its topics include agent-memory, cognitive-memory, database, embeddings, hnsw and knowledge-graph.
Install
uvx yantrikdbpip install yantrikdbgit clone https://github.com/yantrikos/yantrikdbTools (14)
conflict_listList memory conflicts (contradictions) that need resolution.| Parameter | Type | Description |
|---|---|---|
| limit | integer | Maximum number of conflicts to return (default 10). |
| status | string | Filter by status ('open', 'resolved', 'dismissed'). Default shows all. |
conflict_resolveResolve a memory conflict using a strategy.| Parameter | Type | Description |
|---|---|---|
| conflict_id * | string | The conflict ID to resolve. |
| new_text | string | For 'merge' strategy, the merged text content. |
| resolution_note | string | Optional note explaining the resolution. |
| strategy * | string | One of 'keep_a' (keep memory A), 'keep_b' (keep memory B), 'keep_both' (keep both, mark as non-conflicting), 'merge' (combine into one). |
| winner_rid | string | For keep_a/keep_b, which memory wins (optional, inferred from strategy). |
entity_edgesGet all relationships for an entity in the knowledge graph.| Parameter | Type | Description |
|---|---|---|
| entity * | string | The entity name to look up. |
entity_relateCreate a relationship between two entities in the knowledge graph.| Parameter | Type | Description |
|---|---|---|
| relationship | string | Relationship type (e.g. "works_at", "knows", "likes", "related_to"). |
| source * | string | Source entity name (e.g. "Alice", "Python", "project_x"). |
| target * | string | Target entity name. |
| weight | number | Relationship strength (0.0 to 1.0). |
memory_correctCorrect an existing memory in place (Issue #47, v0.7.20).| Parameter | Type | Description |
|---|---|---|
| metadata_merge | object | Optional dict patch-merged into existing metadata. |
| new_importance | number | Optional new importance score (0.0 to 1.0). |
| new_text | string | Optional corrected text. When it differs from the current text the record is re-embedded in place (v0.10 Item 3), so the memory is retrieved under its NEW meaning. Requires an embedder; pass None to leave the text unchanged. |
| new_valence | number | Optional new emotional valence (-1.0 to 1.0). |
| reason * | string | Required non-empty string explaining why the correction was made. |
| rid * | string | The memory ID to correct. |
memory_forgetPermanently forget (tombstone) a memory.| Parameter | Type | Description |
|---|---|---|
| rid * | string | The memory ID to forget. |
memory_getGet a specific memory by its ID.| Parameter | Type | Description |
|---|---|---|
| rid * | string | The memory ID to retrieve. |
memory_recallSearch memories by semantic similarity to a natural language query.| Parameter | Type | Description |
|---|---|---|
| compact | boolean | Lean payload — per hit only rid, text, score and warning-class why_retrieved tags; envelope keeps count + confidence. The text is what the agent came for; the diagnostics cost context on every call and earn it only when something looks wrong. |
| domain | string | Filter by topic domain (work, health, family, etc.). None for all. |
| expand_entities | boolean | Whether to use knowledge graph to find related memories. |
| include_consolidated | boolean | Whether to include consolidated (merged) memories. |
| memory_type | string | Filter by type ('episodic', 'semantic', 'procedural'). None for all. |
| namespace | string | Filter by namespace. None returns all namespaces. |
| query * | string | Natural language search query. |
| source | string | Filter by memory source (user, system, document, inference). None for all. |
| top_k | integer | Maximum number of results (default 10). |
memory_recall_feedbackProvide feedback on a recall result for adaptive learning.| Parameter | Type | Description |
|---|---|---|
| feedback * | string | 'relevant' or 'irrelevant'. |
| query_text | string | The original query text (optional, helps learning). |
| rank_at_retrieval | integer | The rank position (optional). |
| rid * | string | The memory ID to provide feedback on. |
| score_at_retrieval | number | The score the memory received (optional). |
memory_recall_refineRefine a previous recall with a follow-up query.| Parameter | Type | Description |
|---|---|---|
| domain | string | Filter by domain. |
| namespace | string | Filter by namespace. |
| original_query * | string | The original search query text. |
| original_rids | array | Memory IDs from the first recall to exclude from results. |
| refinement_text * | string | The follow-up/clarifying query text. |
| source | string | Filter by source. |
| top_k | integer | Maximum number of results (default 10). |
memory_recordStore a new memory in the cognitive memory engine.| Parameter | Type | Description |
|---|---|---|
| certainty | number | How confident the agent was when storing (0.0 to 1.0). |
| claims | array | The facts this memory states, as {"subject", "relation", "object"} triples (optional "polarity": 1 or -1), e.g. [{"subject": "Pranab", "relation": "prefers", "object": "Vim"}]. State a claim for any fact you want tracked for contradiction, succession, entity threads and multi-hop recall. The engine grounds each claim against the text: subject and object must occur in it, and the relation must be a short snake_case phrase. Ungrounded claims are reported back, not stored. |
| domain | string | Topic domain (work, health, family, finance, hobby, travel, general, etc.). |
| emotional_state | string | Richer emotion label: joy, sadness, anger, fear, surprise, neutral, etc. |
| importance | number | How important this memory is (0.0 to 1.0). Higher = decays slower. |
| memory_type | string | One of 'episodic' (events), 'semantic' (facts), 'procedural' (how-to). |
| metadata | object | Optional key-value metadata (e.g. {"source": "conversation", "topic": "work"}). |
| namespace | string | Memory namespace for isolation (default: "default"). |
| source | string | Who/what provided this memory (user, system, document, inference). |
| text * | string | The memory content to store. |
| valence | number | Emotional tone (-1.0 negative to 1.0 positive). 0.0 is neutral. |
memory_statsGet current memory engine statistics.| Parameter | Type | Description |
|---|---|---|
| namespace | string | Filter stats to a specific namespace. None for global stats. |
memory_thinkRun the cognitive maintenance loop on the memory store.| Parameter | Type | Description |
|---|---|---|
| run_conflict_scan | boolean | Whether to scan for contradictions (default True). |
| run_consolidation | boolean | Whether to merge similar memories (default True). |
| run_pattern_mining | boolean | Whether to detect patterns (default True). |
trigger_listGet pending proactive triggers from the memory system.| Parameter | Type | Description |
|---|---|---|
| limit | integer | Maximum number of triggers to return (default 10). |
Security checks
- ✓README presentThe repository's README runs to about 2.3K words.
5 checks have not been run yet.
README
The repository's README runs to about 2.3K words. The original in the repository is authoritative.
Read full README