rohitg00/agentmemory
#1 Persistent memory for AI coding agents based on real-world benchmarks
What it solves
Coding agents often suffer from "forgetfulness," requiring users to re-explain project architectures, preferences, and previous bugs across different sessions. While static files like .cursorrules exist, they are limited in size and quickly become outdated. agentmemory provides a persistent, shared memory layer that automatically captures agent activities and injects relevant context into new sessions without manual updating.
How it works
Built on the iii engine, agentmemory acts as a memory server that integrates with AI agents via hooks, the Model Context Protocol (MCP), or REST APIs. It silently captures agent actions, compresses them into searchable memory, and uses a hybrid search approach—combining BM25 (keyword), vector embeddings (semantic), and structural graph matches—to retrieve the most relevant information. It can run in a keyless mode using BM25 or with local embeddings (via all-MiniLM-L6-v2) for free on-device semantic recall.
Who it’s for
Developers using AI coding agents such as Claude Code, Cursor, GitHub Copilot CLI, Gemini CLI, and other MCP-compatible clients who want their agents to maintain long-term project knowledge across sessions and different tools.
Highlights
- Broad Compatibility: Works with a wide array of agents including Claude Code, Cursor, Codex CLI, and OpenCode via native plugins, hooks, or MCP.
- Automatic Capture: Features 12 auto-hooks to capture information with zero manual effort.
- Hybrid Retrieval: Combines keyword, vector, and graph search to achieve high retrieval accuracy (95.2% R@5 on LongMemEval-S).
- Zero External DBs: Operates without requiring external database installations.
- Token Efficiency: Significantly reduces token usage compared to pasting full context or using LLM-summarized approaches.
Related
- Project
- Project
- Project
- Project
- Project