iai-pme is a local memory engine for coding assistants. It runs as a Model Context Protocol server over a Unix domain socket, captures every turn of every session verbatim, organises those captures over time, and injects a small relevant slice of history at the start of each new conversation, so neither "remember this" nor "what did we say last time" is needed.
Memory is held in three tiers over a hyperdimensional substrate: episodic records are append-only, timestamped, verbatim fragments; semantic records are summaries induced from clusters of related episodes during idle consolidation; procedural records are eleven parameters about how you work. A correction is a new record plus a contradiction edge that closes valid_to on the superseded record, so both the current and prior wording stay retrievable. Recall fuses semantic similarity, graph-link strength, and recency in one local pass, with no model call on the hot path, and returns memories that contradict the cue alongside the ones that match.
Ambient capture comes from four hook scripts installed by one command, with targets for several assistant hosts; per-turn capture is append-only file IO of roughly five milliseconds with no embedding or socket call during the session, and session-start recall pipes the assembled prefix to stdout, yielding empty output rather than blocking when the store is empty or the engine is down. A background engine drains the capture buffer on a five-minute idle edge through a shield, embed, dedup, and encrypted-insert pipeline, then clusters the graph, induces summaries, decays unreinforced edges, and reinforces frequently co-retrieved paths.
Records are encrypted at rest with AES-256-GCM, with key rotation and prior-key recovery; the store lives in a single local directory and there is no telemetry. The storage layer, the community-detection algorithm, the hyperdimensional substrate, and a Rust embedder and graph kernel are project code sitting on SQLite, the candle tensor library, NumPy, and an audited cryptography implementation. Storage is English-only unless a record is declared with a raw: tag, and an opt-in pack swaps the embedder to a multilingual model covering thirteen languages, which requires re-embedding the store.
Features
- Ambient capture and recall: four hooks record turns and inject a memory prefix at session start with no explicit commands
- Verbatim, append-only episodes: no update path exists in the schema; corrections add records and edges instead of overwriting
- Contradiction handling: memory_contradict archives the superseded version and keeps both queryable
- Fourteen MCP tools: cue, temporal, structural, and lexical recall, capture, reinforce, consolidate, profile, and introspection tools
- Local-only operation: Unix-socket transport, local embeddings, no account or API key, and no telemetry
- Encryption at rest: AES-256-GCM per record with a 0600-mode key file, rotation, and prior-key recovery
- Bounded injection: session-start packs measured at 1,629 tokens minimum against a 3,000-token ceiling, and a default 1,500-token budget for explicit recall
- Dashboard: a local web UI and Tauri desktop build for search, pin, fade, rescue, file teaching, and engine controls
- Broad ingestion: prose, Office and e-book containers, PDFs, and source files, chunked, deduplicated, and recall-verified
- Swappable embedder: an HTTP provider replaces the built-in model, and the store refuses to open under a different embedder generation
- Diagnostics: a doctor command runs 33 checks and repairs, renaming corrupt state aside rather than deleting it
| Benchmark | Result | What it measures |
|---|---|---|
| Rescue@10 (post-contradiction) | 1.000 | the current fact still ranks top-10 after an update |
| Historical-verbatim (hit@10) | 1.000 | the superseded wording also ranks top-10 |
| Personal-fact drift (recall@10) | 0.9933 | retention across 50 facts and 50 sessions |
Integrates with
Aider
Command-line LLM pair programmer that maps your repo, edits files, and auto-commits each change to git
Claude Code
Terminal-based agentic coding tool that reads your codebase and runs tasks through natural-language commands
Cline
Open-source coding agent with one engine behind VS Code, JetBrains, a headless CLI, an SDK, and a parallel Kanban board
Codex
Lightweight coding agent that runs in your terminal
Alternatives
Claude-Mem
Compresses Claude Code sessions into a local SQLite and Chroma memory store, queryable from other agents over MCP
Graphiti
Graphiti is a framework for building and querying temporal context graphs for AI agents.
Letta
Stateful-agent platform with long-term memory — CLI agent and TypeScript SDK running on cloud, local, or self-hosted backends
Mem0
Memory layer that extracts facts from conversations and retrieves them at inference so agents remember users across sessions
