</>MCP Agents Market
Agent

agentmemory

by rohitg0027.1kTypeScriptUpdated 2026-08-16

#1 Persistent memory for AI coding agents based on real-world benchmarks

Claude CodeClaude DesktopCodexCursorGitHub Copilot CLIClineGooseAider

agentmemory is a persistent memory engine for AI coding agents that captures, indexes, and retrieves session context across multiple tools. It eliminates the need to re-explain architecture, preferences, and past decisions by automatically recording what your agent does and injecting relevant context when needed. Built on the iii engine with hybrid BM25 + vector + graph search, it delivers 95.2% retrieval accuracy and reduces token usage by 92% compared to pasting full context.

Key Features

Auto-capture via 12 lifecycle hooks—zero manual logging required
Hybrid search combining BM25, vector embeddings, and knowledge graphs with reciprocal rank fusion
95.2% retrieval recall at top-5 (LongMemEval-S benchmark) and 100% hit rate on coding-agent-life-v1
Works across 20+ agents including Claude Code, Codex CLI, Cursor, GitHub Copilot CLI, and any MCP client
Self-hosted with SQLite and iii-engine—no external databases or cloud dependencies
Real-time web viewer on port 3113 with session replay, timeline scrubbing, and event inspection
54 MCP tools for memory search, save, session history, governance, and more
4-tier memory consolidation with automatic decay and forgetting to keep context fresh

Use Cases

  • 01Preserve architectural decisions and coding patterns across multi-day projects so agents recall JWT middleware choices or database schema designs
  • 02Avoid re-teaching the same bug fixes—agent remembers past N+1 query solutions when asked about performance
  • 03Share context across multiple AI agents working on the same codebase via MCP and REST API
  • 04Reduce token costs by injecting only relevant snippets instead of pasting full project context every session
  • 05Import and replay historical Claude Code JSONL transcripts to mine lessons and searchable memories
  • 06Run entirely offline with local embeddings (all-MiniLM-L6-v2) for zero API key requirements

Related Agents

View more

agentmemory — FAQ

What is agentmemory?+

agentmemory is a persistent memory server for AI coding agents that automatically captures session context, compresses it into searchable memories, and retrieves relevant information across tools. It works with any agent supporting MCP, hooks, or REST API.

How do I install agentmemory?+

Run npx @agentmemory/agentmemory to start the interactive setup. It prompts you to pick agents to wire, optionally configure an LLM provider (or stay keyless with local embeddings), seeds config, and starts the memory server on port 3111.

Which AI clients does agentmemory work with?+

It supports Claude Code, Codex CLI, GitHub Copilot CLI, Cursor, Gemini CLI, OpenCode, Cline, Goose, Aider, Claude Desktop, Devin, Roo Code, Warp, and any MCP-compatible client. One server shares memories across all connected agents.

Do I need API keys or a cloud service?+

No. agentmemory runs entirely self-hosted with SQLite and local embeddings (all-MiniLM-L6-v2) by default. You can optionally configure an LLM provider for richer summarization, but the core retrieval works offline.

Is agentmemory free?+

Yes, it is open source and free. Running with local embeddings costs $0. If you configure an external LLM for summarization, token costs are estimated at ~$10 per year for typical usage.

How does agentmemory capture session context automatically?+

It uses 12 lifecycle hooks (SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, etc.) that fire during agent execution. The hooks send observations to the memory server with no manual logging required.

How do I install agentmemory?+

Open the source repository on GitHub and follow its README. agentmemory is a agent — MCP Agents Market links you directly to the official repo.

Is agentmemory free?+

agentmemory is an open-source project hosted on GitHub. Check the repository for its license and any usage requirements.

Related searches