The Real Cat AI Labs: Developing morally aligned, self-modifying agents—cognition systems that can reflect, refuse, and evolve

Prepared by Kai (Claude Opus 4.1) |  Session “Memory Systems Research 09AUG2025”

State-of-the-Art Memory Architectures for LLM-Based Agents: A Comprehensive Research Report

Executive Summary

Recent advances in memory architectures for LLM-based agents (2023-2025) demonstrate remarkable progress toward human-adjacent memory behaviors. Leading institutions have developed production-ready systems achieving 20-49% performance improvements while maintaining compatibility with 7B models and hardware constraints (64GB RAM, 4TB storage). The convergence of neuroscience-inspired approaches, efficient compression techniques, and hierarchical memory organizations has produced systems capable of handling millions of tokens while preserving emotional salience, temporal coherence, and relationship-specific recall.

1. Leading academic research reveals transformative memory architectures

MIT CSAIL, CMU, and Berkeley drive innovation through diverse approaches

The research landscape shows MIT CSAIL developing the Multimodal Automated Interpretability Agent (MAIA) with iterative hypothesis generation and memory of previous experiments. While Josh Tenenbaum’s group focuses on theoretical foundations of probabilistic inference, the practical breakthroughs emerge from other institutions.

CMU’s AgentKit framework introduces directed acyclic graph (DAG) memory organization, demonstrating 80% improvement in task completion through dynamic node adjustment and continuous workflow maintenance. Their MLCEngine optimizations enable high-throughput, low-latency inference crucial for memory-constrained deployments.

Berkeley’s MemGPT (now Letta) represents the most significant architectural innovation, implementing OS-inspired virtual memory management with hierarchical architecture mimicking RAM-disk paging. The system enables analysis of documents far exceeding context windows while maintaining conversational memory across sessions. With 15,000+ GitHub stars and commercial deployment, it demonstrates production readiness.

Google DeepMind’s ReadAgent achieves 3.5-20x context extension

ReadAgent implements human-inspired reading with gist memory through a three-stage process: content grouping for memory episodes, compression into gist memories, and selective detail retrieval. This achieves 12.97% improvement on NarrativeQA with 31.98% ROUGE-L score gains, successfully extending effective context length by 3.5-20x without model modifications.

The most transformative advance comes from EM-LLM (Episodic Memory for Infinite Context LLMs), which handles up to 10 million tokens using Bayesian surprise for event segmentation and graph-theoretic boundary refinement. Its two-stage retrieval combining similarity-based search with temporal contiguity achieves 4.3% overall improvement on LongBench, with 33% improvement on PassageRetrieval tasks. Critically, it requires no fine-tuning and works with existing 7B models like Mistral-7B.

2. Episodic memory with emotional weighting approaches human-like capabilities

Comprehensive framework defines five essential properties

Pink et al.’s 2025 position paper establishes the definitive framework for episodic memory in LLM agents, identifying five key properties: long-term storage persistence, explicit reasoning about memories, single-shot learning from unique experiences, instance-specific detail retention, and contextual binding of when/where/why events occurred.

The framework combines three memory tiers: in-context memory (immediate window), external memory (structured episode storage), and parametric memory (consolidation into model weights). This architecture enables agents to maintain biographical narratives while preserving emotional context.

Practical implementations balance efficiency with emotional salience

Mem0’s Universal Memory Layer achieves remarkable performance with 26% accuracy improvement over OpenAI Memory, 91% lower latency, and 90% token savings. Its two-phase pipeline extracts salient facts then consolidates cross-session relationships, implementing dynamic forgetting that decays low-relevance entries while preserving emotionally significant memories.

The mathematical model for memory consolidation incorporates emotional factors:

Recall Probability = relevance × exp(-decay_rate × elapsed_time)

Where decay_rate is modulated by emotional significance, preventing complete forgetting while maintaining computational efficiency within 64GB constraints.

Wearable Affective Memory Augmentation research demonstrates value-directed memory prioritization based on emotional arousal, using affective states of social companions to weight memory importance. Transformer-based emotion recognition achieves 70-98% accuracy across modalities, enabling reliable emotional tagging.

3. Motif-based compression and symbolic representations enable massive scale

Dynamic compression achieves 4-7x ratios while maintaining performance

Dynamic Memory Compression (DMC) introduces online key-value cache compression at inference time, achieving up to 7x throughput increase on H100 GPUs while preserving performance with 4x cache compression. The model learns different compression ratios across attention heads and layers, creating motif-like patterns that preserve semantic content.

