aicoolies logo

agentmemory vs claude-mem — Protocol-First Memory Server vs Claude Code-Native Extension

Both agentmemory and claude-mem solve the same problem — AI coding agents that forget everything between sessions — but they approach it from opposite directions. agentmemory is a protocol-first MCP server built to work across the entire coding agent ecosystem, with a hybrid vector-graph architecture and a 95.2% recall score on the LongMemEval-S benchmark. claude-mem is a lightweight, Claude Code-native extension that trades cross-agent portability for zero-configuration simplicity.

Analyzed by Raşit Akyol on May 19, 2026

Share

What Sets Them Apart

Both agentmemory and claude-mem tackle the same fundamental problem — AI coding agents that forget everything between sessions — but they approach persistent memory from opposite directions. agentmemory is a protocol-first, agent-agnostic MCP server designed to work across the entire coding agent ecosystem with hybrid vector-graph retrieval and a benchmark behind it. claude-mem is a lightweight, Claude Code-native extension that prioritises zero-configuration simplicity for a single agent and a single workflow.

agentmemory and claude-mem at a Glance

agentmemory ships as an npm package (@agentmemory/agentmemory) that runs as an MCP server, exposes 51 MCP tools, 12 hooks, and 4 skills, and works with any agent that speaks MCP, REST, or hook protocols. Out of the box that means Claude Code, Codex CLI, Cursor, Windsurf, Cline, OpenCode, Kilo Code, Hermes, OpenClaw, pi, and Gemini CLI. Memory is stored in a local markdown file system with a vector index plus a knowledge graph layered on top, and the project ships a published LongMemEval-S recall score of 95.2%.

claude-mem is purpose-built for Claude Code and optimises for the path of least friction in that environment. Installation drops in as a Claude Code memory layer with minimal configuration, and the abstractions match the way Claude Code thinks about context already. Cross-agent support is not the point; the trade-off is zero setup overhead and a workflow that feels native to a single tool rather than universal across all of them.

The shared ground matters. Both are open source, both keep memory data on the local machine, neither requires a cloud account or a hosted database, and neither charges money. The choice is not about cost or privacy — both score equally on those axes — but about whether the agent surface you care about is Claude Code only or the broader MCP ecosystem.

Memory Architecture and Recall Quality

agentmemory's hybrid vector-plus-graph architecture is the technical bet. Pure vector search retrieves memories by semantic similarity, which works for fuzzy queries but loses relational structure — you can find a memory about a function but not necessarily memories about everything that calls it. The knowledge graph adds explicit relationships, so retrieval can follow chains: a query about a bug surfaces the related fix attempts, the affected files, and the decisions made along the way.

The published 95.2% recall on LongMemEval-S is what justifies the complexity. LongMemEval-S is a benchmark built specifically to measure memory quality in long agent conversations, the exact use case persistent memory exists for, and 95.2% is at the upper end of published numbers. The 92% context-token reduction claim says the recall does not come from dumping everything into the prompt — it comes from retrieving only the relevant slice.

claude-mem does not publish a benchmark score and does not need to. The retrieval is tuned for Claude Code's specific context window and tool-call patterns, which means it optimises for the actual workflow rather than a generic benchmark. The trade-off is invisible quality: the system works well in the environment it was designed for, but there is no published metric to compare against agentmemory's number, and no architecture to scale across agent surfaces.

Agent Compatibility and Ecosystem Fit

agentmemory bets on MCP becoming the standard interop layer for coding agents. If you use multiple agents — Cursor for refactors, Claude Code for long-running tasks, Codex CLI for terminal work — agentmemory gives them a shared memory layer that all three can read and write. As more agents adopt MCP, the value compounds: one memory store, every agent. The hook and REST surfaces extend coverage to agents that have not yet adopted MCP, which is most of the long tail.

claude-mem bets on Claude Code being the agent you actually use day-to-day. For developers who live in Claude Code and have no plans to switch, the cross-agent infrastructure of agentmemory is overhead without benefit. Setup is faster, configuration is shorter, and the memory layer feels like part of the editor rather than an external service. The cost is portability: switch agents later and the memory layer does not come with you.

The Bottom Line

Choose agentmemory if you run multiple coding agents, want a benchmark-backed retrieval architecture, or care about the memory layer outliving the specific agent you use today. Choose claude-mem if Claude Code is your primary agent and minimal setup matters more than cross-agent portability. The two are not really competing for the same developer — they are betting on opposite hypotheses about how the agent ecosystem evolves, and the right pick depends on which hypothesis matches your stack.

Quick Comparison

FeatureagentmemoryClaude-Mem
PricingFree and self-hosted under Apache-2.0. No cloud dependency; all memory data stays on local disk via markdown store.Free and open-source (AGPL-3.0)
PlatformsNode.js / npm. MCP-compatible: Claude Code, Codex CLI, Cursor, Windsurf, Cline, OpenCode, Kilo Code, Hermes, OpenClaw, pi, Gemini CLI. Also exposes 12 hooks, 4 skills, and a REST API.Claude Code plugin; macOS, Windows, Linux
Open SourceYesYes
TelemetryCleanClean
Descriptionagentmemory is an open-source MCP server that gives AI coding agents persistent, cross-session memory. Built on hybrid vector-graph search, it achieves 95.2% recall on the LongMemEval-S benchmark while using up to 92% fewer context tokens than naive context injection. Works out of the box with Claude Code, Codex, Cursor, Windsurf, Cline, OpenCode, Kilo Code, Hermes, and any MCP client through 51 MCP tools plus 12 hooks and 4 skills.Claude-Mem is a persistent memory plugin for Claude Code with 44,000+ GitHub stars that captures session context and injects it into future sessions. It features progressive disclosure with token cost visibility, automatic compression, and privacy controls with private tags to manage what gets remembered across coding sessions.