ai-memory: one shared memory for every coding agent
Added NewCopyable prompt below
Published Last verified Released
Our verdict
Worth setting up if you switch between coding agents or machines and keep re-explaining the same project. ai-memory records what each session did through hooks, turns it into plain markdown pages in a git-backed wiki, and gives the next agent a short brief plus a handoff saying what is done, what failed and what is still open. Search and handoffs work with no LLM calls and no API key. Two cautions: the hooks capture your prompts and tool calls (sanitised before storage, on a server you run), so treat that server like any store of source context; and the quick install pipes a script into sh, though the script checks the release's SHA-256 checksum first.
- Who it's for
- Developers who use more than one coding agent (Claude Code, Codex, Cursor, Gemini CLI, OpenCode and others), work across several machines, or want a team to share what their agents learn
- Leverage
- Switch agents mid-task without re-explaining the architecture, the failed approaches or the open questions
- Effort
- Medium
- Date added
What it does
ai-memory (akitaonrails/ai-memory, MIT, written in Rust) runs a memory server on your laptop, a homelab box or a shared host. setup wires MCP, lifecycle hooks and Agent Skills into each agent it finds. The hooks capture prompts, tool calls and session boundaries, sanitise them, and the server consolidates them into readable markdown pages you can grep, edit or open in Obsidian; the database is an index rebuilt from those files. Handoffs are typed: each has an owner and is claimed once. ai-memory run starts an agent with the shared workstream plus a temporary local copy of the previous agent's visible history, and the server never receives the transcript itself. A cross-project profile (package manager, test layout, habits) follows you to new repos. Multi-user auth, attribution and an audit log are included.
How builders use it
- Install the binary with the install script (Linux and macOS) or install.ps1 (Windows); AUR, rpm, a macOS app and Docker are also documented.
- Run ai-memory setup --plan to see which agents it will wire, then ai-memory setup to apply it.
- Restart your agents and ask one: "What do you remember about this project?"
- When you switch tools mid-task, start the next one with ai-memory run codex (or claude, and so on) so it picks up the handoff.
- For a team, point everyone at one server; project knowledge is shared and personal handoffs stay personal.
What to expect
The next agent, on any machine, starts with where you stopped, what failed and what is still open, from markdown files you own.
Copy this: Install, wire your agents, hand off
# Official source: github.com/akitaonrails/ai-memory (site: aimemory.sh)
curl -fsSL https://github.com/akitaonrails/ai-memory/releases/latest/download/install.sh | sh
ai-memory setup --plan # shows which agents it will wire, changes nothing
ai-memory setup # data dir + per-user service + MCP, hooks, skills
# Or, for Claude Code / Codex, as a marketplace plugin (binary still needed):
claude plugin marketplace add akitaonrails/ai-memory && claude plugin install ai-memory@ai-memory
# Quit Claude Code mid-task, then continue in Codex with the handoff:
ai-memory run codex
# Check it works, in any wired agent:
# "What do you remember about this project?"Related discoveries
- SetupMulti-Step Agent Setups
Specialised subagents in Claude Code
Delegate review, testing or research to focused subagents with their own context.
Effort: LowPrompt
- SetupCoding & Shipping Agents
Give your agent a conventions file
A short CONVENTIONS.md stops agents from fighting your style every session.
Effort: LowPrompt
- WorkflowCoding & Shipping AgentsHot
Run a codebase-wide audit with Claude Code dynamic workflows
Have Claude write a script that fans an audit out to many subagents, cross-checks findings, and can be saved and rerun.
NewEffort: MediumPrompt#Emerging
- ToolMulti-Step Agent Setups
Hermes Agent: a free, self-hosted agent with skills, cron and a Kanban board
Nous Research's MIT-licensed agent that runs on your server, keeps memory and skills, runs scheduled jobs and coordinates work on a built-in Kanban board.
NewEffort: MediumPrompt#Local / BYO model#Open source
Want more like this?
Practical discoveries, without the noise.