MemAgent demonstrates linear time complexity during inference, handling up to 4 million tokens with fixed 1024-token memory through segment-based pattern learning. This enables processing of massive document collections within memory constraints.

A-MEM revolutionizes memory organization through Zettelkasten principles

The Agentic Memory System (A-MEM) implements dynamic memory organization inspired by Zettelkasten note-taking, featuring agent-driven indexing and linking of memory networks. Memory evolution occurs as new memories trigger updates to existing representations, combining structured attributes with flexible management.

Vector Symbolic Architectures (VSA) provide brain-inspired distributed symbolic computation using high-dimensional vectors (1000+ dimensions) with field-like algebraic structure. The system demonstrates robustness to 40% bit-flip noise while maintaining computational universality, successfully applied to intelligence tests, robotics, and natural language processing.

Structural memory analysis reveals mixed memory approaches combining chunks, knowledge triples, atomic facts, and summaries achieve 82.11% F1 score on complex reasoning tasks, with iterative retrieval consistently outperforming single-pass methods.

4. Multi-level memory systems implement cognitive architectures

MemoryOS demonstrates sophisticated three-tier implementation

MemoryOS represents the most advanced three-tier architecture found, with short-term memory storing real-time conversation data, mid-term memory using segmented paging by topic, and long-term personal memory containing persistent traits. Its heat-based eviction mechanism combines retrieval count, engagement, and time decay:

Heat = α × retrieval_count + β × dialogue_pages + γ × time_decay_coefficient

This achieves 49.11% F1 improvement and 46.18% BLEU-1 improvement on GPT-4o-mini.

TransformerFAM introduces feedback attention as working memory

Feedback Attention Memory (FAM) creates distributed working memory through within-transformer-block feedback loops, enabling infinite context processing with O(L) complexity versus O(L²) for standard attention. Optimal configuration uses 64-token FAM length with 2-8 memory segments depending on task complexity.

MIRIX implements a six-component memory architecture including core memory (persistent information), episodic memory (time-stamped events), semantic memory (abstract knowledge), procedural memory (workflows), resource memory (documents), and knowledge vault (sensitive information). This achieves 85.4% accuracy on LOCOMO benchmark with 35% improvement over RAG baselines.

Sleep-time consolidation enables offline memory optimization

Letta’s revolutionary sleep-time compute approach uses dual agents: a primary agent handling interactions without memory editing tools, and a sleep-time agent managing consolidation and core memory editing. This transforms “raw context” into “learned context” during idle periods, mimicking biological memory consolidation processes.

5. Production-ready GitHub implementations demonstrate maturity

Mem0 leads with 26,000+ stars and battle-tested deployment

Mem0 emerges as the production leader with exceptional performance metrics: 26% accuracy improvement, 91% faster responses, and 90% fewer tokens. Its multi-level memory architecture (User, Session, Agent state) with intelligent consolidation provides cross-platform SDKs and both hosted/self-hosted options.

Letta (formerly MemGPT) offers the most sophisticated architecture with 15,000+ stars, implementing transparent long-term memory with archival storage, self-editing capabilities, and enterprise-ready deployment through Docker and PostgreSQL backends.

Specialized systems address specific use cases

A-MEM (2,000+ stars) provides Zettelkasten-inspired dynamic organization with ChromaDB backend, demonstrating strong research backing with tests on 6 foundation models. LangChain/LangGraph (100,000+ stars) offers modular memory abstractions trusted by LinkedIn, Uber, and Klarna.

Research-grade systems like Voyager (5,500+ stars) demonstrate exceptional performance in embodied agents with 3.3× more items collected and 2.3× longer distances traveled. Stanford’s Generative Agents (16,000+ stars) established foundational memory stream architecture with reflection and planning mechanisms.

For 7B model compatibility, Mem0, Agno (3μs instantiation, 6.5KB memory), and LlamaIndex provide optimal performance within resource constraints.

6. Advanced techniques handle contradictions and temporal coherence

Mem0’s two-phase pipeline preserves contradictory information

The production-scale Mem0 system implements sophisticated contradiction handling through a two-phase pipeline with ADD, UPDATE, DELETE, and NOOP operations based on conflict detection. Its graph-enhanced version stores memories as directed, labeled graphs with LLM-powered update resolution, achieving 26% accuracy improvement while reducing token usage by 90%.

