TL;DR
agentmemory is a self-hosted MCP server that gives Claude Code, Cursor, and Gemini CLI searchable long-term memory across sessions - with 12 auto-capture hooks and 51 tools, no external database required.
Read next
agentmemory gives AI coding agents a persistent brain - capturing session context automatically via 12 Claude Code hooks and 51 MCP tools, with 95.2% retrieval accuracy and 92% token savings over context-pasting.
7 min readRuflo crossed 37,700 GitHub stars this week, adding nearly 1,900 in a single day. It turns Claude Code into a coordinated swarm of 100+ specialized agents with MCP integration, distributed vector memory, and zero-trust agent federation.
7 min readCodeGraph builds a local SQLite index of your codebase so Claude Code, Cursor, and Codex CLI spend far fewer tokens exploring files - trending on GitHub with 12k stars and real benchmark numbers.
6 min readrohitg00/agentmemory jumped to the top of GitHub's weekly trending chart this week with nearly 7,000 new stars, landing at over 10,000 total. That kind of velocity usually signals one of two things: a viral demo or a tool that scratches a genuine itch. In this case it is the latter. The repo solves the persistent pain of stateless AI coding agents - every session starts blank, every project preference has to be re-explained, every architectural decision gets rediscovered from scratch. agentmemory wires a structured memory layer under your existing agent setup without requiring a new database server, a cloud account, or changes to your workflow.
agentmemory is a local MCP server that captures, compresses, and retrieves context across agent sessions. It runs as a background process and connects to your agent through the MCP protocol or via REST. Once connected, it hooks into 12 lifecycle events - SessionStart, SessionEnd, UserPromptSubmit, PreToolUse, PostToolUse, PostToolUseFailure, PreCompact, SubagentStart, SubagentStop, and Stop - and records observations automatically. You do not write memory manually. The agent's own tool calls become the input.
Internally, memory moves through four tiers: working memory holds raw observations from the current session, episodic compresses those into session summaries, semantic extracts durable facts and patterns, and procedural captures workflows and decision patterns. The system applies Ebbinghaus decay - frequently accessed memories strengthen, stale entries evict automatically. This means the memory store stays relevant rather than accumulating noise over months.
Retrieval uses a triple-stream approach - BM25 keyword matching, vector cosine similarity over local embeddings, and knowledge-graph traversal - fused with Reciprocal Rank Fusion. On the LongMemEval-S benchmark, the project reports 95.2% R@5 retrieval accuracy and a Mean Reciprocal Rank of 88.2%. That compares favorably to mem0 (53k stars), which the README benchmarks at 68.5% R@5.
The MCP surface exposes 51 tools split across a core set (recall, save, smart-search, sessions, timeline, profile, export, compress-file) and an extended set that adds pattern detection, knowledge-graph queries, team sharing, audit logging, and governance controls.
Storage is SQLite with an in-memory vector index. The embedding model ships locally (all-MiniLM-L6-v2 via @xenova/transformers). No Postgres, no Redis, no external vector database.
Get the weekly deep dive
Tutorials on Claude Code, AI agents, and dev tools - delivered free every week.
From the archive
May 15, 2026 • 7 min read
May 15, 2026 • 6 min read
May 14, 2026 • 6 min read
May 14, 2026 • 6 min read
Getting started takes under two minutes:
npx @agentmemory/agentmemory
The first run from v0.9.16 onward prompts for global install automatically. If you prefer explicit control:
npm install -g @agentmemory/agentmemory
agentmemoryThe server starts on port 3111. A real-time viewer launches on port 3113 and shows a live observation stream, session explorer, memory browser, and knowledge graph visualization - no extra setup.
To wire Claude Code specifically:
agentmemory connect claude-code
That command writes the MCP configuration and installs the 12 hooks into Claude Code's settings. From that point forward, every session is recorded and every new session starts with relevant context injected automatically (controlled by the AGENTMEMORY_INJECT_CONTEXT flag, off by default).
For self-hosted deployment, one-click templates exist for Fly.io, Railway, Render, and Coolify. The Coolify template provisions persistent /data storage, which aligns well with teams already running Coolify for their CI stack.
The clearest use case is solo developers who work across multiple projects with the same AI agent and are tired of the context reset penalty. If you spend the first five to ten minutes of every session re-orienting Claude Code about your stack, conventions, and recent decisions, agentmemory is addressing exactly that problem.
Teams using multiple specialized agents - one for code review, one for test generation, one for documentation - benefit from the multi-agent coordination layer. A single agentmemory server can handle 15+ simultaneous agents, and the team-share tools in the extended MCP set allow shared memory across agent roles.
Developers experimenting with long-running agent workflows, where a subagent fires off to do research and reports back, will appreciate the SubagentStart and SubagentStop hooks. Those hooks let the system track what subagents learned so the parent session can recover that context without re-running the whole chain.
The tool also makes sense for anyone running agentic pipelines on CI - the persistent memory means a nightly agent that reviews PRs builds up project-specific knowledge over time rather than starting from the same generic baseline every run.
One group that might not benefit immediately: developers who already maintain a detailed CLAUDE.md and rarely switch projects. The overhead of running a background server and managing memory tiers adds friction that manual context files avoid - though the project's own benchmark puts agentmemory at 92% fewer tokens than the manual approach at scale.
agentmemory lands at the intersection of three areas the DevDigest site covers directly.
The hook system - all 12 lifecycle hooks agentmemory uses - are the same hooks covered at hooks.developersdigest.tech. Claude Code's hook architecture lets external tools intercept every tool call and session event, and agentmemory is one of the most complete examples of that capability being put to production use. The hooks post on that site walks through setting up your own hooks if you want to understand what agentmemory is doing under the covers before committing to it.
The MCP surface is equally relevant. agentmemory registers 51 tools through the MCP protocol, the same protocol indexed at mcp.developersdigest.tech. If you are building a custom agent setup and selecting MCP servers to include, agentmemory is one of the more complete examples of a server that adds stateful capability rather than just wrapping an external API.
Finally, the built-in skills (/recall, /remember, /session-history, /forget) follow the same pattern as the Claude Code skills indexed at skills.developersdigest.tech - reusable agent commands that users invoke by name rather than writing prompt instructions each time.
The retrieval benchmark numbers are strong, but they come from the project's own README and should be treated as directional rather than definitive. LongMemEval-S is a real benchmark, and the comparison to mem0's reported 68.5% R@5 is plausible, but independent third-party reproduction has not been widely published at the time of writing.
The dependency on the iii-engine binary is a real friction point on Windows, where users must download a prebuilt binary separately or fall back to Docker. Linux and macOS installs are smooth. The local embedding model requires @xenova/transformers as an optional peer dependency for full offline support - skipping it means falling back to a cloud embedding provider.
The feature flag system is deep, with several capabilities disabled by default (AGENTMEMORY_AUTO_COMPRESS, AGENTMEMORY_REFLECT, AGENTMEMORY_INJECT_CONTEXT). This is deliberate - the project explains that auto-inject can interact badly with certain recursive agent patterns - but it means the out-of-box experience is more passive than the star count implies. You get capture without retrieval injection unless you opt in.
For a week-old trending tool at v0.9.x, the architecture is serious and the documentation is thorough. Worth a try against a real project before committing.
Technical content at the intersection of AI and development. Building with AI agents, Claude Code, and modern dev tools - then showing you exactly how it works.
Anthropic's agentic coding CLI. Runs in your terminal, edits files autonomously, spawns sub-agents, and maintains memory...
View ToolTypeScript-first AI agent framework. Agents, tools, memory, workflows, RAG, evals, tracing, MCP, and production deployme...
View ToolGives AI agents access to 250+ external tools (GitHub, Slack, Gmail, databases) with managed OAuth. Handles the auth and...
View ToolInteractive TUI dashboard that shows exactly where your Claude Code and Cursor tokens are going, in real time.
View ToolDesign subagents visually instead of editing YAML by hand.
View AppEvery coding agent in one window. Stop alt-tabbing between Claude, Codex, and Cursor.
View AppTurn a one-liner into a working Claude Code skill. From idea to installed in a minute.
View AppConfigure Claude Code for maximum productivity -- CLAUDE.md, sub-agents, MCP servers, and autonomous workflows.
AI AgentsDefine custom subagent types within your project's memory layer.
Claude CodeConfigure model, tools, MCP, skills, memory, and scoping.
Claude Code
Nimbalyst Demo: A Visual Workspace for Codex + Claude Code with Kanban, Plans, and AI Commits Try it: https://nimbalyst.com/ Star Repo Here: https://github.com/Nimbalyst/nimbalyst This video demos N...

Composio: Connect AI Agents to 1,000+ Apps via CLI (Gmail, Google Docs/Sheets, Hacker News Workflows) Check out Composio here: http://dashboard.composio.dev/?utm_source=Youtube&utm_channel=0426&utm_...

Anthropic has released Channels for Claude Code, enabling external events (CI alerts, production errors, PR comments, Discord/Telegram messages, webhooks, cron jobs, logs, and monitoring signals) to b...
agentmemory gives AI coding agents a persistent brain - capturing session context automatically via 12 Claude Code hooks...
Ruflo crossed 37,700 GitHub stars this week, adding nearly 1,900 in a single day. It turns Claude Code into a coordinate...
CodeGraph builds a local SQLite index of your codebase so Claude Code, Cursor, and Codex CLI spend far fewer tokens expl...
CodeGraph hit 7,800+ stars with 1,900 added in a single day - a local MCP knowledge graph that lets Claude Code explore...
zilliztech/claude-context is an MCP server that indexes your entire codebase with hybrid vector search, letting Claude C...
zilliztech/claude-context landed on GitHub's daily trending list with 873 new stars today - here's what this Claude Code...

New tutorials, open-source projects, and deep dives on coding agents - delivered weekly.