Skip to main content

Memory Hierarchies

Reeflect implements a cognitive science-inspired memory hierarchy that mimics human memory systems.

Memory Types

Episodic Memory

Memories of specific events, conversations, or interactions tied to a particular time and context.

Semantic Memory

General knowledge, facts, and concepts that aren't tied to specific events but represent consolidated knowledge.

Procedural Memory

Step-by-step knowledge of how to perform actions or tasks, often represented as sequences or instructions.

Memory Consolidation

Reeflect automatically consolidates episodic memories into semantic knowledge through a background process:

# Configure memory consolidation
from reeflect.intelligence.consolidation import MemoryConsolidator

consolidator = MemoryConsolidator(memory_system)

# Run consolidation process
consolidated_memories = consolidator.consolidate(
source_namespace="user_conversations",
target_namespace="user_knowledge",
min_occurrences=2,
time_window_days=30
)

Memory Decay

The system can simulate natural memory decay, reducing the importance of memories that haven't been accessed recently:

# Configure memory decay
from reeflect.intelligence.decay import MemoryDecayManager

decay_manager = MemoryDecayManager(memory_system)

# Apply decay to old memories
decay_manager.apply_decay(
namespace="user_conversations",
decay_rate=0.1, # 10% importance reduction
min_age_days=30,
min_importance=0.2 # Never decay below this threshold
)

Next Steps

Now that you understand the core components of Reeflect, you can explore advanced features like Memory Reasoning to see how the system uses stored memories to generate insights.