Skip to content

Latest commit

 

History

History
292 lines (190 loc) · 14.5 KB

File metadata and controls

292 lines (190 loc) · 14.5 KB

Agent Memory Systems

Agent memory turns the default stateless chat into a persistent, learning system. It captures what the user said yesterday (episodic), what the world is (semantic), and what the agent is doing right now (working), then compresses and retrieves the right context at the right time.

This page covers the open-source memory layer — from hosted APIs and graph-backed runtimes to the educational notebooks that teach the concepts — and shows how each piece fits into a complete agent stack.

Why this matters

Most LLM agents start every conversation as strangers. Without memory, they cannot remember user preferences, reuse past decisions, or recover from earlier mistakes. A robust memory layer solves that by storing, indexing, and retrieving context across sessions. It sits between the agent runtime and the evaluation layer: the runtime writes experience, the memory system organizes it, and the evaluation layer measures whether recalled context actually improves task outcomes. If you are building or benchmarking agents, you will eventually hit the limits of prompt stuffing and need a real memory architecture. That is where these projects come in.


Must Learn

These are the foundational memory systems every agent engineer should study.

mem0ai/mem0

Universal memory layer for AI agents with user/professional identity, adaptive personalization, and broad framework integrations.

Why it matters: Mem0 has become the de facto memory API for agents; it powers long-term identity across OpenAI, LangChain, CrewAI and others and is actively maintained by its creators.

Stats: ⭐ 60891 / 🍴 7093 / last commit 2026-07-15 / activity: Active

Learning priority: 5 · Difficulty: Intermediate

Tags: memory-layer, long-term-memory, agent-memory, universal-memory, personalization, rag

What to learn from it:

  • How to expose memory as a framework-agnostic API that OpenAI, LangChain, and CrewAI can all call.
  • How to model user identity and professional context as first-class memory objects.
  • The trade-offs between adaptive personalization and privacy in a hosted memory service.
  • Integration patterns for adding memory to existing agents without rewriting their runtimes.

topoteretes/cognee

Open-source self-hosted AI memory platform that builds a knowledge graph from conversations and documents for persistent agent memory.

Why it matters: Cognee is a leading fully-open memory runtime: it stores, retrieves, and reasons over memories with graph + vector backends, and is the highest-starred dedicated memory repo in the open-source agent space.

Stats: ⭐ 27933 / 🍴 2760 / last commit 2026-07-15 / activity: Active

Learning priority: 5 · Difficulty: Intermediate

Tags: knowledge-graph, memory-runtime, self-hosted, graph-rag, ai-memory

What to learn from it:

  • How to combine knowledge graphs and vector search into a single memory retrieval stack.
  • The self-hosted deployment model for memory when data residency matters.
  • How to ingest both conversations and documents into a unified memory graph.
  • Trade-offs between graph reasoning and pure vector retrieval for long-term agent memory.

letta-ai/letta

Stateful agent platform (formerly MemGPT) with advanced memory management, self-editing memory, and long-context reasoning.

Why it matters: Letta/MemGPT pioneered agent memory as a first-class primitive; its memory system (core memory, archival, recall) is one of the most referenced architectures in agent research.

Stats: ⭐ 23804 / 🍴 2521 / last commit 2026-07-03 / activity: Active

Learning priority: 5 · Difficulty: Advanced

Tags: stateful-agents, memgpt, memory-management, long-context, self-improvement

What to learn from it:

  • The classic MemGPT memory architecture: core memory, archival storage, and recall retrieval.
  • How an agent can self-edit its own memory instead of relying on external prompts.
  • Techniques for long-context reasoning when the working context exceeds model limits.
  • Why stateful agents are harder to evaluate and how that connects to the Evaluation Layer.

Strongly Recommended

These projects are highly valuable, specialized, or practical for production work.

getzep/graphiti

Real-time knowledge graph building library designed for agent memory and RAG.

Why it matters: Graphiti lets agents ingest streaming facts and update a temporal knowledge graph, bridging episodic memory and structured retrieval in a single open library.

Stats: ⭐ 28750 / 🍴 2903 / last commit 2026-07-15 / activity: Active

Learning priority: 4 · Difficulty: Intermediate

Tags: knowledge-graph, real-time, graph-rag, agent-memory, temporal-graph

What to learn from it:

  • How to build a knowledge graph incrementally from streaming observations.
  • The role of temporal edges in tracking facts that change over time.
  • Where graph-based RAG outperforms plain vector search for agent recall.
  • Integration patterns for real-time memory updates in long-running agents.

