aicoolies logo
agentmemory logo

agentmemory

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

Share
open-sourceOpen Source
Visit Website →

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

Alternatives

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-sourceOpen 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-sourceOpen 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

Accomplish Coworker

Open-source desktop AI coworker for browsing and code execution.

Accomplish Coworker is an MIT-licensed open-source AI coworker that runs on the desktop, combining computer-use style browsing with code execution so agents can research, implement, run, and debug workflows in one local environment.

open-sourceOpen SourceTelemetry

Safari MCP Server

Apple's Safari-native MCP server for web debugging agents

Safari MCP Server is Apple's safaridriver-based MCP server in Safari Technology Preview, giving compatible coding agents local access to Safari page content, console logs, network requests, screenshots, JavaScript evaluation, interactions, viewport controls, and accessibility/performance checks.

freeTelemetry

Headroom

Context compression for LLM apps and coding agents

Headroom is an Apache-2.0 context compression layer for LLM apps and coding agents. It compresses tool output, logs, files, RAG chunks, and agent history through a local library, proxy, wrapper, or MCP server, with retrieval hooks for bringing originals back when needed. Treat its savings numbers as Headroom-reported benchmarks, not independent aicoolies measurements.

open-sourceOpen SourceTelemetry

Codebase Memory MCP

Codebase knowledge graph MCP server for AI coding agents

Codebase Memory MCP is an MIT-licensed MCP server that turns a repository into a persistent code knowledge graph for AI coding agents. It gives Claude Code, Cursor, Codex-style agents, and other MCP clients structural queries for functions, classes, call chains, routes, and architecture, helping them explore large projects without repeatedly rereading files or relying only on broad search.

open-sourceOpen SourceTelemetry
BeeAI Framework logo

BeeAI Framework

Python and TypeScript framework for production multi-agent systems

BeeAI Framework is an Apache-2.0 toolkit for building production-ready AI agents and multi-agent systems in Python and TypeScript. Its docs cover agents, tools, RAG, memory, workflows, backend providers, serving, and A2A/MCP integration surfaces, making it a vendor-neutral option for teams comparing LangGraph, CrewAI, Mastra, and related agent runtimes.

open-sourceOpen SourceTelemetry

Supabase MCP

MCP server for connecting AI assistants to Supabase projects

Supabase MCP is Supabase's Apache-2.0 server for connecting AI assistants to Supabase projects. It can expose database, configuration, and project-management workflows to MCP clients such as Cursor, Claude, and Windsurf, while the official docs emphasize permission and security review before production use, SQL changes, or high-privilege database access.

open-sourceOpen SourceTelemetry

Comparisons