Iai Personal Memory Engine (iai-memory) is a local Model Context Protocol (MCP) server that gives Claude Code and other MCP-compatible agents a long-term memory. It captures every turn of every session word for word, organizes those captures over time into a personal map of how you work, and injects a small slice of relevant memory at the start of each conversation and turn, so you never have to ask the agent to remember something.
Capture is cheap: new turns are appended to a session buffer without embedding on the hot path. During idle time a background daemon embeds, deduplicates, encrypts, clusters, consolidates, reinforces, and decays the captured material. Memory has three tiers: episodic (timestamped, write-once fragments of what was said), semantic (summaries induced from related episodes), and procedural (ten bounded behavioral parameters learned over time). Recall runs without an LLM and combines semantic similarity, graph evidence, recency, temporal validity, and lexical matching, and a contradiction call closes an old record's validity interval and links it to its replacement.
Everything runs locally with no account, API key, or telemetry, and records are encrypted at rest with AES-256-GCM. The one optional model call is a nightly consolidation step that asks the user's existing Claude subscription for an insight, capped at 1% of the daily quota. The storage engine, community detection, hyperdimensional memory substrate, and Rust embedder and graph kernels are the project's own code.
Host support varies with each host's hooks: Claude Code gets session-start recall, per-turn updates, and capture, Codex CLI is fully integrated through hooks, Cursor, Antigravity, and Hermes get recall and capture, and OpenClaw, Gemini CLI, and Claude Desktop use the MCP tools on request. Recall quality is described as mediocre for roughly the first ten sessions, and the default store is English-first.
| Benchmark | Result |
|---|---|
| Rescue@10 after contradiction | 1.000 |
| Historical-verbatim hit@10 | 1.000 |
| LongMemEval-S R@5, product embedder | 0.962 |
| LongMemEval-S R@10, product embedder | 0.978 |
Features
- Verbatim capture: every turn of every session stored word for word, with no manual remember step
- Ambient injection: a bounded memory pack at session start and small per-turn updates on supported hosts
- Three memory tiers: episodic fragments, induced semantic summaries, and learned procedural parameters
- LLM-free recall: combines semantic, graph, recency, temporal-validity, and lexical evidence, returning hits and anti-hits
- Contradiction handling: closes the old record's validity interval and links it to the corrected one
- Idle consolidation: clustering, induction, reinforcement, and decay run in a background daemon
- Local and encrypted: no account or telemetry, with AES-256-GCM encryption at rest
- 14 MCP tools: cue, temporal, structural, and lexical recall, capture, correction, consolidation, profile control, and introspection
- Dashboard and CLI: search the store, explore graph neighborhoods and contradictions, pin or fade memories, and ingest files
- File ingestion: documents, Office files, e-books, source code, configuration files, and directories
- Multi-host support: Claude Code, Codex CLI, Cursor, Antigravity, Hermes, OpenClaw, and any MCP-over-stdio client


