10 Open-Source AI Agent Memory Projects and 3 Recommended Stacks
Explore 10 top open-source GitHub projects solving agent amnesia across sessions, featuring Mem0, Hindsight, and memU alongside 3 recommended architecture stack
Tech curator @RoundtableSpace on X has compiled a guide highlighting 10 open-source GitHub repositories that tackle agent amnesia across consecutive execution sessions. By shifting from ephemeral, stateless conversation windows toward continuous, persistent memory substrates, developers can maintain deep user context, project history, and evolving domain knowledge over extended horizons.
As autonomous LLM agents tackle increasingly complex long-horizon tasks, relying solely on sliding prompt context windows rapidly degrades performance and escalates token costs. Purpose-built memory layers solve this bottleneck by extracting, indexing, and dynamically recalling historical facts and relationships. The curated breakdown groups 10 foundational open-source tools into four functional domains, supplemented by a 6-stage lifecycle loop and three specialized production stacks.
10 Open-Source Projects Powering Agent Persistence and Knowledge
The selected projects span fundamental drop-in memory layers, knowledge graph compilation, cross-session identity preservation, and empirical memory evaluation.
1. Core Persistent Memory Infrastructure
- Mem0 (mem0ai/mem0): A drop-in persistent memory layer engineered specifically for AI agents, boasting over 66K GitHub stars. It automatically distills salient facts from multi-turn dialogues and delivers token-efficient persistent context optimized for production deployments.
- Hindsight: A long-term agent memory framework oriented around the continuous cycle of 'retain → recall → reflect'. It executes four parallel retrieval strategies per query—semantic vector search, BM25 keyword matching, knowledge graph traversal, and temporal reasoning—enabling the agent to actively reflect over accumulated past experience.
- memU (NevaMind-AI/memU): A lightweight, agent-driven long-term memory framework that organizes personal memory as an LLM Wiki. Featuring a compact core logic of roughly 500 lines, it automatically extracts reusable procedural skills from agent execution histories into structured Markdown files.
2. Turning Memory into Structured Knowledge
- Cognee: An open-source framework that ingests unstructured documents, codebases, and conversation transcripts, converting raw textual context into interconnected knowledge graphs.
- Graphiti: A temporal knowledge graph engine designed to remember facts while tracking how real-world entities, states, and relationships change over time.
- OpenViking: Dedicated context and memory infrastructure built to maintain seamless data continuity across autonomous agent workflows.
3. Maintaining Stateful Identity and Coding Memory
- Letta: A comprehensive platform for constructing stateful agents that maintain durable memory and a consistent identity across sessions.
- Letta Code: A specialized persistent memory tool for coding agents, designed to maintain development context across coding sessions.
4. Full-Stack Memory and Empirical Benchmarking
- OpenMemory: An open, composable memory infrastructure layer designed to standardize memory persistence across modern AI application stacks.
- Agent Memory Benchmark: A standardized benchmarking suite created to objectively quantify how accurately, completely, and reliably AI agents remember and recall past context.
The 6-Stage Agent Memory Loop and Architectural Mechanics
The original post outlines a 6-stage operational memory loop (the loop):
experience → remember → connect → retrieve → act → update
- Experience: Capture raw streaming event data, including conversational inputs, tool execution telemetry, and external environment signals.
- Remember: Filter and extract high-value facts, user constraints, preferences, and architectural decisions from short-term conversational context into durable storage.
- Connect: Link newly recorded memory items into existing semantic graphs and entity association networks to foster relational understanding.
- Retrieve: When a subsequent task or session begins, execute multi-strategy hybrid queries to surface the exact historical context relevant to the incoming prompt.
- Act: Inject retrieved historical context directly into the agent's reasoning boundary, enabling coherent, context-aware execution informed by past outcomes.
- Update: Reconcile execution results against historical assumptions, revising stale records and triggering reflective passes to refine long-term knowledge banks.
3 Recommended Memory Stacks Worth Testing
Different application domains impose distinct latency, relational, and reasoning demands. The post highlights three modular stack combinations recommended for testing (3 stacks worth testing):
- Coding Agent Stack:
Hindsight → Cognee → Letta Code
Cognee builds an overarching knowledge graph of the repository and technical documentation; Letta Code anchors active session context directly inside the IDE workflow; and Hindsight provides multi-vector retrieval and reflective analysis over past bugs and structural decisions. - Personal Assistant Stack:
Mem0 → Graphiti → Letta
Mem0 functions as the high-throughput conversational memory layer for capturing personal preferences; Graphiti tracks dynamic temporal shifts in user schedules and evolving personal networks; and Letta preserves a unified, continuous persona and assistant identity. - Company Brain Stack:
Cognee → Graphiti → Hindsight
Cognee compiles scattered internal wikis, spreadsheets, and meeting minutes into an enterprise knowledge graph; Graphiti traces policy updates and organizational evolutions over time; and Hindsight executes deep cross-departmental reflection and hybrid search to empower enterprise decision support.
Original source
- @RoundtableSpace Original Thread: X (Twitter)
- Mem0 GitHub Repository: mem0ai/mem0
- memU GitHub Repository: NevaMind-AI/memU