Memory System¶
Neuralgentics does not use a simple "vector search" for context. It implements a Trust-Weighted Semantic Memory system that separates raw data from verified patterns.
π The Trust Engine¶
Unlike standard RAG, which treats every retrieved chunk as equally valid, Neuralgentics tracks the reliability of memories.
RAW MEMORY
β
βΌ
ββββββββββββββββββββ
β INITIAL TRUST β βββ All new memories start at 0.5
ββββββββββββββββββββ
β
βΌ
ββββββββββββββββββββ β² [ +0.05 ] Agent successfully used memory
β SIGNAL ENGINE β βββββββ€ [ +0.10 ] User explicitly confirmed
ββββββββββββββββββββ βΌ [ -0.05 ] Agent ignored the memory
βΌ [ -0.10 ] User corrected the memory
β
βΌ
ββββββββββββββββββββ
β DECAY ENGINE β βββ Trust slowly fades if never used
ββββββββββββββββββββ
β
βΌ
[ ARCHIVE / PURGE ] βββ Trust < 0.3
Diagram 6 β Trust Scoring Pipeline. Every piece of information is a "hypothesis" until proven useful. Trust signals enable the system to remember how to solve a problem (high trust) while ignoring failed attempts from previous sessions.
μΈ΅ Tiered Memory Loading¶
To prevent context window saturation, Neuralgentics loads memory in three distinct tiers:
SESSION START
β
βΌ
ββββββββββββββββββββββββββββββββββββββββββββ
β TIER 0: GLOBAL SUMMARY (~100 tokens) β βββ high-trust project context
ββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
ββββββββββββββββββββββββββββββββββββββββββββ
β TIER 1: KEY DECISIONS (~2K tokens) β βββ trust β₯ 0.8; laws/rules
ββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
ββββββββββββββββββββββββββββββββββββββββββββ
β TIER 2: FULL SEMANTIC SEARCH β βββ L2 full-vector retrieval
ββββββββββββββββββββββββββββββββββββββββββββ
Diagram 7 β Tiered Memory Loading. This pyramid ensures the agent always knows the overall goal (L0) and the golden rules (L1) before diving into the specific technical details of a file (L2).
πΈοΈ Knowledge Graph (KG)¶
Beyond vectors, Neuralgentics tracks relationships between entities (Projects, Files, Agents, Skills).
ββββββββββββ ββββββββββββ
β PROJECT β ββββββ RELATED βββββββΊ β AGENT β
ββββββββββββ ββββββββββββ
β β
β SUPERSEDES β DERIVED_FROM
βΌ βΌ
ββββββββββββ ββββββββββββ
β MEMORY A β βββ CONTRADICTS ββββ β MEMORY B β
ββββββββββββ ββββββββββββ
Diagram 12 β Knowledge Graph Entity Model. The KG allows the system to handle contradictions. If Memory B is marked as
SUPERSEDESMemory A, the orchestrator will ignore A even if its vector similarity is higher.
Relationship Types¶
| Type | Description |
|---|---|
SUPERSEDES | Replace an old decision with a new one. |
PARTIAL_UPDATE | Add context to an existing memory. |
RELATED_TO | Semantic connection without hierarchy. |
CONTRADICTS | Explicit conflict (triggering a dialectic resolution). |
DERIVED_FROM | A memory based on another (e.g., summary $\rightarrow$ detail). |