Originally published on andrew.ooo — visit the original for any updates, code snippets that aged out, or follow-up posts. TL;DR agentmemory is an open-source persistent memory layer for AI coding agents. It silently captures what your agent does, compresses it into searchable memory, and injects the right context into the next session. One server, shared across Claude Code, Cursor, Codex CLI, Gemini CLI, Cline, Windsurf, Roo Code, OpenCode, and anything else that speaks MCP. 9,361 GitHub stars with 6,467 stars this week (#1 trending repo as of May 2026) 95.2% R@5 on LongMemEval-S (ICLR 2025, 500 questions) — beats mem0 (68.5%) and Letta/MemGPT (83.2%) ~170K tokens/year vs ~19.5M for paste-full-context approaches — roughly $10/yr running cost (free with local embeddings) 12 auto-capture hooks for Claude Code, 6 for Codex CLI, MCP server for everything else 51 MCP tools (memory_smart_search, memory_save, memory_sessions, memory_governance_delete, etc.) Zero external dependencies — local-first SQLite +…