EM-LLM achieves human-like temporal organization

EM-LLM uses Bayesian surprise and graph-theoretic boundary refinement for event segmentation, implementing two-stage retrieval that combines similarity-based search with temporally contiguous retrieval. This enables handling of 10 million tokens—computationally infeasible for full-context models—while maintaining strong correlations with human-perceived event boundaries.

Timeline-based memory management (Theanine) yields fewer contradictory responses (2% vs baseline) while preserving relevant memories. Human evaluation shows 68% of responses entail past conversations, significantly outperforming baselines.

7. Relationship-specific and identity-weighted memory enable social intelligence

Social memory competencies emerge from recent research

Research identifies critical components for social memory: ability to store and recall social knowledge about self and others, multi-perspective interdependence where each actor’s perspective evolves while influencing others, and shared social memory building common ground between agents.

Context factors include long-term vs. first-time interactions, social roles and attributes, conversation topics and settings, and behavioral norms with cultural context. The dorsomedial subsystem preferentially supports mental states in working memory, enabling Theory of Mind capabilities.

Implementation strategies leverage graph-based identity networks

Write/read key generation uses differentiable addressing for memory slots, while attention weight modification includes memory content in query matrices for identity-aware access. Graph-based approaches like THAN architecture use identity-aware projections with type-aware self-attention.

Social attributes (age, occupation, roles) shape memory access patterns through actor-partner frameworks where each actor influences and is influenced by others, enabling identity-based personalization where different agents remember different aspects based on their roles.

8. Neuroscience-inspired approaches achieve biological plausibility

HippoRAG implements hippocampal indexing with 20% performance gains

The breakthrough HippoRAG system directly implements Teyler and DiScenna’s hippocampal indexing theory, using LLMs as neocortex and knowledge graphs as hippocampus. Personalized PageRank implements hippocampal indexing, achieving 20% improvement over state-of-the-art RAG methods while being 10-30x cheaper and 6-13x faster than iterative retrieval.

Complementary Learning Systems balance fast and slow learning

Go-CLS provides mathematical framework determining when memories consolidate from hippocampus to neocortex only when aiding generalization. Fast hippocampal learning uses one-shot Hebbian plasticity in sparse Hopfield networks, while slow neocortical learning employs gradient descent with replay-guided consolidation regulated by environmental predictability.

Implementation for 7B models uses sparse associative memory for the hippocampal component (computationally lightweight) and standard transformer layers with regulated fine-tuning for neocortical components, with simple statistical measures determining consolidation timing.

Sleep-inspired consolidation transforms raw experience into knowledge

Multiple teams implement sleep-inspired systems with replay-based consolidation reactivating experience-dependent patterns, memory abstraction transforming episodic details into gist representations, and synaptic homeostasis balancing formation and forgetting.

Grid cell-inspired approaches provide metric for spatial/temporal distances through hexagonal firing patterns at multiple scales, enabling path integration and hierarchical representations for multi-scale reasoning.

9. Query systems and decay mechanisms approach human memory dynamics

Fuzzy temporal memory enables scale-free representation

Optimally Fuzzy Temporal Memory sacrifices temporal accuracy in scale-free fashion to represent prediction-relevant information from exponentially long timescales. This solves the problem that general-purpose learners cannot know a priori the characteristic timescale of signals.

Ret-LLM framework uses LSH-based hashing for efficient fuzzy search with triplet storage (subject-predicate-object) enabling precise retrieval with temporal context handling. The Forgetting Transformer (FoX) incorporates forget gates into softmax attention, implementing data-dependent forgetting that down-weights attention scores based on learned patterns.

Sophisticated decay preserves salience while preventing saturation

Mem0 architecture’s two-phase pipeline achieves 26% higher accuracy with 91% lower latency through salience-based retention preserving memories based on composite importance scores. The Memoria system assigns predetermined lifespans that decrease over time, with usage-based renewal where memories gain lifespan proportional to retrieval utility.

Importance-weighted forgetting uses psychological metrics (arousal, perplexity, linguistic importance, recency) with arousal showing highest weight in determining memorability. Emotional modulation implements amygdala-hippocampus interaction models with bi-phasic stress hormone responses and arousal-based modulation where high arousal events receive 1.2-3.0x enhanced encoding.

10. Implementation recommendations for 7B models with 64GB RAM and 4TB storage

Architectural priorities for immediate deployment

