← Back to blog
2026-03-1914 min read

shodh-memory vs mem0 vs Zep vs MemGPT: Which AI Agent Memory System Should You Use?

comparisonarchitectureagentic-ai
shodh-memory-vs-mem0-vs-zep-vs-memgpt.md

shodh-memory vs mem0 vs Zep vs MemGPT: Which AI Agent Memory System Should You Use?

AI agents need memory. But which memory system should you actually use? In 2026, four serious options exist: shodh-memory, mem0, Zep, and MemGPT (now Letta). Each takes a fundamentally different approach to the same problem.

This is not a marketing page. Every system has strengths and trade-offs. The right choice depends on your constraints — where your agent runs, how much you care about privacy, whether you need cognitive features or just a key-value store with vectors.

The Contenders

shodh-memory

**Language:** Rust core, TypeScript MCP server, Python bindings
**Architecture:** Local-first, single binary (~30MB), zero external dependencies
**Storage:** RocksDB + HNSW/SPANN vector index + knowledge graph
**Key differentiator:** Neuroscience-grounded cognitive memory — Hebbian learning, 3-tier architecture, memory decay, spreading activation
**License:** Apache 2.0

mem0

**Language:** Python
**Architecture:** Cloud-dependent, requires external embedding APIs (OpenAI, Cohere) and vector databases (Qdrant, Pinecone)
**Storage:** Delegated to external services
**Key differentiator:** Simple API, popular in the LangChain ecosystem, recently added graph memory
**License:** Apache 2.0

Zep

**Language:** Go (server), Python/TypeScript SDKs
**Architecture:** Cloud-first managed service, self-hosting requires PostgreSQL + Redis + embedding service
**Storage:** PostgreSQL with pgvector
**Key differentiator:** Managed service with temporal awareness and knowledge graphs
**License:** Business Source License (BSL) — not fully open source

MemGPT / Letta

**Language:** Python
**Architecture:** Virtual context management — pages memory in and out of LLM context like an OS manages RAM
**Storage:** Various backends (Postgres, SQLite, Chroma)
**Key differentiator:** Treats the context window as memory, uses the LLM itself to decide what to remember and forget
**License:** Apache 2.0

Head-to-Head Comparison

Privacy & Data Sovereignty

This is where the architectures diverge most sharply.

**shodh-memory** runs entirely offline. Embeddings are computed locally using MiniLM-L6-v2 via ONNX Runtime. No API calls, no network requests, no data leaving your machine. You can run it on an air-gapped system or a Raspberry Pi in a factory.

**mem0** requires external APIs for embeddings. Every memory you store sends data to OpenAI or Cohere's servers. Your agent's memories — user preferences, conversation history, learned patterns — all leave your infrastructure.

**Zep** is cloud-first. The managed service stores your data on Zep's infrastructure. Self-hosting is possible but requires multiple services. Either way, the system was designed around cloud assumptions.

**MemGPT/Letta** depends on the LLM backend. If you're using OpenAI, your memories pass through their API. If you're running a local LLM, you can keep everything offline — but you need significant GPU resources.

**Verdict:** If privacy matters — edge deployments, healthcare, defense, financial services — shodh-memory is the only system designed for it from the ground up.

Cognitive Capabilities

This is where "memory system" means different things to different projects.

| Feature | shodh-memory | mem0 | Zep | MemGPT/Letta |
| --- | --- | --- | --- | --- |
| Hebbian learning | Yes (Bi & Poo 1998) | No | No | No |
| Memory decay | Yes (Wixted 2004) | No | No | LLM-decided |
| 3-tier architecture | Yes (Cowan 2001) | No | No | Virtual paging |
| Knowledge graph | Yes (spreading activation) | Basic | Yes | No |
| Spreading activation | Yes (Anderson 1984) | No | No | No |
| Causal lineage | Yes | No | No | No |
| Memory consolidation | Yes | No | Partial | LLM-decided |

**shodh-memory** implements five neuroscience mechanisms: Hebbian learning (connections strengthen on co-access), biologically plausible decay (exponential → power-law), three-tier promotion (working → session → long-term), spreading activation in the knowledge graph, and consolidation during maintenance cycles. Every constant is calibrated from published neuroscience research.

**mem0** provides store-and-retrieve with vector similarity. It recently added graph memory, but there's no decay, no learning, no consolidation. Memories are static once stored.

