Favicon of agentmemory

agentmemory

A self-hosted memory server for AI coding agents that captures sessions and shares searchable context across Claude Code, Cursor and Codex CLI.

Screenshot of agentmemory website

agentmemory gives AI coding agents persistent, searchable context from earlier work. It's for developers who want project decisions, past errors and useful lessons to remain available across sessions and different agents.

  • Session capture: Agent hooks record prompts, tool activity and errors, with filters that strip API keys and secrets before storage.
  • Searchable recall: Keyword search works without embeddings; optional vector retrieval adds semantic matching, and graph-aware search can use relationships when graph data exists.
  • Shared or isolated memory: Share context across compatible agents or keep it scoped to an individual agent, with MCP and REST access for clients including Claude Code, Cursor and Codex CLI.
  • Memory history: Trace memories back to their source observations and retain version history while excluding superseded entries from recall.
  • Memory upkeep: Confidence scoring, contradiction handling and automatic eviction manage stored context; a browser viewer shows captured activity.

The project is open source under Apache 2.0. Its default storage is local file-based state, suited to a single-user installation. A Redis backend is available for a shared service with concurrent writers. Basic recall can work without an API key, while semantic search depends on having embeddings available.

Similar to agentmemory