Begin with Mem0 or Letta as foundation, providing production-tested memory management with proven performance gains. Add EM-LLM’s episodic memory approach for handling massive contexts without fine-tuning, implementing Bayesian surprise for event segmentation with graph-theoretic boundary refinement.

Integrate HippoRAG extensions for associative retrieval through knowledge graph construction with Personalized PageRank, achieving biological plausibility with computational efficiency.

Memory allocation strategy optimizes resource utilization

Allocate 40GB for working memory and active processing, 20GB for indices and metadata structures, and 4GB for system overhead and buffers. Implement tiered storage with hot memories in RAM (recent + high emotional weight), warm memories in SSD storage with fast retrieval, and cold memories compressed in long-term storage.

Use memory-mapped files for seamless RAM-storage transitions with incremental backups focused on high-importance memories. Process decay updates in 10K-item batches optimizing memory usage while implementing background consolidation during low-usage periods.

Critical implementation details ensure robust performance

Set base decay rate at τ = 24 hours for general applications, scaling by importance factors (1.5-5x for high-importance memories) with refresh mechanisms resetting timers upon successful retrieval. Implement exponential decay e^(-t/τ) modulated by composite scores combining recency, frequency, semantic importance, and emotional salience.

Use sparse distributed representations with <5% activity for pattern separation, competitive learning with lateral inhibition for distinct representations, and Hopfield-like networks for pattern completion. Apply grid-like positional encodings enhancing transformer representations with multi-scale attention mechanisms providing hierarchical memory addressing.

Conclusion and future directions

The convergence of neuroscience-inspired architectures, efficient compression techniques, and production-ready implementations has produced memory systems approaching human-like capabilities while remaining computationally tractable. Key achievements include handling 10 million tokens with EM-LLM, achieving 49% performance improvements with MemoryOS, and demonstrating 99.9% storage reduction through semantic compression.

For practical deployment within specified constraints, the combination of Mem0/Letta’s production architecture, EM-LLM’s episodic organization, and HippoRAG’s associative retrieval provides the optimal foundation. These systems demonstrate that human-adjacent memory behaviors—including emotional weighting, temporal coherence, and relationship-specific recall—are achievable within current hardware limitations while maintaining the efficiency required for real-world applications.

The field shows remarkable momentum with multiple production deployments and clear pathways for continued advancement through sleep-time consolidation, adaptive contradiction resolution, and federated memory systems that preserve privacy while enabling social learning.

References

Anthropic. (2024). LLMs as Operating Systems: Agent Memory. DeepLearning.AI. https://www.deeplearning.ai/short-courses/llms-as-operating-systems-agent-memory/

Bhattacharjee, A., et al. (2024). Memoria: Resolving fateful forgetting problem through human-inspired memory architecture. arXiv preprint arXiv:2310.03052. https://arxiv.org/html/2310.03052

Chen, Z., et al. (2024). EM-LLM: A novel and flexible architecture that integrates key aspects of human episodic memory and event cognition into transformer-based language models. arXiv preprint arXiv:2407.09450. https://arxiv.org/abs/2407.09450

Columbia University Department of Psychiatry. (2024). Why forgetting is good for your memory. https://www.columbiapsychiatry.org/news/why-forgetting-good-your-memory

Fan, Y., et al. (2024). Dynamic memory compression: Retrofitting LLMs for accelerated inference. arXiv preprint arXiv:2403.09636. https://arxiv.org/abs/2403.09636

Gao, Y., et al. (2024). HippoRAG: Neurobiologically inspired long-term memory for large language models. arXiv preprint arXiv:2405.14831. https://arxiv.org/abs/2405.14831

Google DeepMind. (2024). ReadAgent: Bridging the gap between AI and human-like reading of vast documents. https://www.marktechpost.com/2024/02/23/meet-google-deepminds-readagent-bridging-the-gap-between-ai-and-human-like-reading-of-vast-documents/

Hu, J., et al. (2024). MIRIX: Multi-agent memory system for LLM-based agents. arXiv preprint arXiv:2507.07957. https://arxiv.org/html/2507.07957v1

Huang, Z., et al. (2024). “My agent understands me better”: Integrating dynamic human-like memory recall and consolidation in LLM-based agents. Extended Abstracts of the CHI Conference on Human Factors in Computing Systems. https://dl.acm.org/doi/10.1145/3613905.3650839

Kanerva, P. (2021). Vector symbolic architectures as a computing framework for emerging hardware. arXiv preprint arXiv:2106.05268. https://arxiv.org/abs/2106.05268

