agentmemory logo

agentmemory

Visit

Persistent, searchable memory for AI coding agents with 95.2% recall on LongMemEval, running locally on SQLite with MCP, hooks, and 54 tools for Claude Code, Cursor, and Codex.

Share:

agentmemory

agentmemory is a persistent, searchable memory layer for AI coding agents. Instead of the sticky-note style memory files that Claude Code, Cursor, or Codex keep, agentmemory stores observations as structured, retrievable facts in a local SQLite database, and exposes them to any agent through MCP, hooks, or REST. The project reports 95.2% retrieval recall (R@5) on LongMemEval, claims 92% fewer tokens spent on context, ships 54 MCP tools and 12 auto hooks, and runs with zero external databases. The repository was created February 25, 2026, and shows about 27K stars.

Key Features

  • Real retrieval over sticky notes: Observations are compressed into structured facts, deduplicated with SHA-256, privacy-filtered, embedded, and indexed in both BM25 and vector search.
  • Works with every agent: Adapters for Claude Code, GitHub Copilot CLI, Cursor, Gemini CLI, Codex CLI, Hermes, OpenClaw, pi, and OpenCode, plus any MCP client.
  • Local-first, zero external DBs: Everything runs on SQLite with no Qdrant, Postgres, or external API keys required.
  • Benchmark-leading recall: 95.2% R@5 on LongMemEval, above Mem0 (68.5%) and Letta/MemGPT (83.2%) in the project's published benchmarks.
  • 54 MCP tools and 12 auto hooks: The memory server on :3111 exposes tools for storing, retrieving, and reasoning over facts, and hooks auto-capture session context.
  • Native skills: npx skills add rohitg00/agentmemory -y installs 17 skills so the agent knows when to reach for memory.

Use Cases

Who Should Use This Tool?

  • Coding-agent users: Give Claude Code, Codex, or Cursor a long-term memory of decisions, preferences, and project facts.
  • Teams running agents: Share one memory server across multiple agents so all tools see the same context.
  • Privacy-conscious developers: Keep memory local on SQLite with no external database service.

Problems It Solves

  1. Re-explaining context: Agents no longer forget the project's conventions and your preferences between sessions.
  2. Memory bloat: Structured, compressed facts and dedup replace growing prompt-injected notes.
  3. Cross-tool silos: One server shared by Claude Code, Cursor, and Codex means context follows the work.

Pricing

agentmemory is open source under the Apache-2.0 license. npx @agentmemory/agentmemory runs the interactive setup and memory server locally at no cost. There is no hosted tier in the repository; you run it on your own machine.

Advantages & Unique Selling Points

  1. Benchmark-driven: Claims are tied to LongMemEval recall numbers and published comparisons rather than vague marketing.
  2. Zero external dependencies: No separate vector database or API service to provision and pay for.
  3. Broad agent coverage: One install wires the major coding agents, so the memory follows the work across tools.

Getting Started

Quick Start Guide

  1. Run npx @agentmemory/agentmemory.
  2. Pick the agents to wire (Claude Code, Cursor, Codex, Gemini CLI, OpenCode) and an LLM provider, or stay keyless.
  3. It seeds config, starts the memory server on :3111, and offers a global install so agentmemory works anywhere.
  4. Verify recall with agentmemory demo --serve.
  5. Add native skills so your agent knows when to reach for memory: npx skills add rohitg00/agentmemory -y.

Frequently Asked Questions

Does it need a vector database?

No. Indexing uses BM25 plus vector search with local options and no external database.

Which agents are supported?

Claude Code, GitHub Copilot CLI, Cursor, Gemini CLI, Codex CLI, Hermes, OpenClaw, pi, OpenCode, and any MCP client via 20 adapters.

Is there a hosted version?

The project is local-first; there is no hosted tier in the repository.

How does it compare to Mem0?

agentmemory's published LongMemEval recall (95.2%) is higher than Mem0's (68.5%) in the project's benchmarks, and it runs entirely local with no external databases.

Alternatives

  • Letta: MemGPT-style stateful agent memory runtime with a cloud option.
  • LangGraph: a graph-based agent framework when you need orchestration on top of memory.
  • Mem0: hosted and self-hosted agent memory with vector search.

Tips & Best Practices

  1. Verify the benchmark claims on your own data: LongMemEval recall is a useful signal, but run your own recall test on your codebase.
  2. Wire multiple agents: The value compounds when Claude Code, Cursor, and Codex share one memory server.
  3. Review privacy filtering: Confirm the privacy filter settings match your data handling needs before pointing production work at it.

Conclusion

agentmemory turns an agent's forgetfulness into a solved problem with a local, searchable memory that any major coding agent can use. If you are tired of re-explaining context and paying for memory infrastructure, it is the fastest local option to get retrieval-grade memory behind Claude Code, Cursor, or Codex.

Comments

No comments yet. Be the first to comment!