Favicon of agentmemory

agentmemory

Self-hosted memory server captures coding sessions and shares searchable context across Claude Code, Cursor and Codex, with optional on-device embeddings.

agentmemory is a self-hosted memory server for developers who want their coding agents to retain project decisions, past fixes and preferences across sessions. It captures activity through agent hooks and retrieves relevant context for later work. Multiple agents can share the same memory, so switching between Claude Code, Cursor and Codex CLI doesn't mean starting with an empty history.

It runs on macOS, Linux and Windows, with Docker also supported. The project is open source under Apache 2.0. Memory state stays in your local runtime by default, and basic keyword recall works without an API key. Optional on-device semantic search uses Xenova/all-MiniLM-L6-v2, which needs an initial download before inference runs locally. Connecting an LLM provider enables additional processing; LLM-written compression is optional and must be enabled separately.

Search combines keyword matching with vector retrieval when embeddings are available. It can also use relationships in a knowledge graph. Memories retain their source history, while superseded versions leave search results. Lifecycle features include confidence scoring, contradiction handling and automatic removal of stale memories. Shared and isolated agent scopes let you control which context each agent recalls.

A local browser viewer shows captured activity and lets you replay sessions, including prompts, tool calls and responses. You can also import older Claude Code transcripts for search and replay. MCP and REST access extend compatibility to Gemini CLI, OpenCode and other clients.

Native Windows setup requires manually installing the pinned iii-engine executable. WSL2 or Docker Desktop provide alternative Windows paths.

Similar to agentmemory