aicoolies logo
agentmemory logo
agentmemory logo

agentmemory

Persistent memory layer for AI coding agents — keeps Claude Code, Codex, Cursor, and any MCP agent in context across sessions

open sourceupdated Jun 30, 2026

agentmemory 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.

AI coding agents lose all context the moment a session ends. Every new conversation with Claude Code, Codex, or Cursor starts from zero — no memory of the codebase decisions made yesterday, the patterns you asked it to follow, or the bugs it helped fix. agentmemory solves this by acting as a persistent memory layer that any MCP-compatible coding agent can read from and write to between sessions, with hooks and a REST API for agents outside the MCP ecosystem.

The system combines vector similarity search with a knowledge graph so memories are retrieved by both semantic meaning and relational structure. The hybrid approach reaches a 95.2% recall rate on the LongMemEval-S benchmark, which measures real-world memory quality in long agent workflows, while reducing context tokens by up to 92% versus naive context injection. A local markdown store keeps everything on disk and readable without running a database, and the 51 MCP tools cover memory creation, smart search, sessioning, summarisation, governance, and decay so agents manage what they remember and forget without developer intervention.

agentmemory integrates directly with the Model Context Protocol, making it compatible with every major coding agent that supports MCP — Claude Code, Codex CLI, Cursor, Windsurf, Cline, OpenCode, Kilo Code, Hermes, OpenClaw, pi, and Gemini CLI — and exposes 12 hooks plus 4 skills for agents that prefer hook-based orchestration. Installation is a single npm command (npm install -g @agentmemory/agentmemory). The project reached over 11,500 GitHub stars in the weeks after launch, driven by a concrete community pain point: developers losing hours to agent context resets on long-running tasks. It ships under Apache-2.0 and is entirely self-hosted; no data leaves the machine.

Pricing

Free and self-hosted under Apache-2.0. No cloud dependency; all memory data stays on local disk via markdown store.

Platforms

Node.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.

Categories

Tags

Use Cases

Claude-Mem logo

Claude-Mem

Persistent memory plugin for Claude Code with automatic context injection

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.

Open Source
Mem0 logo

Mem0

Intelligent memory layer for AI agents and assistants

Mem0 is an open-source intelligent memory layer for AI agents with 51K+ GitHub stars providing persistent, adaptive memory across sessions. It manages working, short-term, and long-term memory types, enabling personalized AI experiences that improve over time. Features automatic memory extraction from conversations, semantic search over stored memories, multi-format support, and integration with 100+ frameworks. Simple API for adding memory to any LLM-powered application or agent.

Open Source
Zep logo

Zep

Context engineering platform for AI agents with temporal knowledge graphs

Zep is a context engineering platform that assembles relationship-aware context for AI agents from conversations, business data, documents, and events. It maintains a temporal knowledge graph that automatically extracts entities and relationships, tracking how context evolves over time. Zep delivers formatted context blocks optimized for LLMs with sub-200ms latency, integrating with LangChain, LlamaIndex, AutoGen, and Google ADK through Python, TypeScript, and Go SDKs.

freemium

Related Tools

computed discovery: shared active categories · kept separate from editor-verified Alternatives

MCPJam logo

MCPJam Inspector

Test and debug MCP servers before they ship

Open-source platform for inspecting, debugging and regression-testing MCP servers, MCP Apps and ChatGPT apps, with OAuth and protocol conformance for local and CI workflows.

freemiumOpen SourceTelemetry
ToolHive mascot logo

ToolHive

Run and govern MCP servers across desktop, CLI and Kubernetes

Open-source MCP runtime and governance platform that runs servers in isolated containers, curates registries, enforces access policies, and operates gateways across desktop, CLI, and Kubernetes.

Open Source
hyperagent

HyperAgent

Open-source natural-language browser automation framework for AI agents

An AGPL-3.0 TypeScript framework that drives a real browser from natural-language tasks — the self-hostable OSS framework from Hyperbrowser, distinct from the vendor's paid cloud browser product.

freeOpen Source
grafana mcp

Grafana MCP Server

First-party MCP server for querying and managing Grafana

Grafana's official Model Context Protocol server, letting AI assistants search dashboards, query datasources, and manage alerts/incidents on your Grafana instance through a standard MCP interface.

Open Source
MCP Registry parent MCP protocol mark

MCP Registry

Official open catalog of Model Context Protocol servers

The official, community-run registry for discovering and publishing Model Context Protocol (MCP) servers — an open index that MCP clients read to find available servers.

Open Source
KaibanJS logo

KaibanJS

JavaScript framework for building and visualizing multi-agent workflows on a Kanban board

KaibanJS is an MIT-licensed JavaScript framework for defining AI agents, tasks, tools, and teams, then orchestrating their work through a Kanban-inspired runtime and visual board. It can run inside Node.js, React, or Next.js projects, supports custom UIs and headless workflows, and provides real-time task-state visibility for multi-agent applications.

Open SourceTelemetry

Comparisons

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.

agentmemoryClaude-Mem

FAQ

What is agentmemory?

agentmemory 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.

Is agentmemory free?

Yes — agentmemory is open source and free to use. Free and self-hosted under Apache-2.0. No cloud dependency; all memory data stays on local disk via markdown store.

Is agentmemory open source?

Yes — agentmemory is open source.

What are the best agentmemory alternatives?

The top editor-verified agentmemory alternatives are Claude-Mem, Mem0, Zep.