Agentmemory favicon

Agentmemory

AGENTMEMORY: The Ultimate Memory Layer for Coding Agents Featuring Triple-Stream Retrieval and Zero External Databases

Introduction:

AGENTMEMORY is a high-performance, local memory runtime designed specifically for coding agents. It provides a seamless memory layer that captures every session, utilizes triple-stream retrieval (BM25, Vector, and Knowledge Graph), and requires zero external databases. Built on the III Engine, AGENTMEMORY offers 95.2% retrieval accuracy, reducing input tokens by 92% and providing 51 native MCP tools for comprehensive agent integration.

Added On:

2026-05-18

Monthly Visitors:

--K

Agentmemory - AI Tool Screenshot and Interface Preview

Agentmemory Product Information

AGENTMEMORY: The High-Performance Memory Layer for Modern Coding Agents

In the rapidly evolving world of AI development, AGENTMEMORY stands as the definitive memory layer your coding agent should have had from day one. Designed for speed, efficiency, and local control, AGENTMEMORY ensures that your AI agents capture every session, recall information in milliseconds, and run anywhere without the overhead of external infrastructure.

AGENTMEMORY is not just a library or a simple vector store; it is a complete memory runtime that handles capture, recall, consolidation, observation, and federation. With over 11.2K stars on GitHub and backing by the Linux Foundation, AGENTMEMORY has established itself as the premier solution for developers looking to enhance their agentic workflows.

What's AGENTMEMORY?

AGENTMEMORY is a comprehensive memory layer built on the III Engine, where every memory operation functions as a worker, a function, or a trigger. Unlike traditional systems that rely on complex stacks, AGENTMEMORY requires zero external databases. There is no need for Redis, Kafka, Postgres, Qdrant, or Neo4j. The entire runtime exists as a single Node process, with state stored locally on disk as JSON.

By implementing AGENTMEMORY, users benefit from a system that provides 95.2% retrieval accuracy (R@5 on LongMemEval-S) while achieving a staggering 92% reduction in input tokens per session. It is designed to be the "long-term brain" for coding agents, ensuring they never lose context across sessions.

Key Features of AGENTMEMORY

AGENTMEMORY is packed with features that simplify the management of agent state and historical data:

1. The Triple-Stream Recall

AGENTMEMORY utilizes a unique triple-stream retrieval system that combines BM25 lexical search, vector semantic search, and relational knowledge graphs. These results are reranked on-device, achieving a P50 latency of under 20ms even on a standard laptop.

2. Twelve Auto-Capture Hooks

Integration is seamless with 12 auto-capture hooks that pipe directly into your coding agent. Every tool call, prompt, and stop sequence becomes a compressed observation automatically, requiring no additional glue code.

3. Native MCP and REST Surface

  • 51 MCP Tools: Includes memory_save, memory_recall, memory_smart_search, and more, all behind a single Model Context Protocol (MCP) server.
  • 121 REST Endpoints: Every MCP tool has a corresponding REST twin, making AGENTMEMORY highly accessible via Curl, browser fetch, or proxy.

4. Semantic Consolidation

AGENTMEMORY performs hourly sweeps to compress raw observations into semantic memories. This process merges duplicates, decays stale rows based on retention scoring, and emits audit rows for every deletion to maintain data integrity.

5. Knowledge Graph Extraction

During compression, AGENTMEMORY extracts entities and relations to build a knowledge graph. This graph supports temporal edges and can be visualized within the built-in viewer or queried via the /agentmemory/graph endpoint.

6. Mesh Federation and Peer-to-Peer Sync

For distributed environments, AGENTMEMORY supports mesh federation. You can register another AGENTMEMORY node and push or pull memories over authenticated HTTPS using bearer tokens.

7. Obsidian Export

Users can mirror their memories to a sandboxed vault directory. AGENTMEMORY exports frontmatter-tagged markdown files ready for Obsidian's graph view, allowing you to browse agent memories as personal notes.

The AGENTMEMORY Stack: Three Primitives

The architecture of AGENTMEMORY is built on three core primitives to ensure high performance without a "framework tax":

  • Hooks: 12 auto-hooks capture data in real-time from the agent's operations.
  • Recall: The hybrid retrieval engine (BM25 + Vector + Graph) provides industry-leading accuracy.
  • Consolidate: Raw data is periodically transformed into refined semantic memories to prevent storage bloat and context noise.

Use Cases for AGENTMEMORY

AGENTMEMORY is versatile and can be applied to various agentic development scenarios:

  • Session Rehydration: Use the JSONL session import to point AGENTMEMORY at a Claude Code transcript. It will rehydrate the full timeline, including tool uses and observations.
  • Cross-Agent Knowledge Sharing: Through Mesh Federation, different agents can share learned insights across a network.
  • Local Knowledge Base: Developers can use AGENTMEMORY as a local, private knowledge base that remains entirely on their machine, ensuring data privacy.
  • Debugging and Observability: With built-in OpenTelemetry (OTEL) support, every operation produces a span, allowing for deep debugging of agent thoughts and actions.

How to Use AGENTMEMORY

Getting started with AGENTMEMORY is straightforward. It runs locally and supports multiple LLM providers, including Claude, Anthropic API, Gemini, MiniMax, and OpenRouter.

Installation

To install AGENTMEMORY globally on your system, use the following command:

npm install -g @agentmemory/agentmemory

Starting the Server

Once installed, you can start the memory server, which runs on port 3111 by default:

agentmemory

Running a Demo

To see the power of hybrid search and semantic recall instantly, run the demo command which seeds three example sessions:

agentmemory demo

Connecting to Agents

AGENTMEMORY provides a universal MCP configuration that works with Claude Desktop, Cursor, Cline, Roo Code, Windsurf, and Gemini CLI.

Universal MCP JSON Config:

{
  "mcpServers": {
    "agentmemory": {
      "command": "npx",
      "args": ["-y", "@agentmemory/mcp"],
      "env": {
        "AGENTMEMORY_URL": "http://localhost:3111"
      }
    }
  }
}

AGENTMEMORY vs. The Field

How does AGENTMEMORY compare to other memory solutions? According to the LongMemEval-S benchmark, AGENTMEMORY outperforms the competition in both retrieval and simplicity.

| Feature | AGENTMEMORY | Mem0 | Letta | Cogne | | :--- | :--- | :--- | :--- | :--- | | Retrieval R@5 | 95.2% | 81.4% | 73.8% | 78.1% | | External Deps | 0 | 2 | 1 | 1 | | REST Endpoints | 121 | — | — | — | | MCP Tools | 51 | 12 | 18 | 9 | | Auto-Hooks | 12 | 0 | 0 | 0 |

FAQ

Q: Does AGENTMEMORY require a specific database? A: No. AGENTMEMORY runs as a single process and stores state locally as JSON. It requires zero external databases like Redis or Postgres.

Q: What LLMs does AGENTMEMORY support? A: It supports Anthropic (Claude), Gemini, MiniMax, and OpenRouter. It can automatically detect your provider from your environment variables.

Q: How can I visualize the memories? A: AGENTMEMORY ships with a real-time viewer on port 3113 and an engine-level console on port 3114. These allow you to browse the live observation stream, session explorer, and knowledge graph.

Q: Is it open source? A: Yes, AGENTMEMORY is licensed under Apache-2.0 and is built entirely in the open.

Loading related products...