| Recommend this page to a friend! |
| Packages of madi kais | PHP KAI Harness | doc/quantum/cognitive_graph_memory.md | Download |
|
|
||||||||||||||||||||
Cognitive Graph Memory Specification1. Concept & RationaleAn agent needs to accumulate knowledge and relationships dynamically as it performs tasks. Single-turn conversation history forgets details across sessions. The Cognitive Graph Memory maintains an ontological network of entities and relationships extracted dynamically from tool execution outputs and environment observations. 2. Graph Database SchemaStored in the SQLite monitor database, the graph represents relationships using two primary tables:
* 3. Operations & DeduplicationA. Fact ExtractionAfter successful tool execution, the agent loops and runs an extraction pass on the tool output to identify triplets: $$\text{Triplet} = (\text{Subject}, \text{Relationship}, \text{Object})$$ B. Deduplication & Coherence WeightingTo prevent graph explosion, new edges are deduplicated: * If relationship already exists, its edge weight (coherence factor) is amplified: $$W_{new} = \min(1.0, W_{old} + 0.10)$$
C. Temporal Graph DecayTo support "forgetting" outdated information, edge weights decay over time: $$W(t) = W_{initial} \cdot e^{-\lambda t}$$ Edges whose weight falls below the coherence threshold are pruned, keeping the knowledge graph focused on active, relevant contexts. |