NirDiamant/Agent_Memory_Techniques
Agent memory for LLMs: 30 runnable Jupyter notebooks covering conversation buffers, vector stores, knowledge graphs, episodic and semantic memory, MemGPT, Mem0, Letta, Zep, Graphiti, LoCoMo benchmarks, and production patterns.
What it solves
AI agents typically suffer from "forgetting," where they lose context across conversation turns, sessions, or tasks. This project provides a comprehensive guide to implementing memory systems that allow LLM-based agents to personalize interactions, learn from past experiences, and maintain coherence over long-term engagements.
How it works
The repository organizes 30 distinct memory techniques into six functional families, each implemented as a runnable Jupyter notebook:
- Short-term: Manages the immediate context window using buffers, sliding windows, and summaries.
- Long-term: Persists knowledge across sessions via vector stores, entity tracking, knowledge graphs, and episodic/semantic/procedural memory.
- Cognitive Architectures: Implements human-like memory patterns such as working memory, hierarchical layers, consolidation, and self-reflection.
- Retrieval & Routing: Determines how and when to recall specific information.
- Frameworks: Integrates production-ready libraries like Mem0, Letta (MemGPT), Zep, and Graphiti.
- Evaluation & Production: Focuses on benchmarking and deploying memory systems.
Who it’s for
Developers and AI researchers building LLM agents who need to move beyond simple chat histories to create persistent, personalized, and cognitively capable AI systems.
Highlights
- 30 Runnable Notebooks: Practical, code-first implementations of every major memory pattern.
- Structured Taxonomy: A clear categorization of techniques from basic buffers to complex cognitive architectures.
- Decision Tree: A visual guide to help users select the right memory technique based on their specific project goals.
- Broad Framework Support: Coverage of modern memory infrastructure including Mem0, Letta, and Zep.