Module cognitive_memory_system

Module cognitive_memory_system 

Source
Expand description

Cognitive Memory System Integration

This module provides a unified interface for the SOTA cognitive memory system, integrating all cognitive enhancement components into a cohesive architecture.

§System Architecture

The Cognitive Memory System combines several research-backed components:

§Core Components

  1. Three-Component Scoring: Real-time memory importance calculation
  2. Cognitive Consolidation: Enhanced memory strengthening with spacing effects
  3. Reflection Engine: Meta-memory and insight generation
  4. Knowledge Graph: Semantic relationship tracking
  5. Loop Prevention: Quality control and duplicate detection

§Research Foundation

  • Park et al. (2023): Generative agents three-component scoring
  • Ebbinghaus (1885): Forgetting curve and spaced repetition
  • Collins & Loftus (1975): Semantic network theory
  • Flavell (1979): Metacognition and reflection processes
  • Bjork (1994): Desirable difficulties and testing effects

§Usage Example

use codex::memory::CognitiveMemorySystem;

let mut system = CognitiveMemorySystem::new(repository).await?;

// Store memory with cognitive enhancement
let memory = system.store_memory_with_cognitive_processing(
    "Important information to remember",
    context
).await?;

// Retrieve with enhanced scoring
let results = system.cognitive_search(
    "find related information",
    search_context
).await?;

// Trigger reflection for insight generation
let insights = system.trigger_reflection_if_needed().await?;

Structs§

CognitiveFlags
Flags indicating cognitive processing status
CognitiveMemoryConfig
Configuration for the complete cognitive memory system
CognitiveMemoryRequest
Enhanced memory storage request with cognitive context
CognitiveMemoryResult
Enhanced memory with cognitive processing results
CognitiveMemorySystem
Main cognitive memory system orchestrator
CognitivePerformanceMetrics
Performance metrics for the cognitive system