StackMap
Subscribe
Explore / ai-memory
akitaonrails

ai-memory

Rust long-term memory server for coding CLIs: lifecycle hooks capture sessions into a sanitized shared wiki, then hand a bounded summary to the next agent so Codex can resume what Claude Code started.

4,311 314 Rust MITupdated today
View on GitHubDispute this mapping →
Curator's take

The strongest bet if you genuinely switch harnesses mid-task: hook and MCP installers for roughly fifteen CLIs, a portable event ledger, `ai-memory run <harness>` for managed cross-vendor resume, and one Rust binary you can systemd. You pay for that reach in surface area — per-harness caveats matter (several CLIs discard SessionStart stdout, so handoffs come back through MCP `memory_handoff_accept`; Codex and Kiro need an explicit `finalize-session`), and you configure capture exclusions plus LLM and embedding providers. If you live in exactly one harness, a single-harness plugin gets you 80% of this with a tenth of the setup.

Mapped by ShipWithAI editors · links verified
README.md

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.

Release Rust License

Support Matrix

Area Status Notes
Linux Supported Primary Docker/server target and CI platform. Published Docker images support linux/amd64 and linux/arm64. Native Arch/AUR packages include system and user systemd units.
macOS Supported Workspace tests run in CI; tagged releases publish native ai-memory-macos-aarch64.tar.gz and ai-memory-macos-x86_64.tar.gz binaries. The native binary is the recommended path on Apple Silicon. See docs/macos.md.
Windows via WSL2 Supported Use the Linux install path inside WSL2 when the agent runs there.
Native Windows Experimental Tagged releases publish ai-memory-windows-x86_64.zip with ai-memory.exe; Docker Desktop wrapper and source builds are also available. Local supported profiles default to host-native hook commands; Claude Code may use its Windows exec form, while other agents use native single command strings matching their hook schema. PowerShell/Git Bash scripts are compatibility fallbacks. See docs/windows.md.
Claude Code Supported MCP config + lifecycle hooks; native commands enforce capture exclusions. install-mcp --session-aware optionally enables per-session auto-scope isolation through a local stdio bridge. Optionally captures the assistant's final turn on Stop when installed with --capture-assistant and the server enables capture_assistant (double opt-in, off by default).
Codex Supported MCP config + lifecycle hooks; native commands enforce capture exclusions. No automatic true session-end hook, so run ai-memory finalize-session when you need a final summary/handoff.
Command Code Supported MCP config (~/.commandcode/mcp.json) + its four stable lifecycle-hook events (~/.commandcode/settings.json); native commands enforce capture exclusions and SessionStart injects handoffs. Stop is only a turn boundary, so use ai-memory finalize-session --agent command-code after the final turn. ai-memory run command-code adds exact v3 native-session resume and visible-event import; experimental unsandboxed Mods remain excluded.
Devin CLI Supported MCP config + lifecycle hooks. Hooks use Devin's PostCompaction event, inject handoffs via hookSpecificOutput.additionalContext, and omit subagent events because Devin does not expose them.
OpenCode Supported Remote MCP config + generated TypeScript plugin; generated plugin enforces capture exclusions.
Cursor Supported MCP config + lifecycle hooks.
Gemini CLI Supported MCP config + lifecycle hooks.
Oh My Pi / OMP Supported Use --client omp / --agent omp (or oh-my-pi) for native .omp MCP config + TypeScript extension; generated extension enforces capture exclusions.
Pi Supported Generated ~/.pi/agent/extensions/ai-memory-pi.ts extension provides lifecycle capture and an HTTP MCP bridge; generated extension enforces capture exclusions.
Crush Managed-only ai-memory run crush resumes its project-local session database and supplies portable context through a temporary supported global-context file; no lifecycle-hook installer is provided.
Managed workstreams Opt-in ai-memory run provides transparent cross-harness continuity for Claude Code, Codex, Open

Continue your stack

What teams reach for next — and why each earns a place beside ai-memory. Ranked by curator confidence.