ai-memory is a self‑contained Rust binary that gives AI coding agents a persistent, shared memory built on a git‑backed Markdown wiki. Lifecycle hooks automatically capture prompts, tool calls and session boundaries, sanitize the data at a typed privacy boundary and consolidate it into readable .md pages; a derived full‑text, entity and graph index enables recall without any LLM calls by default. Handoffs follow a typed, claim‑once protocol: each handoff has an owner and is claimed exactly once, allowing a user to quit Claude Code mid‑task, start OpenAI Codex in the same directory and have the next agent resume with a bounded brief of where work left off, what failed and what remains open. The system works across more than twenty harnesses (Claude Code, Codex, Cursor, Gemini CLI, OpenCode, Grok, Devin, Kimi, Kiro, etc.), across projects via a per‑user profile of package managers, test layout and architecture habits that is injected into every new repository, and across machines by running a personal server (laptop, homelab or cloud) that stores only the harness identity and session token, never the local transcript path. For teams, a central server provides per‑person authentication, audit logs and project‑scoped knowledge sharing while keeping personal handoffs private. Memory ages via access‑weighted retention, tunable per‑tier decay, optional extractive compaction, dedup and contradiction flagging, all operable without API keys; an opt‑in LLM “dream” pass can rewrite cold clusters when idle. The write ceiling is measured at ~700 operations per second, and all mutations are logged. Installation is performed by a checksum‑verified script that sets up a user service, wires MCP hooks and Agent Skills for detected harnesses, and creates a bearer‑token‑protected data directory.

Read original