agentmemory

Built from lessons across 1,000+ coding-agent sessions

Memory that survives the agent.

AgentMemory is a local, user-owned state layer for coding agents. Keep scratch work, daily evidence, topic notes, and durable decisions as plain Markdown, then retrieve what matters with optional qmd search.

npm version npm downloads GitHub stars MIT license
Claude Code OpenAI Codex Cursor Agent CLI

Prefer to have your coding agent do the install and setup for you? Copy this and paste it in:

Read https://jayzeng.github.io/agentmemory/onboarding.md and follow it: set me up with AgentMemory on this machine, fix anything that isn't configured yet, then show me how to get more value out of it.

AgentMemory Core and Pro

Core remembers what you save. Pro learns from what you do.

Core gives durable memory an inspectable home. Pro recalls prior coding sessions, spots repeated corrections, and lets you review what it learned locally.

Core — free and open source

You choose what to remember in local Markdown that works across coding agents.

  • Scratch, daily, topic, and durable memory
  • Explicit retrieval with optional qmd search
  • No account and no commercial dependency

Pro — local recall and learning

Find decisions in prior sessions and turn repeated evidence into reviewable memory.

  • Recall coding history across supported agents
  • Learn from repeated corrections and rediscovery
  • See what it learned and why in the Memory Dashboard
agent-memory pro install

Try Pro — no account required. The free preview includes 20 recalls and 5 learning scans per day. Indexing and the Memory Dashboard remain available; AgentMemory's services do not receive coding history. How local privacy works.

The systems argument behind AgentMemory

A transcript is not memory.

More than 1,000 sessions across Claude Code, Codex, Cursor, Pi, and OpenCode led to one conclusion: continuity requires judgment, not merely more stored activity.

A session records what the agent did. Memory is a judgment about what the next agent should know.
Read the full field report →
Evidence

Sessions, feedback, source material, and observed facts

Judgment

Extract, qualify, or discard what might matter later

Memory destinations
Scratch Daily Topic Durable
Use and maintain

Retrieve, supersede, invalidate, or forget

These are destinations for different needs, not a mandatory ladder. Evidence can also be discarded.

Why AgentMemory?

Coding-agent sessions preserve activity. AgentMemory gives the state worth carrying forward explicit lifetimes and a user-controlled home.

🧭 Different lifetimes and scopes

Route short-lived follow-ups, chronological evidence, continuing topics, and durable decisions to the right destination.

🧠 Curated continuity

Retain judgments that should affect future work instead of warehousing every transcript and abandoned path.

📁 Plain Markdown, local-first

Read, edit, diff, back up, or delete every memory. No database, cloud service, or vendor lock-in.

🔍 Explicit, optional retrieval

Skills load base context at session start and search related memory when a task needs it; qmd remains optional.

🤝 One memory, every agent

The same store works across Claude Code, Codex, Cursor, and Agent even as models and harnesses change.

🛠️ Inspectable and correctable

Provenance, temporal status, secret screening, supersession, and forgetting help keep memory aligned with reality.

Mutable state needs a different home.

Project instruction files are right for stable policy. AgentMemory carries the changing facts, decisions, and follow-ups that should shape future work.

  AgentMemory Hosted memory service Project instructions
Purpose Mutable accumulated state Managed application memory Stable project policy
Source of truth Local Markdown files Vendor-managed storage Repository file
Lifetimes and scopes Scratch · daily · topic · durable Product-specific One policy scope
Context delivery Session start + explicit search Product-specific Host-loaded policy
Portability Claude Code · Codex · Cursor · Agent Integration-dependent Repository-scoped
Account required No Typically No

See it in action

Memory is just markdown. Here's what your agent reads back at the start of every session.

# ~/.agent-memory/MEMORY.md

## Stack
Postgres for all backend services. #decision [[database-choice]]
URL-prefix API versioning (/v1/) to avoid CDN cache issues. #lesson

## Preferences
Neovim + LazyVim. Conventional commits. Run tests before every push.

# Recall it later, in any agent:
$ agent-memory search --query "how do we version the API" --mode semantic
→ URL-prefix API versioning (/v1/) to avoid CDN cache issues.

Install in under a minute

Grab the CLI, create your memory store, and wire it into every agent you use.

Install from npm

Use this when you want the latest CLI quickly on any platform.

npm install -g myagentmemory

Install from Homebrew

Fast install path for macOS users.

brew install jayzeng/agentmemory/agent-memory

One-shot setup

Idempotent: creates the memory directory, wires qmd, skills, hooks, MCP registration, and a local Pro preview scan — all in one command.

agent-memory setup

Install skill files only

Already covered by setup above — run this on its own only if you want just the Claude Code, Codex, Cursor, or Agent CLI skill files.

agent-memory install-skills

Setup in two steps

  1. Install `agent-memory` from npm or Homebrew.
  2. Run `agent-memory setup` — one-shot: memory dir, skills, hooks, MCP registration, local Pro preview.

Then open your agent and ask "what do you remember about me?"