Skip to content
Agent Memory
MCP

ai-memory

Ships with ai-memory: Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors

From plugin
ai-memory
16k7 skills1 hook1 MCP

Claude Code

> /plugin marketplace add akitaonrails/ai-memory
> /plugin install ai-memory@ai-memory

Security report

Info

Not enough data

  • Known flaws

    Not published

  • Signed build

    Not published

  • Maintained

    Nov 15, 2026

    Last push

  • Licence

    MIT

  • Runs as

    Local process

    On your machine

  • Deprecated

    Not published

Signals from public registries, not an audit. Checked Nov 19, 2026.

ai-memory README

ai-memory

Long-term memory for AI coding agents. Quit Claude Code mid-task, start OpenAI Codex in the same directory, continue without re-explaining the architecture, the failed approaches, or the open questions.

Website: aimemory.sh

Website Release Rust License

Why ai-memory

Your coding agent probably has a memory feature already. Claude Code takes its own notes, Cursor remembers some things, and every platform is adding more. They all have the same limits: the notes live on one machine, belong to one agent, and drop out of view when you switch tools or hand the work to a teammate.

ai-memory removes those limits.

  • It follows you across agents. More than twenty harnesses (Claude Code, Codex, Cursor, Gemini CLI, OpenCode, Grok, Devin, Kimi, Kiro, and others) feed one shared memory. Quit Claude Code mid-task, open Codex in the same directory, and the next agent picks up a handoff that says where you left off, what failed, and what is still open. Handoffs are a typed protocol: each one has an owner and is claimed exactly once.

  • It can carry the session, not just a summary. Start agents with ai-memory run: quit Claude Code, run ai-memory run codex, and Codex gets the shared workstream plus a private, temporary local projection of Claude's visible native history for exact details the bounded startup packet omitted. The remote server receives only the harness and session identity, never the local transcript path or body. Direct harness launches behave exactly as before.

  • It follows you across projects. A small profile of how you usually work (your package manager, test layout, architecture habits) reaches every new repository at session start, so you stop re-explaining yourself. It sits below each repository's rules file as a default. It is on by default for a single user, and on a shared server it is opt-in and private per person. See docs/cross-project-profile.md.

  • It follows you across machines. Memory lives in a server you run, on the same laptop, a homelab box, or anywhere else, so the project you left on the desktop is the project you resume on the laptop, with the same knowledge and the same open questions.

  • It works for a team. Point everyone at one server, and what one person's sessions learn, everyone's agents can retrieve. Knowledge is shared per project; personal handoffs stay personal. Multi-user auth, per-person attribution, and an audit log are built in and are not a paid tier.

  • Your memory is plain markdown. The source of truth is a git-backed wiki of ordinary .md files: grep it, open it in Obsidian, edit it by hand, rsync it. The database is a derived index that can always be rebuilt from the files. There is no vector store to maintain and no content locked in a binary blob.

  • It captures the work itself, silently. Lifecycle hooks record what happened (prompts, tool calls, session boundaries), sanitize it at a typed privacy boundary before anything is stored, and the server consolidates it into readable pages. You do not have to ask it to remember anything. The default path uses zero LLM calls: capture, search, and handoffs all work with no API key.

  • It ages memory without an LLM. Memory decays on a schedule you can tune per tier, and memory you use decays slower: opening a page, searching it, or reaching it through a link counts as use. When episodic notes go cold they can be compacted down to their durable facts (file paths, error codes, decisions) instead of dropped. Near-duplicates collapse into one, and likely contradictions get flagged, all with zero API calls. Nothing is hard-deleted: the original stays in git and the version chain (restore-page brings it back). Access-weighted retention is always on because it can only keep memory longer. The parts that rewrite or drop content (compaction, dedup, per-tier curves) stay off by default until you turn them on.

  • It can also "dream", if you let it. With an LLM configured, an opt-in background pass rewrites whole clusters of cold notes into single coherent pages while you are idle, and cancels as soon as you come back to work. It never deletes a source (the pre-merge versions stay reachable), it is off by default, and it has to pass a recall eval before it could become default behavior. Unless you ask for more, the zero-LLM path above is what runs.

  • It is honest about itself. It ships as one self-contained binary. Purge commands say exactly what "deleted" means. The write ceiling (~700/s) is measured, not guessed. An audit log records every mutation.

How it works

capture ──▶ consolidate ──▶ recall ──▶ handoff
 hooks        session-end      search     next agent,
 observe      summaries as     + brief    any harness
 silently     wiki pages       injection

Agents emit sanitized observations through lifecycle hooks as you work. At session end, observations become coherent markdown pages in the project's wiki (optionally LLM-written; useful even without). The next session, in any agent on any machine, gets a bounded brief and can search everything: full-text, entities, links, and (optionally) vectors, fused into one ranking. Cross-agent handoffs pass the baton explicitly.

The full design, including the invariants that keep multi-user and multi-session use safe, is in docs/ARCHITECTURE.md.

An optional server-rendered management console provides user administration, session inspection and deletion, and personal MCP API keys. Build with --features management-ui and start serve --transport http --enable-management-ui; both compile-time and runtime opt-ins are required.

Support matrix

Every row below is a first-party integration (MCP registration, lifecycle hooks, or both) checked by CI. The full matrix with per-agent notes and caveats is in docs/support-matrix.md.

