A local memory server that captures coding agent sessions and lets agents recall decisions and fixes later
open sourceApache-2.0self-hostablefreeMCP
AgentMemory is an open source memory server for AI coding agents. Hooks and plugins capture session events (with secrets scrubbed) from Claude Code, GitHub Copilot CLI, Cursor, Gemini CLI, Codex CLI, Hermes Agent, OpenClaw, OpenCode and any MCP client, and agents recall them later through hybrid search: BM25 keyword search with no API key, plus vector embeddings (local or remote) and a knowledge graph fused together. One store is shared across tools, with per-agent scoping, team namespaces, versioned memories, automatic forgetting and a live viewer to browse, edit, export or forget memories. It runs locally on Node.js, with a REST API and an MCP server on localhost, a file store by default and Redis as an option.
Problems it solves
- my coding agent forgets what we decided in earlier sessions
- share one memory across Claude Code, Codex and Cursor
- persistent searchable memory for AI coding agents that runs locally
Features
- Automatic capture of coding agent sessions through native hooks and plugins, with secret scrubbing
- Hybrid recall: BM25, vector embeddings and knowledge graph fused with reciprocal rank fusion
- Keyword search with no API key; free on-device embeddings optional
- MCP server (stdio and Streamable HTTP) and REST API on localhost
- Live viewer to browse, edit, export and forget memories
- Per-agent scoping, team memory namespaces and multi-agent coordination
- Memory versioning, contradiction detection and TTL-based forgetting
- File store by default, Redis optional
- Integrations for Claude Code, Codex CLI, Copilot CLI, Cursor, Gemini CLI, Hermes Agent, OpenClaw and OpenCode
Limitations
- Needs Node.js 20 or newer; on Windows, WSL2 or a separate native setup.1
- Without an embedding provider (keyless mode) recall is keyword-only, so semantic queries can return nothing.1
Capabilities
| Has an API | plan not known |
|---|---|
| Has a command line tool | plan not known |
| Has an MCP server | plan not known |
Alternatives
The same job
These do what AgentMemory does.
- TencentDB Agent Memory A self-hosted memory hub that coding agents share: chat memory, skills, a wiki and a code graph
- Mem0 The memory layer for AI agents
- Zep The enterprise context layer for reliable agents
- Letta Build stateful agents with memory that can learn and improve over time
- Engram Persistent memory for AI coding agents
- ai-memory Long-term memory for AI coding agents, shared across agents, projects and machines