supermemoryai/supermemory

Fast, scalable, locally-runnable memory and context engine with a memory API and web app.

Why it matters: SuperMemory packages memory into a deployable API and app, demonstrating how to serve personal/agent memory at scale with modern TypeScript and Cloudflare primitives.

Stats: ⭐ 28387 / 🍴 2472 / last commit 2026-07-14 / activity: Active

Learning priority: 4 · Difficulty: Intermediate

Tags: memory-api, context-engine, local-first, cloudflare, typescript

What to learn from it:

  • How to ship memory as a product: API, web app, and local-first deployment.
  • Lessons from building a scalable context engine on Cloudflare primitives.
  • The developer experience of a self-contained memory service versus embedded libraries.
  • Where local-first storage fits in a multi-tenant agent architecture.

rohitg00/agentmemory

Persistent memory for AI coding agents, ranked #1 on real-world benchmarks.

Why it matters: AgentMemory is purpose-built for coding agents and IDEs, with a simple memory abstraction that plugs into Claude Code, Codex, Cursor, and OpenClaw workflows.

Stats: ⭐ 25166 / 🍴 2079 / last commit 2026-07-13 / activity: Active

Learning priority: 4 · Difficulty: Beginner

Tags: coding-agents, persistent-memory, ide-memory, agent-memory, typescript

What to learn from it:

  • The simplest way to add persistent memory to coding agents and IDEs.
  • How to design a memory API that fits naturally into Claude Code, Cursor, and Codex workflows.
  • What a beginner-friendly memory abstraction looks like without sacrificing usefulness.
  • Benchmark signals that matter for coding-agent memory beyond raw retrieval accuracy.

TencentCloud/TencentDB-Agent-Memory

Fully local long-term memory for AI agents using a 4-tier progressive pipeline with no external API dependencies.

Why it matters: It demonstrates how a major cloud vendor packages local-first agent memory entirely in TypeScript, useful for studying enterprise-grade memory pipelines.

Stats: ⭐ 8933 / 🍴 820 / last commit 2026-07-14 / activity: Active

Learning priority: 3 · Difficulty: Intermediate

Tags: local-first, long-term-memory, typescript, enterprise, agent-memory

What to learn from it:

  • A 4-tier progressive pipeline for local long-term memory without cloud APIs.
  • How a cloud vendor structures memory for enterprise deployment constraints.
  • The interplay between compression tiers and retrieval cost in local-first systems.
  • What no-external-dependency memory means for compliance and offline agents.

getzep/zep

Long-term memory store and platform for LLM applications with entity extraction, summarization, and classification.

Why it matters: Zep is one of the earliest production-grade long-term memory backends for LLM apps and remains a solid reference for memory-as-a-service architecture.

Stats: ⭐ 4754 / 🍴 640 / last commit 2026-07-10 / activity: Active

Learning priority: 4 · Difficulty: Intermediate

Tags: long-term-memory, memory-store, entity-extraction, summarization, classification

What to learn from it:

  • The architecture of a memory-as-a-service platform for LLM applications.
  • How entity extraction, summarization, and classification feed into retrieval.
  • Lessons from one of the earliest production-grade memory stores.
  • Where memory-as-a-service makes sense versus embedded memory libraries.

langchain-ai/langmem

LangChain library for adding long-term memory to agents with built-in memory management tools.

Why it matters: Langmem standardizes memory tooling inside the LangChain ecosystem, making it a natural choice for developers already using LangGraph/LangChain.

Stats: ⭐ 1562 / 🍴 176 / last commit 2026-07-15 / activity: Active

Learning priority: 4 · Difficulty: Intermediate

Tags: langchain, langgraph, long-term-memory, agent-tools

What to learn from it:

  • How memory management is exposed as tools inside a LangChain/LangGraph agent.
  • The idiomatic way to add long-term memory without leaving the LangChain ecosystem.
  • Patterns for memory read/write tools that the agent can invoke itself.
  • When library-level memory beats a separate memory service and vice versa.

NirDiamant/Agent_Memory_Techniques

Educational collection of 30 runnable notebooks covering buffers, vector stores, knowledge graphs, episodic/semantic memory, and production patterns.

Why it matters: This is the best open learning resource for agent memory; it directly compares MemGPT, Mem0, Letta, Zep, Graphiti, and RAG techniques.

Stats: ⭐ 788 / 🍴 104 / last commit 2026-07-14 / activity: Active

