Memory Systems Database
The Memory Systems Database defines how MOOD MNKY agents store, retain, and recall information across interactions. It provides the architecture for context retention, personalization, and continuous learning that enables agents to deliver coherent, personalized experiences.Purpose and Role
The Memory Systems Database defines “how” agents remember, enabling them to maintain context, recall past interactions, and deliver personalized experiences.
- Memory types and their specific purposes
- Storage mechanisms and durations
- Retrieval processes and priorities
- Memory consolidation workflows
- Privacy and data retention policies
- Memory optimization and efficiency
Schema and Structure
- Database Schema
- Example Entry
Field Descriptions
memory_id
memory_id
A unique identifier for the memory item.
agent_id
agent_id
The ID of the agent that owns this memory.
user_id
user_id
The ID of the user this memory relates to, if applicable.
memory_type
memory_type
The category of memory (short_term, working, long_term).
content
content
The actual information stored in the memory.
metadata
metadata
Additional contextual information about the memory.
created_at
created_at
When the memory was first created.
expires_at
expires_at
When the memory should expire, if applicable.
importance
importance
A value from 0-1 indicating the memory’s importance.
access_count
access_count
How many times this memory has been accessed.
last_accessed
last_accessed
When the memory was last retrieved.
tags
tags
related_memories
related_memories
embedding
embedding
Vector representation for semantic search.
Memory Types
The MOOD MNKY memory system employs a cognitive-inspired architecture with three distinct memory types:Short-term Memory
- Current conversation context
- Recent exchanges (last 10-20 messages)
- Active session information
- Temporary preferences
- Immediate task context
- Short duration (minutes to hours)
Working Memory
- Active topics and goals
- Current user needs
- Contextual knowledge
- Intermediate reasoning
- Task-specific information
- Medium duration (hours to days)
Long-term Memory
- User preferences and profile
- Historical interactions
- Recurring patterns
- Persistent knowledge
- Relationship context
- Extended duration (months to years)
Memory Operations
Memory Creation and Storage
Memory Retrieval
Integration with OpenAI Agents SDK
Memory-Aware Agent Creation
Memory MCP Server Integration
Memory Processes
Encoding
The process of creating new memories from interactions, observations, and explicit information. Includes relevance assessment, metadata tagging, and importance scoring.
Storage
The organization and persistence of memories across different systems based on memory type, including vector databases for semantic retrieval and optimized storage strategies.
Retrieval
The process of accessing relevant memories based on context, query, or task needs, using semantic search, recency weighting, and importance factors.
Consolidation
The workflow that transfers information between memory types, summarizes recurring patterns, and optimizes long-term storage for effective recall.
Forgetting
The controlled expiration of low-value or outdated memories to maintain system efficiency and comply with privacy requirements.
Reflection
The process of analyzing, connecting, and deriving insights from existing memories to improve future interactions and predictions.
Memory Storage Architecture
The MOOD MNKY memory system uses differentiated storage based on memory type requirements:- Short-term Memory
- Working Memory
- Long-term Memory
Retrieval Mechanisms
The memory system employs multiple retrieval strategies:Context-based Search
Semantic Similarity
Recency-based Access
Privacy and Data Management
Retention Policies
- Short-term: 24 hours to 7 days
- Working memory: 30-90 days
- Long-term: 1-2 years with consent
- Automated expiration enforcement
- Policy-based retention exceptions
Explicit Forgetting
- User-initiated memory deletion
- Right to be forgotten implementation
- Cascade deletion across memory types
- Audit trail of deletion requests
- Verification of complete removal
Data Minimization
- Relevance filtering during encoding
- Abstraction of personal details
- Targeted anonymization techniques
- PII detection and special handling
- Regular minimization reviews
Access Controls
- Agent-specific memory isolation
- Role-based memory access
- Cross-agent memory sharing rules
- Consent-based memory utilization
- Audit logging of memory access
Best Practices for Memory Management
Memory Design Principles
- Purpose-driven Storage: Store only information with clear future utility
- Structured Abstraction: Standardize how similar types of information are stored
- Context Enrichment: Include relevant metadata to improve retrieval accuracy
- Privacy by Design: Apply minimization and consent principles from the start
- Retrieval Optimization: Design memory formats that facilitate efficient recall
Implementation Guidelines
- Memory Types Alignment: Use appropriate memory type for information’s lifespan and importance
- Storage Technology Selection: Match storage technology to memory characteristics
- Embedding Strategy: Create consistent, high-quality embeddings for semantic search
- Consolidation Automation: Implement regular processes to optimize memory organization
- Performance Monitoring: Track and optimize memory operation performance
Testing and Validation
- Memory Recall Testing: Validate retrieval effectiveness and accuracy
- Load Testing: Ensure system performance with large memory volumes
- Privacy Compliance: Verify adherence to data protection requirements
- Forgetting Verification: Confirm complete data removal when required
- Cross-session Persistence: Verify appropriate memory retention between sessions