This document provides an overview of all memory implementations in the MultiMind SDK, including their status and key features.
-
Base Memory (
BaseMemory)- Abstract base class for all memory implementations
- Defines core memory interface and common functionality
-
Conversation Memory
BufferMemory: Stores conversation history in a bufferBufferWindowMemory: Maintains a sliding window of conversation historySummaryMemory/SummaryBufferMemory: Maintain summarized conversation history
-
Entity Memory (
EntityMemory)- Stores and retrieves information about entities
- Maintains relationships between entities
-
Vector Store Memory (
VectorStoreMemory)- Implements vector-based similarity search
- Uses embeddings for efficient memory retrieval
-
Knowledge Graph Memory (
KnowledgeGraphMemory)- Stores information in a graph structure
- Maintains relationships and semantic connections
-
Time-Weighted Memory (
TimeWeightedMemory)- Implements time-based memory decay
- Prioritizes recent memories
-
Token Buffer Memory (
TokenBufferMemory)- Manages memory based on token count
- Implements token-based memory limits
-
Hybrid Memory (
HybridMemory)- Combines multiple memory types
- Provides unified interface for different memory systems
-
Hierarchical Memory (
HierarchicalMemory)- Organizes memories in a hierarchical structure
- Supports multi-level memory access
-
Contextual Memory (
ContextualMemory)- Maintains context-aware memory retrieval
- Supports contextual relevance scoring
-
Episodic Memory (
EpisodicMemory)- Stores event-based memories
- Maintains temporal sequence of events
-
Semantic Memory (
SemanticMemory)- Stores conceptual knowledge
- Implements semantic similarity search
-
Procedural Memory (
ProceduralMemory)- Stores action sequences and procedures
- Maintains skill-based knowledge
-
Working Memory (
WorkingMemory)- Implements short-term memory processing
- Manages active cognitive tasks
-
Associative Memory (
AssociativeMemory)- Implements pattern-based memory retrieval
- Maintains associative connections
-
Emotional Memory (
EmotionalMemory)- Stores emotionally significant memories
- Implements emotional valence tracking
-
Declarative Memory (
DeclarativeMemory)- Stores factual knowledge
- Implements explicit memory retrieval
-
Spatial Memory (
SpatialMemory)- Stores spatial relationships
- Implements spatial reasoning
-
Temporal Memory (
TemporalMemory)- Manages time-based memory organization
- Implements temporal reasoning
-
Sensory Memory (
SensoryMemory)- Stores sensory information
- Implements sensory processing
-
Forgetting Curve Memory (
ForgettingCurveMemory)- Implements Ebbinghaus forgetting curve
- Manages memory decay over time
-
Novelty Memory (
NoveltyMemory)- Tracks novel information
- Implements novelty detection
-
Versioned Memory (
VersionedMemory)- Maintains memory versions
- Implements version control for memories
-
Event-Sourced Memory (
EventSourcedMemory)- Stores memory as event sequences
- Implements event-based memory reconstruction
-
Cognitive Scratchpad Memory (
CognitiveScratchpadMemory)- Implements temporary working memory
- Manages active cognitive processing
-
Federated Memory (
FederatedMemory)- Implements distributed memory storage
- Supports privacy-preserving memory sharing
-
Active Learning Memory (
ActiveLearningMemory)- Implements active learning for memory
- Optimizes memory acquisition
-
Differentiable Neural Computer Memory (
DNCMemory)- Implements DNC architecture
- Supports complex memory operations
-
Meta Memory (
MetaMemory)- Manages memory about memories
- Implements memory self-awareness
-
Sketch Memory (
SketchMemory)- Implements approximate memory storage
- Supports efficient memory compression
-
Causal Memory (
CausalMemory)- Stores causal relationships
- Implements causal reasoning
-
Neuro-Symbolic Memory (
NeuroSymbolicMemory)- Combines neural and symbolic memory
- Supports hybrid reasoning
-
Autobiographical Memory (
AutobiographicalMemory)- Stores personal experiences
- Implements self-referential memory
-
Prospective Memory (
ProspectiveMemory)- Manages future-oriented memory
- Implements intention memory
-
Implicit Memory (
ImplicitMemory)- Stores unconscious memories
- Implements procedural learning
-
Explicit Memory (
ExplicitMemory)- Stores conscious memories
- Implements declarative learning
-
Short-Term Memory (
ShortTermMemory)- Manages temporary memory storage
- Implements working memory
-
Long-Term Memory (
LongTermMemory)- Manages permanent memory storage
- Implements persistent memory
-
Consensus Memory (
ConsensusMemory)- Implements distributed consensus
- Uses RAFT protocol for consistency
-
Reinforcement Memory (
ReinforcementMemory)- Implements memory budgeting
- Uses reinforcement learning for optimization
-
Adaptive Memory (
AdaptiveMemory)- Implements self-adapting memory
- Optimizes memory based on usage
-
Planning Memory (
PlanningMemory)- Implements memory-based planning
- Supports action planning with rollouts
-
Fast-Weight Memory (
FastWeightMemory)- Implements Hebbian learning
- Supports rapid in-context learning
- Uses weight matrix for memory storage
-
Adapter Memory (
AdapterMemory)- Implements adapter-based session memory
- Supports fine-tuning per session
- Uses adapter layers for memory adaptation
-
Hierarchical Temporal Memory (
HTMMemory)- Implements HTM architecture
- Supports sequence prediction
- Uses sparse distributed representations
-
Quantum Random-Access Memory (
QRAM)- Implements quantum memory using bucket-brigade design
- Supports coherent memory access
- Uses quantum state for addressing
- Features error correction and coherence tracking
-
Quantum Associative Memory (
QAM)- Implements quantum Hopfield network
- Supports pattern-based memory retrieval
- Uses quantum energy landscape
- Features pattern diversity tracking
-
Topological Quantum Memory (
TopologicalMemory)- Implements topological quantum memory using anyons
- Supports braiding operations for memory access
- Uses logical qubits for error protection
- Features anyon-based encoding and decoding
-
Quantum-Classical Hybrid Memory (
QuantumClassicalHybridMemory)- Implements hybrid quantum-classical memory
- Supports both quantum and classical storage
- Uses quantum enhancement for classical data
- Features adaptive encoding selection
-
Neuromorphic Spiking Memory
- Basic structure implemented
- Needs completion of spike-timing-dependent plasticity
- Requires integration with neuromorphic hardware
-
Nonparametric Bayesian Memory
- Basic clustering implemented
- Needs completion of Bayesian inference
- Requires optimization of hyperparameters
-
Topological Quantum Memory
- Basic structure implemented
- Needs completion of error protection
- Requires integration with quantum hardware
-
Neuromorphic Quantum Memory
- Basic structure implemented
- Needs completion of quantum spike timing
- Requires integration with neuromorphic hardware
-
Holographic Memory
- Holographic storage
- Interference patterns
- Distributed memory representation
-
DNA Memory
- DNA-based storage
- Molecular memory encoding
- Biological memory systems
-
Quantum-Classical Hybrid Memory
- Quantum-classical interface
- Hybrid state storage
- Quantum-enhanced classical memory
-
Neuromorphic Quantum Memory
- Quantum neuromorphic computing
- Quantum neural networks
- Quantum spike timing
FastWeightMemory and AdapterMemory require the finetune extra: pip install "multimind-sdk[finetune]".
from multimind import OpenAIModel
from multimind.memory import (
BufferMemory,
VectorStoreMemory,
HybridMemory,
FastWeightMemory, # requires multimind-sdk[finetune]
AdapterMemory, # requires multimind-sdk[finetune]
HTMMemory,
QRAM,
QAM,
TopologicalMemory,
QuantumClassicalHybridMemory
)
model = OpenAIModel(model_name="gpt-4o-mini")
# Create a conversation memory
conv_memory = BufferMemory()
# Create a vector store memory (needs an LLM for embeddings/summaries)
vector_memory = VectorStoreMemory(llm=model)
# Create a hybrid memory (routes across memory types)
hybrid_memory = HybridMemory(
llm=model,
memory_types=[BufferMemory, VectorStoreMemory]
)
# Create a fast-weight memory
fast_memory = FastWeightMemory(
input_size=768,
memory_size=1024
)
# Create an adapter memory
adapter_memory = AdapterMemory(
input_size=768,
adapter_size=64
)
# Create an HTM memory
htm_memory = HTMMemory(
input_size=1024,
num_columns=2048
)
# Create a quantum random-access memory
qram = QRAM(
num_qubits=8,
memory_size=256,
error_rate=0.01
)
# Create a quantum associative memory
qam = QAM(
num_qubits=8,
num_patterns=16,
learning_rate=0.1
)
# Create a topological quantum memory
topological_memory = TopologicalMemory(
num_qubits=8,
surface_size=32,
error_threshold=0.1
)
# Create a quantum-classical hybrid memory
quantum_hybrid_memory = QuantumClassicalHybridMemory(
num_qubits=8,
classical_size=1024,
hybrid_threshold=0.5
)
# Add a message to the hybrid memory (routed to the best memory type)
await hybrid_memory.add_message(
{"role": "user", "content": "This is an example memory"}
)
# Add memory to QRAM
await qram.add_memory(
memory_id="quantum_example",
content="This is a quantum memory example",
metadata={"type": "quantum"}
)
# Add pattern to QAM
await qam.add_memory(
memory_id="quantum_pattern",
content="This is a quantum pattern",
metadata={"type": "pattern"}
)
# Add memory to topological memory
await topological_memory.add_memory(
memory_id="topological_example",
content="This is a topological memory example",
metadata={"type": "topological"}
)
# Add memory to hybrid memory
await quantum_hybrid_memory.add_memory(
memory_id="hybrid_example",
content="This is a hybrid memory example",
metadata={"type": "hybrid"}
)
# Retrieve messages from the hybrid memory
messages = await hybrid_memory.get_messages()
# Retrieve from QRAM
qram_memory = await qram.get_memory("quantum_example")
# Retrieve from QAM
qam_memory = await qam.get_memory("quantum_pattern")
# Retrieve from topological memory
topological_result = await topological_memory.get_memory("topological_example")
# Retrieve from hybrid memory
hybrid_result = await quantum_hybrid_memory.get_memory("hybrid_example")-
Memory Selection
- Choose memory type based on use case
- Consider memory requirements
- Evaluate performance needs
-
Memory Configuration
- Configure memory parameters appropriately
- Monitor memory usage
- Optimize memory settings
-
Memory Management
- Implement proper cleanup
- Handle memory errors
- Monitor memory statistics
-
Quantum Memory Considerations
- Monitor coherence times
- Track error rates
- Implement error correction
- Consider quantum-classical interfaces
- Handle anyon braiding operations
- Manage hybrid memory allocation
To contribute new memory implementations:
- Create a new file in the
multimind/memorydirectory - Implement the memory class inheriting from
BaseMemory - Add necessary imports to
__init__.py - Update documentation
- Add tests
- Submit a pull request