8 Open-Source AI Agent Memory Tools in 2026

The open-source AI agent memory landscape has grown fast. Here are the 8 most notable tools, ranked by maturity, features, and real-world usability — with licensing, architecture, pricing, and recommendations.

Why open-source AI memory matters

AI agents forget everything between sessions. Open-source memory tools give developers a way to add persistent context without locking into a closed service. The landscape in 2026 spans local-first runtimes, cloud services with open-source components, agent operating systems, and graph+RAG hybrids. Here's what's actually usable.

1. Squish — Local-first MCP memory runtime (MIT)

Squish is a local-first memory runtime for AI agents. MIT licensed, open source on GitHub. Runs locally on SQLite with optional cloud sync. 18 MCP tools (remember, recall, context, stats, inspect, forget, link, pin, etc.). 39 ops/sec throughput, 6.6ms embedding, 6.1ms search. Belief extraction derives durable knowledge from observations. Memory decay keeps long-term memory useful. Cross-tool memory across Claude Code, Cursor, Codex, ChatGPT, and any MCP client. Free local (unlimited), cloud from $9/mo. 3,100+ npm installs as of June 2026. Best for: developers who want a complete, free, local-first memory runtime with MCP integration. Anyone comparing against Mem0 ($249/mo) who wants a cheaper alternative. Pros: Free local (unlimited), MCP-native with 18 tools, belief extraction, memory decay, cross-tool memory, open source (MIT), self-hostable, active development. Cons: Cloud sync requires internet. Team features require Squish Cloud ($99/mo). Newer than some competitors (less community maturity than Mem0).

2. Mem0 — Cloud-first memory with open-source components (AGPL)

Mem0 is a cloud-first memory service for AI agents. The core memory system has open-source components (AGPL license), but the managed service is closed. Provides semantic memory storage, retrieval, and personalization. Requires Qdrant for vector storage. REST API (not MCP-native). Pricing: Hobby free (10K memories/mo), Starter $19/mo, Pro $249/mo, Enterprise custom. Best for: teams who want a managed cloud service and don't want to self-host. Teams already using Qdrant. Pros: Managed service (no infrastructure to run), semantic memory, personalization, Qdrant-backed vector search, some open-source components. Cons: Pro at $249/mo is expensive for individuals. Cloud-only (no local option). Requires Qdrant. Not MCP-native. AGPL license on open-source components (more restrictive than MIT).

3. Engram — Ultra-lightweight local memory (MIT)

Engram is a free, ultra-lightweight local memory tool. MIT licensed. Uses SQLite FTS5 for full-text search. Local-only — no cloud sync. Free with a 30KB cap per memory. Simple setup, minimal dependencies. Best for: users who need a tiny local memory for a single project, under 30KB. Ultra-lightweight needs where a full runtime is overkill. Pros: Free, MIT licensed, ultra-lightweight, simple setup, SQLite FTS5 search. Cons: 30KB cap is very limiting for serious use. No cloud sync. No MCP integration. No belief extraction or memory decay. Not suitable for cross-tool or team memory.

4. Letta (MemGPT) — Open-source agent OS with stateful memory

Letta (formerly MemGPT) is an open-source agent operating system. It manages in-context memory within agent sessions — different from persistent storage runtimes like Squish. Open-source, self-hostable. Designed for researchers and developers building stateful agent systems. Best for: researchers and developers building stateful agent systems who want in-context memory management. Pros: Open-source, self-hostable, in-context memory management, active research community. Cons: Different category (agent framework vs memory runtime). Complex setup. In-context memory (session-scoped) vs persistent storage. Not MCP-native. Less suitable for simple cross-session memory needs.

5. Zep — Graph-based memory (partially open source, BSL)

Zep is a cloud-first graph-based memory service. Partially open source under BSL license. Provides temporal graph memory with entity and relationship tracking. Cloud-hosted with limited self-hosting. REST API (not MCP-native). Pricing: from $40/mo individual, $249/mo teams, $1,250+/yr enterprise. Best for: enterprise use cases that need graph-based temporal memory. Teams that need managed infrastructure with enterprise features. Pros: Graph-based temporal memory, entity/relationship tracking, managed service, enterprise features. Cons: Cloud-first (limited self-hosting). $1,250+/yr enterprise is expensive. BSL license (not MIT). Not MCP-native. More complex than most individual developers need.