AreaStatus
LinuxSupported
NixOS moduleSupported
macOSSupported
Windows via WSL2Supported
Native WindowsExperimental
Claude CodeSupported
CodexSupported
Command CodeSupported
Devin CLISupported
OpenCode (V1/V2 auto-detected; legacy force-V2 aliases retained)Supported
CursorSupported
Gemini CLISupported
Oh My Pi / OMPSupported
PiSupported
CrushManaged-only
Managed workstreamsOpt-in
Claude DesktopMCP-only
OpenClawSupported
Antigravity CLISupported
Grok Build CLISupported
Swival CLIMCP-only
ZeroSupported
ZCodeSupported
Kimi CodeSupported
Kiro CLISupported
PoolHooks-only
GitHub Copilot CLISupported
Factory DroidSupported
Meta Muse CodeSupported
CodeBuddy CodeHooks-only
IBM BobSupported
Qwen CodeSupported
QoderSupported
VS Code CopilotMCP-only
ZedMCP-only
DeepSeek Harness (DSH)Hooks + MCP
Cline CLIHooks + MCP
FreeBuffMCP-only
Prime AgentMCP-only
Hermes AgentSupported
GrizzyBotSupported
LLM/auth providersSupported
Embedding providersSupported

Coming from another tool?

Most agent-memory tools optimize for one thing: extracting atomic facts per turn, a temporal knowledge graph, an agent-editable memory OS, or a hosted context API. ai-memory is built around a git-backed markdown wiki as the source of truth, with a derived index for retrieval. It captures automatically from lifecycle hooks, is shared across agents, machines, and people, and works with zero LLM calls by default. This table shows what carries over from each tool and what you gain:

Coming from…What's similarWhat you gain
Mem0 / fact extractors (LangMem)Automatic per-turn captureMemory compiles into readable pages you own and edit, not opaque fact rows; retrieval fuses FTS + entity + graph (+ local vectors) with no cloud API key
Zep / Graphiti (temporal KG)Temporal reasoning, typed relationsBi-temporal-lite (as_of, version-filtered search) and typed edges without standing up a graph database, in one binary
mcp-memory-service (fact rows, SQLite)SQLite + local embeddings, hook capture, typed edges, honest numbers, and, on 2.4, per-tier decay curves, extractive compression, DBSCAN cold-cluster dedup, access reinforcement, and contradiction flaggingHuman-editable markdown pages instead of fact-rows, cross-agent claim-once handoffs, and the same aging machinery done zero-LLM by default, reversibly (supersede-not-delete + restore-page), and off by default
basic-memory (file-first markdown)Markdown-on-disk as the source of truthAutomatic lifecycle capture and a derived FTS/entity/graph index on top, cross-agent handoffs, and multi-user sharing built in
Claude Code built-in memory"Remember my project" convenience, zero setupSynced across machines and agents, searchable, team-capable, and captures tool lifecycle, unlike a per-laptop MEMORY.md
Hindsight / OpenViking (LLM or VLM in the loop)Living pages / document memory with a background consolidation loop, plus, on 2.4, belief-strength confidence plus an opt-in LLM "dream" rewrite of cold clustersA self-contained binary that runs zero-LLM by default and keeps memory in markdown files that are the source of truth, not a mirror; claim-once handoffs; the dream/belief features are opt-in, off by default, and never delete a source (vs a mandatory LLM loop)
Supermemory / LiquidLM (hosted memory API)A managed second brain with automatic ingestionGit-versioned markdown you own, no required API spend, offline operation, and per-project team sharing; ai-memory remembers this repo, not a general vault

Across all of these, ai-memory gives you files you own (git-backed markdown), a zero-LLM default, one self-contained binary, sharing across agents, machines, and teams, automatic lifecycle capture, and typed, claim-once handoffs. Opt-in features (LLM consolidation, vector search, the "dream" consolidation pass, belief-strength in ranking) stay opt-in, and the zero-LLM aging path (per-tier decay, extractive compaction, dedup, contradiction flagging, access-weighted retention) works with no API key at all.

Built on the shoulders of: the Karpathy LLM Wiki (compile-not-retrieve), agentmemory (hook capture for coding agents), basic-memory (markdown-on-disk truth), cognee (pipeline composition and triplet embeddings), Hermes Agent (the self-improvement loop), and A-MEM (Zettelkasten-style atomic notes).

The full comparison, covering where each approach wins, where ai-memory differs, and the published benchmark, is in How ai-memory compares.

Quick start

Linux and macOS (two commands, no root)

curl -fsSL https://github.com/akitaonrails/ai-memory/releases/latest/download/install.sh | sh
ai-memory setup
@akitaonrails
Ships withai-memory
16k7 skills1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
16.0k
Star history of akitaonrails/ai-memory on GitHub, a chart by star-history.com

More MCP servers from other plugins.

cmem

cmem

MCP

Ships with claude-mem: Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions,…

@thedotmack@thedotmackInstall MCP
mempalace

mempalace

MCP

Ships with mempalace: Local-first AI memory. Verbatim storage, pluggable backend, 96.6% R@5 raw on LongMemEval — zero API calls.

@mempalace@mempalaceInstall MCP
mempalace

mempalace

MCP

Ships with mempalace: Local-first AI memory. Verbatim storage, pluggable backend, 96.6% R@5 raw on LongMemEval — zero API calls.

@milla-jovovich@milla-jovovichInstall MCP

Questions about ai-memory.

Which coding agents can use ai-memory?
ai-memory works in any agent that reads an MCP config file: Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf. Each agent reads it from its own file; this page names the file for each one.
How do I add ai-memory to Claude Code?
Run these in order, one at a time. 1. In Claude Code: /plugin marketplace add akitaonrails/ai-memory 2. In Claude Code: /plugin install ai-memory@ai-memory