StackMap
Subscribe

ai-memory vs claude-mem

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. — versus — Cross-harness session memory: hooks capture what the agent does, an LLM compresses it into observations, and the next session gets the relevant ones back via progressive-disclosure MCP tools.

The curated verdict

Also hooks coding-CLI sessions into a long-term store, but written in Rust and shaped as a sanitized shared wiki rather than a per-session observation stream. Choose by artifact: readable wiki versus searchable observations.

ai-memoryclaude-mem
Stars4.9k93k
Forks3498.1k
LanguageRustJavaScript
LicenseMITApache-2.0
Last activity2 days ago2 days ago
Topicsmemory, codingmemory, coding
Curated connections77

ai-memory — the 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.

claude-mem — the curator's take

The most widely installed of the capture-and-reinject memory plugins, and the one with the most product around it: 5 lifecycle hooks, a Bun worker with an HTTP API and live web viewer, SQLite plus FTS5 plus Chroma for hybrid search, and a 3-layer MCP search pattern (index → timeline → full detail) that keeps recall at ~50-100 tokens per hit until you actually want the body. Installs into Claude Code, OpenCode, Antigravity, OpenClaw and more, with `<private>` tags to keep things out of the store and optional cloud sync. The tradeoffs: it spends model tokens summarizing every session, it drags in Bun and uv, and what you get back is a generated observation rather than the raw transcript — if you want auditable, greppable memory you can edit by hand, look at the Markdown-first options instead.