Agent_Memory_Techniques  by NirDiamant

LLM agent memory techniques

Created 6 days ago

New!

283 stars

Top 92.1% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

This repository addresses the critical challenge of memory in Large Language Model (LLM) agents, which often forget context, hindering personalization and coherence. It offers a comprehensive collection of 30 runnable Jupyter notebooks demonstrating diverse agent memory techniques, from basic conversation buffers to advanced cognitive architectures and production patterns. Aimed at engineers, researchers, and power users, this resource provides practical, hands-on experience to build more capable and context-aware AI agents.

How It Works

The project's core approach is a structured, hands-on exploration of 30 distinct memory techniques, each presented in a dedicated Jupyter notebook. These techniques are systematically categorized into six families: Short-term context management, Long-term storage, Cognitive architectures, Retrieval and multi-agent patterns, Batteries-included frameworks, and Evaluation & production deployment patterns. This modular design allows users to learn foundational concepts before progressing to more complex systems, with runnable code enabling direct experimentation and implementation.

Quick Start & Requirements

  • Primary install/run command: Clone the repository, create and activate a Python virtual environment, install dependencies via pip install -r requirements.txt, and launch Jupyter notebooks (e.g., jupyter notebook all_techniques/01_conversation_buffer_memory/).
  • Non-default prerequisites: Python 3.x environment, API keys (OPENAI_API_KEY, ANTHROPIC_API_KEY) configured in a .env file.
  • Links: Notebooks are directly renderable on GitHub, and Colab badges allow cloud execution.

Highlighted Details

  • Covers 30 techniques across six families, including conversation buffers, vector stores, knowledge graphs, episodic/semantic memory, and working memory.
  • Provides hands-on examples for leading frameworks like MemGPT (Letta), Mem0, Zep, and Graphiti.
  • Includes evaluation tools and benchmarks such as LoCoMo and LongMemEval for assessing memory performance.
  • Offers structured learning paths for beginners, intermediate users, advanced practitioners, and those focused on production deployment.

Maintenance & Community

Contributions are welcomed, with clear guidelines provided in .github/CONTRIBUTING.md. The project is part of a larger ecosystem of related repositories by the author, including "RAG Techniques" and "GenAI Agents." Sponsorships are acknowledged.

Licensing & Compatibility

Licensed under the Apache License 2.0, this project is generally permissive for commercial use and integration into closed-source applications.

Limitations & Caveats

The repository explicitly states it is for educational purposes and the code is not production-ready. Users are cautioned against using it directly for high-stakes applications involving regulated data, medical decisions, or legal advice without thorough review.

Health Check
Last Commit

6 days ago

Responsiveness

Inactive

Pull Requests (30d)
1
Issues (30d)
0
Star History
283 stars in the last 6 days

Explore Similar Projects

Feedback? Help us improve.