**Zep** has temporal awareness and knowledge graphs, making it more sophisticated than mem0. But it lacks Hebbian learning, biologically plausible decay, or tier-based promotion. The graph is structural, not cognitive.

**MemGPT/Letta** takes a radically different approach: it uses the LLM itself to manage memory. The LLM decides what to remember, what to forget, and what to page into context. This is powerful for reasoning but expensive — every memory operation costs LLM inference tokens.

**Verdict:** shodh-memory for cognitive depth, MemGPT for LLM-native approaches, Zep for managed simplicity with graphs, mem0 for basic store-retrieve in Python.

Performance

| Metric | shodh-memory | mem0 | Zep | MemGPT/Letta |
| --- | --- | --- | --- | --- |
| Graph lookup | <1μs | N/A | Network-bound | N/A |
| Semantic search | 34-58ms | API latency (100-500ms) | API latency | LLM inference time |
| Write latency | <1ms (async) | API latency | API latency | LLM inference |
| Binary size | ~30MB | Python package | Go binary + infra | Python package |
| Min hardware | Raspberry Pi Zero | Cloud API access | Cloud or multi-service | GPU (for local LLM) |

**shodh-memory** runs everything locally with Rust-level performance. Sub-microsecond graph lookups, sub-millisecond writes, 34-58ms semantic search. No network round-trips.

**mem0** and **Zep** are network-bound. Every operation involves at least one API call — often two (embed + store/search). Expect 100-500ms per operation minimum, plus the cost of external service calls.

**MemGPT** is the slowest by design. Every memory operation involves LLM inference, which can take seconds. The trade-off is intelligence — the LLM makes smart decisions about what to remember.

**Verdict:** shodh-memory wins on raw performance by orders of magnitude. MemGPT trades performance for intelligence. mem0 and Zep are bounded by network latency.

Edge & IoT Deployment

Can you run it on a robot? A drone? A Raspberry Pi in a factory?

**shodh-memory:** Yes. Designed for it. ARM64 cross-compilation, ~30MB binary, no runtime dependencies. Runs on Pi Zero with <200MB RAM.

**mem0:** No. Requires internet for embedding APIs.

**Zep:** No. Cloud-first architecture.

**MemGPT/Letta:** Only with a local LLM, which requires substantial GPU resources. Not viable on resource-constrained devices.

**Verdict:** shodh-memory is the only option for edge/IoT/robotics deployments.

Developer Experience

**mem0** wins on initial simplicity. `pip install mem0ai`, import, call `.add()` and `.search()`. If you're already in the Python/LangChain ecosystem, it's the fastest path to "working."

**Zep** has polished SDKs and a managed service. If you want to pay for someone else to run the infrastructure, Zep is the easiest path.

**shodh-memory** requires installing a binary (npm, pip, or cargo) and running a server, but provides an MCP server that integrates directly with Claude Code and Cursor. The REST API has 60+ endpoints covering every operation.

**MemGPT/Letta** has the steepest learning curve. The virtual context management paradigm is powerful but requires understanding how paging works and how the LLM manages memory state.

When to Choose What

**Choose shodh-memory when:**

Privacy matters (healthcare, defense, financial, air-gapped)
You need edge/IoT/robotics deployment
You want cognitive memory that learns from usage patterns
You're using Claude Code or Cursor and want persistent memory
You need sub-millisecond performance

**Choose mem0 when:**

You're in the Python/LangChain ecosystem and need basic memory fast
Cloud API costs aren't a concern
You don't need cognitive features (decay, learning, consolidation)
You want the largest community and most tutorials

**Choose Zep when:**

You want a managed service with minimal ops overhead
Your team is cloud-native and comfortable with SaaS dependencies
You need knowledge graphs with temporal awareness
BSL licensing isn't a blocker for your use case

**Choose MemGPT/Letta when:**

You want the LLM to intelligently manage its own memory
You have GPU resources available
Your use case requires complex reasoning about what to remember
Token cost for memory operations is acceptable

The Bigger Picture

The fact that four different projects exist with four different architectures tells you something: the industry hasn't converged on how AI memory should work. We're still in the early days.

shodh-memory bets that neuroscience has already solved this problem — that Hebbian learning, decay curves, and three-tier architectures are the right foundation because they've been validated by 75 years of biological memory research. The other systems bet on simpler approaches (mem0), cloud infrastructure (Zep), or LLM-native management (MemGPT).

In five years, one of these approaches will dominate. Our bet is on the one that mirrors how memory actually works.

$ subscribe

Get updates on releases, features, and AI memory research.