Learning priority: 4 · Difficulty: Beginner

Tags: education, notebooks, episodic-memory, semantic-memory, vector-stores, knowledge-graphs

What to learn from it:

  • A hands-on tour of buffers, vector stores, and knowledge graphs for memory.
  • Direct comparisons of MemGPT, Mem0, Letta, Zep, and Graphiti in runnable form.
  • How episodic and semantic memory differ in implementation and retrieval.
  • Production patterns to borrow before committing to a single memory backend.

Emerging

No repositories in the current dataset are classified as Emerging. This section is reserved for newer memory systems that show promise but have not yet reached production maturity or broad adoption.

Historical

No repositories in the current dataset are classified as Historical. This section is reserved for earlier projects that shaped the discourse but are no longer actively maintained or have been superseded.


Comparison Table

Repo ⭐ Stars Language License Last Commit Activity Difficulty Ranking
mem0ai/mem0 60891 TypeScript Apache-2.0 2026-07-15 Active Intermediate Must Learn
topoteretes/cognee 27933 Python Apache-2.0 2026-07-15 Active Intermediate Must Learn
letta-ai/letta 23804 Python Apache-2.0 2026-07-03 Active Advanced Must Learn
getzep/graphiti 28750 Python Apache-2.0 2026-07-15 Active Intermediate Strongly Recommended
supermemoryai/supermemory 28387 TypeScript MIT 2026-07-14 Active Intermediate Strongly Recommended
rohitg00/agentmemory 25166 TypeScript Apache-2.0 2026-07-13 Active Beginner Strongly Recommended
TencentCloud/TencentDB-Agent-Memory 8933 TypeScript NOASSERTION 2026-07-14 Active Intermediate Strongly Recommended
getzep/zep 4754 Python Apache-2.0 2026-07-10 Active Intermediate Strongly Recommended
langchain-ai/langmem 1562 Python MIT 2026-07-15 Active Intermediate Strongly Recommended
NirDiamant/Agent_Memory_Techniques 788 Jupyter Notebook Apache-2.0 2026-07-14 Active Beginner Strongly Recommended

Memory Architecture

graph TD
    A[User & Environment] -->|observations, documents, feedback| B[Ingestion]
    B --> C{Compression & Extraction}
    C --> D[Episodic Memory<br>past conversations]
    C --> E[Semantic Memory<br>facts, entities, user profile]
    C --> F[Working Memory<br>current task context]
    C --> G[Procedural Memory<br>tools, skills, patterns]
    D --> H[(Vector / Graph Store)]
    E --> I[(Knowledge Graph)]
    F --> J[(Short-term Buffer)]
    G --> K[(Skill / Tool Registry)]
    H --> L[Retrieval]
    I --> L
    J --> L
    K --> L
    L -->|ranked context| M[Agent / LLM]
    M -->|action + memory writes| A
    M --> N[[Evaluation Layer]]
Loading

Recommended Learning Order

  1. NirDiamant/Agent_Memory_Techniques — start with the notebooks to learn memory concepts hands-on.
  2. rohitg00/agentmemory — see how easy persistent memory can be in coding agents.
  3. mem0ai/mem0 — learn the dominant framework-agnostic memory API.
  4. getzep/zep — study the memory-as-a-service backend architecture.
  5. supermemoryai/supermemory — see memory packaged as a deployable product.
  6. getzep/graphiti — dive into real-time temporal knowledge graphs.
  7. topoteretes/cognee — build a self-hosted graph + vector memory runtime.
  8. langchain-ai/langmem — add memory tools inside the LangChain ecosystem.
  9. TencentCloud/TencentDB-Agent-Memory — explore a local-first enterprise pipeline.
  10. letta-ai/letta — master the most advanced self-editing memory architecture.

When to use which

  • Need a drop-in memory API for any agent? Use mem0ai/mem0.
  • Already on LangChain/LangGraph? Use langchain-ai/langmem.
  • Need a self-hosted graph memory you control? Use topoteretes/cognee.
  • Building a coding agent or IDE plugin? Use rohitg00/agentmemory.
  • Want streaming, real-time knowledge graphs? Use getzep/graphiti.
  • Prefer a hosted memory platform? Use getzep/zep.
  • Need local-first / no-cloud memory? Use TencentDB-Agent-Memory.
  • Researching advanced self-editing memory? Use letta-ai/letta.

Cross-links


Last updated: 2026-07-16