agentmemory

Persistent memory for coding agents · CLI + skills

Stop losing context between sessions.

agentmemory gives your coding agent a durable, local-first memory — long-term facts, daily logs, topic notes, and a scratchpad checklist, all stored as plain markdown you can read, edit, and commit. Optional qmd semantic search surfaces the right memory into every turn, automatically.

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

Why agentmemory?

Coding agents start every session from zero. agentmemory is the memory layer that makes them remember — without a database, a cloud account, or vendor lock-in.

🧠 Memory that persists

Decisions, preferences, and project context carry across sessions, so your agent stops re-learning your stack on every run.

📁 Plain markdown, local-first

Every memory is a readable file on disk — diff it, edit it, commit it to git. No database, no cloud, no lock-in.

🔍 Semantic search

Optional qmd integration adds keyword, semantic, and hybrid search across every memory file you've ever written.

⚡ Automatic context injection

Relevant past memories surface into each turn on their own — no manual tool calls, no copy-pasting context.

🤝 One memory, every agent

The same store is shared across Claude Code, Codex, Cursor, and Agent — switch tools without losing what they know.

⏱️ Zero-config setup

Two commands: init and install-skills. Works the moment you install it, qmd or not.

How it's different

Most memory tools are cloud services with their own SDK and storage. agentmemory is the opposite: files you own, on the agents you already use.

  agentmemory Hosted memory SaaS A single CLAUDE.md
Storage Local markdown files Vendor cloud One local file
Search Keyword + semantic (qmd) Vector DB None
Auto context injection Yes Varies Manual
Works across agents Claude Code · Codex · Cursor · Agent SDK per app Per project
Account required No Yes 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

Initialize memory

Create the memory directory and wire optional qmd integration.

agent-memory init

Install skill files

Wire memory into Claude Code, Codex, Cursor, and Agent CLI in one command.

agent-memory install-skills

Setup in three steps

  1. Install `agent-memory` from npm or Homebrew.
  2. Run `agent-memory init` to create local memory storage.
  3. Run `agent-memory install-skills` to enable prompt injection across agents.