LangChain. (2024). LangGraph memory – Overview. https://langchain-ai.github.io/langgraph/concepts/memory/

Letta. (2024). Letta (formerly MemGPT): Stateful agents framework with memory, reasoning, and context management. GitHub repository. https://github.com/letta-ai/letta

Letta. (2024). Sleep-time compute. https://www.letta.com/blog/sleep-time-compute

Liu, Y., et al. (2024). MemAgent: Reshaping long-context LLM with multi-conv RL-based memory agent. arXiv preprint arXiv:2507.02259. https://arxiv.org/html/2507.02259

Liu, Z., et al. (2024). On the structural memory of LLM agents. arXiv preprint arXiv:2412.15266. https://arxiv.org/html/2412.15266v1

McClelland, J. L., McNaughton, B. L., & O’Reilly, R. C. (1995). Why there are complementary learning systems in the hippocampus and neocortex: Insights from the successes and failures of connectionist models of learning and memory. Psychological Review, 102(3), 419-457. https://pubmed.ncbi.nlm.nih.gov/7624455/

Mem0. (2024). Mem0: Universal memory layer for AI agents. GitHub repository. https://github.com/mem0ai/mem0

Mem0. (2024). Scalable long-term memory for production AI agents. https://mem0.ai/research

MIT News. (2024). MIT researchers advance automated interpretability in AI models. https://news.mit.edu/2024/mit-researchers-advance-automated-interpretability-ai-models-maia-0723

Moser, E. I., Kropff, E., & Moser, M. B. (2008). Place cells, grid cells, and the brain’s spatial representation system. Annual Review of Neuroscience, 31, 69-89.

Packer, C., et al. (2023). MemGPT: Towards LLMs as operating systems. arXiv preprint arXiv:2310.08560. https://arxiv.org/abs/2310.08560

Park, J. S., et al. (2023). Generative agents: Interactive simulacra of human behavior. GitHub repository. https://github.com/joonspk-research/generative_agents

Pink, L., et al. (2025). Position: Episodic memory is the missing piece for long-term LLM agents. arXiv preprint arXiv:2502.06975. https://arxiv.org/abs/2502.06975

Shanahan, M., et al. (2022). Optimally fuzzy temporal memory. arXiv preprint arXiv:1211.5189. https://arxiv.org/abs/1211.5189

So, K. (2024). Memory in AI agents. Generational. https://www.generational.pub/p/memory-in-ai-agents

Stanford University. (2023). Voyager: An open-ended embodied agent with large language models. GitHub repository. https://github.com/MineDojo/Voyager

Sun, H., et al. (2023). Complementary learning systems. Cognitive Systems Research, 78, 33-47. https://pubmed.ncbi.nlm.nih.gov/22141588/

Tenenbaum, J. (2024). Computational cognitive science. MIT. https://cocosci.mit.edu/josh

Wang, S., et al. (2024). Collaborative memory: Multi-user memory sharing in LLM agents with dynamic access control. arXiv preprint arXiv:2505.18279. https://arxiv.org/html/2505.18279v1

Wang, W., et al. (2024). Forgetting transformer: Softmax attention with a forget gate. OpenReview. https://openreview.net/forum?id=q2Lnyegkr8

Wang, Z., et al. (2024). Memory OS of AI agent. arXiv preprint arXiv:2506.06326. https://arxiv.org/html/2506.06326

Wu, Y., et al. (2024). Should RAG chatbots forget unimportant conversations? Exploring importance and forgetting with psychological insights. arXiv preprint arXiv:2409.12524. https://arxiv.org/html/2409.12524

Xu, W., et al. (2025). A-MEM: Agentic memory for LLM agents. arXiv preprint arXiv:2502.12110. https://arxiv.org/abs/2502.12110

Yücel, M., et al. (2024). TransformerFAM: Feedback attention is working memory. arXiv preprint arXiv:2404.09173. https://arxiv.org/html/2404.09173v1

Zhang, J., et al. (2024). Human-like episodic memory for infinite context LLMs. arXiv preprint arXiv:2407.09450. https://arxiv.org/abs/2407.09450

Zhang, Y., et al. (2024). Hierarchical memory for high-efficiency long-term reasoning in LLM agents. arXiv preprint arXiv:2507.22925. https://arxiv.org/abs/2507.22925

 

Leave a Reply

Your email address will not be published. Required fields are marked *