🧭 Different lifetimes and scopes
Route short-lived follow-ups, chronological evidence, continuing topics, and durable decisions to the right destination.
Built from lessons across 1,000+ coding-agent sessions
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.
The systems argument behind AgentMemory
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 →
Sessions, feedback, source material, and observed facts
Extract, qualify, or discard what might matter later
Retrieve, supersede, invalidate, or forget
These are destinations for different needs, not a mandatory ladder. Evidence can also be discarded.
Coding-agent sessions preserve activity. AgentMemory gives the state worth carrying forward explicit lifetimes and a user-controlled home.
Route short-lived follow-ups, chronological evidence, continuing topics, and durable decisions to the right destination.
Retain judgments that should affect future work instead of warehousing every transcript and abandoned path.
Read, edit, diff, back up, or delete every memory. No database, cloud service, or vendor lock-in.
Skills load base context at session start and search related memory when a task needs it; qmd remains optional.
The same store works across Claude Code, Codex, Cursor, and Agent even as models and harnesses change.
Provenance, temporal status, secret screening, supersession, and forgetting help keep memory aligned with reality.
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 |
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.
Grab the CLI, create your memory store, and wire it into every agent you use.
Use this when you want the latest CLI quickly on any platform.
npm install -g myagentmemory
Fast install path for macOS users.
brew install jayzeng/agentmemory/agent-memory
Create the memory directory and wire optional qmd integration.
agent-memory init
Wire memory workflows into Claude Code, Codex, Cursor, and Agent CLI in one command.
agent-memory install-skills