6. LangMem — LangChain ecosystem memory (MIT)

LangMem is an open-source memory module in the LangChain ecosystem. MIT licensed. Provides memory primitives for LangChain agents. Best for developers already using LangChain who want memory integrated into their existing workflow. Best for: LangChain users who want memory as part of their existing stack. Pros: MIT licensed, integrates with LangChain ecosystem, open source. Cons: Limited to LangChain ecosystem. Less mature than Squish or Mem0. Smaller community. Not a standalone runtime. Not MCP-native.

7. Cognee — Graph+RAG memory system (GPL)

Cognee is an open-source graph+RAG memory system. GPL licensed. Combines graph memory with retrieval-augmented generation. Python-first. Good for use cases that need both graph relationships and RAG-based retrieval. Best for: Python developers building complex memory systems that need both graph and RAG. Pros: Graph+RAG combination, open source, Python-first (good for data science/ML stacks). Cons: GPL license (more restrictive than MIT). Python-first (less suitable for Node.js/TypeScript stacks). More complex than most developers need. Not MCP-native.

8. Shodh — Semantic search for memory (MIT)

Shodh is an open-source semantic search tool for memory and knowledge retrieval. MIT licensed. Focused on semantic search capabilities for memory systems. Smaller and less mature than the other tools on this list. Best for: developers who need semantic search as a component of a custom memory system. Pros: MIT licensed, semantic search focus, open source. Cons: Smaller and less mature than other tools. Not a complete memory runtime. Limited documentation and community. Not MCP-native.

Quick comparison table

Tool | License | Local | Cloud | MCP | Price | Best for Squish | MIT | Yes | Optional | 18 tools | Free + from $9/mo | Developers, AI agents Mem0 | AGPL | No | Yes | REST API | $19-$249/mo | Managed cloud Engram | MIT | Yes | No | No | Free (30KB cap) | Ultra-lightweight local Letta | Open-source | Yes | Self-host | No | Free (hosting costs) | Agent OS Zep | BSL | Limited | Yes | REST API | $40-$1,250+/yr | Graph memory LangMem | MIT | Yes | Optional | No | Free | LangChain users Cognee | GPL | Yes | Self-host | No | Free (hosting costs) | Graph+RAG, Python Shodh | MIT | Yes | No | No | Free | Semantic search The most complete open-source option for developer use cases is Squish — MIT licensed, local-first, MCP-native with 18 tools, belief extraction, memory decay, and cross-tool memory. Engram is the lightest option for simple local needs. Letta is the best choice if you're building a stateful agent system rather than just adding memory to an existing workflow.

FAQ

Q: What is the best open-source AI memory tool in 2026? A: Squish is the most complete open-source option for developer use cases — MIT licensed, local-first, MCP-native with 18 tools, belief extraction, memory decay, and cross-tool memory. Engram is the best ultra-lightweight option. Letta is best for agent OS use cases. Q: Is Mem0 open source? A: Mem0 has open-source components under AGPL license, but the managed service is closed. The AGPL license is more restrictive than MIT — if you modify and distribute Mem0's open-source components, you must release your modifications under AGPL. Q: Can I self-host AI memory for free? A: Yes. Squish (MIT), Engram (MIT), Letta (open-source), LangMem (MIT), Cognee (GPL), and Shodh (MIT) are all self-hostable. Squish and Engram are the easiest to self-host — Squish with npm i -g squish-memory && squish install, Engram as a lightweight SQLite tool. Q: Which open-source AI memory tool works with Claude Code? A: Squish has native MCP support and works with Claude Code out of the box. Install with npm i -g squish-memory && squish install. Other tools like Mem0, Zep, and LangMem use REST APIs and require additional integration work. Q: What is the difference between MIT, AGPL, BSL, and GPL licenses? A: MIT is the most permissive — you can use, modify, and distribute with almost no restrictions. AGPL requires you to release modifications if you run the software as a service. BSL (Business Source License) is open for development use but restricts commercial competition. GPL requires you to release modifications if you distribute the software. For self-hosted use, MIT and AGPL are similar. For commercial distribution, MIT is the most flexible.

Squish documentation