Skip to main content
Agent Memory is a persistent memory engine for AI coding agents. It silently runs in the background, capturing everything your agent observes — file edits, commands, decisions, discoveries — and recalls the right context at the start of every new session. Your agents stop forgetting.

Quick Start

Install Agent Memory and connect your first agent in under 2 minutes.

Connect Agents

Wire up Claude Code, Cursor, Copilot, Codex, and 13+ other agents.

Core Concepts

Understand how Agent Memory captures, compresses, and recalls context.

Configuration

Tune memory behavior, enable features, and connect LLM providers.

Get up and running

1

Install Agent Memory

npm install -g @agentmemory/agentmemory
2

Start the memory server

agentmemory
The server starts on port 3111 and a real-time viewer launches on port 3113.
3

Connect your agent

For Claude Code, use the plugin marketplace:
/plugin marketplace add rohitg00/agentmemory
/plugin install agentmemory
For all other MCP-compatible agents, run:
agentmemory connect cursor   # or copilot, codex, gemini-cli, cline, etc.
4

Verify it's working

agentmemory status
You’ll see session counts, memory stats, and token savings in real time.

Why Agent Memory

95.2% Recall

Best-in-class retrieval on LongMemEval-S (500 questions), using triple-stream hybrid search: BM25 + vector + knowledge graph.

92% Token Savings

~170K tokens per year vs 19.5M+ for full-context approaches — without losing relevant history.

No External DBs

Runs entirely on local SQLite. No Redis, no Postgres, no cloud setup required.

Explore the docs

How Memory Works

Learn about the 4-tier consolidation pipeline and how observations become memories.

LLM Providers

Connect Anthropic, OpenAI, Gemini, OpenRouter, or run fully offline with Ollama.

Team Memory

Share memory across your team with multi-agent scoping and coordination.

REST API

Integrate directly with the 128-endpoint REST API on port 3111.

MCP Tools

Reference for all 53 MCP tools, resources, and prompts.

CLI Reference

Full reference for all agentmemory CLI commands and options.