Airsc is free for everyone. If it helps you, support it with $2–$20.

Support
PluginCautionAgent workflow & memoryBeginner friendly

iai-personal-memory-engine

CodeAbra · CodeAbra/iai-personal-memory-engine

Provides a local, long-term memory for AI agents like Claude, capturing every conversation verbatim and providing relevant context automatically.

A cyber brain for your AI. It never forgets a detail, remembers exactly what you said, and learns how you work over time. Free, local, works with Cursor, Claude Code, Codex, OpenClaw, Hermes and more. MIT.

901 stars111License: MITUpdated 20 days ago0 opens

Preview

▍

What you can do with it

  • Give Claude Code persistent memory across sessions to remember project details.
  • Ensure your AI agent always has the full context of past discussions without explicit reminders.
  • Train an AI agent to understand your specific work style and preferences over time.

Safety check

Caution

Usable, but read the notes first.

  • ●Installer downloads a remote script and pipes it to the shell.README.md

Automated scan of the repo files. Always review code you run.

From the README

English | 中文

Keeps every conversation word-for-word and gives your AI agent the right context on every turn.

Quick start · How it works · Benchmarks · Compatibility · Technical reference


What it is

A local server that speaks the MCP protocol and gives Claude, and any other MCP-compatible agent, a long-term memory. It captures every turn of every session verbatim, organizes those captures over time into a personal map of who you are, and serves a small slice of relevant memory back at the start of each new conversation and turn. You never have to say "remember this" or "what did we say last time?".

I built this for myself. It worked. The benchmarks were mostly for my own curiosity.

Under the hood it's not a wrapper around someone else's vector store and graph library — the parts that matter are my own code: the storage engine, the community-detection algorithm, the hyperdimensional memory substrate, and a native engine that makes it fast.

And unlike cloud memory services, there's no API key, no account, and no telemetry: the engine, the store, and the embeddings all run locally. The only things that leave your machine are the normal model calls your CLI already makes, plus one optional nightly consolidation step that asks your model for a single insight through the same subscription your CLI already uses.


Quick start

Claude Code

python3.12 -m pip install -U iai-pme

Then run inside Claude Code:

/plugin marketplace add CodeAbra/iai-personal-memory-engine
/plugin install iai-memory@iai-pme

Restart the session, then verify:

iai --version
iai-mcp daemon status
iai-mcp doctor

Python 3.11 is also supported.

macOS or Linux: all-in-one source install

curl -fsSL https://raw.githubusercontent.com/CodeAbra/iai-personal-memory-engine/main/scripts/bootstrap.sh | bash

This builds the Rust engine and TypeScript wrapper, installs the background service and hooks, registers Claude Code, and runs the health check. It requires Git, Python 3.11/3.12, Node.js 18+, and Rust. To inspect the steps without changing anything:

curl -fsSL https://raw.githubusercontent.com/CodeAbra/iai-personal-memory-engine/main/scripts/bootstrap.sh | bash -s -- --dry-run

Other hosts

python3.12 -m pip install -U iai-pme
iai-mcp crypto init
iai-mcp daemon install
iai-mcp capture-hooks install --target codex

Replace codex with cursor, antigravity, hermes, openclaw, or all. MCP tools work with any MCP-over-stdio client; automatic capture and context injection depend on the hooks exposed by the host. See the technical reference.

New stores use the native engine format by default; an existing store keeps its current format on upgrade. To move an existing legacy SQLite store onto the native engine, run iai-mcp migrate-to-lilli — iai-mcp doctor prints the exact command, and the technical reference documents the full flow.


What happens after installation

EventAction
PromptNew turns are appended to a session buffer as file IO; no embedding or engine RPC is needed on the capture path
Session endRemaining transcript content is rolled over for ingestion; hook failures do not block the host
Session startA bounded memory prefix is exposed as host context; an empty store or unavailable engine yields empty output
Later turnsSupported hosts receive a small foresight or delta pack with age and revision markers
Idle timeCaptures are embedded, deduplicated, encrypted, inserted, clustered, consolidated, reinforced, and decayed

The background process is called the daemon in the CLI. The MCP wrapper and iai can still read the local store directly when it is asleep or temporarily unavailable.


How it works

Memory model

TierContains
EpisodicTimestamped, write-once fragments of what was said
SemanticSummaries induced from related episodes during idle consolidation
ProceduralTen bounded behavioural parameters learned over time

Distinct hyperdimensional representations keep literal detail, semantic structure, and behavioural tendencies from collapsing into one vector surface.

The local, LLM-free recall path combines semantic similarity, graph evidence, recency, temporal validity, and lexical evidence. memory_recall returns both hits and anti_hits; memory_contradict closes the old record's validity interval, creates a new record, and links the two.

While idle, the engine groups related episodes, induces semantic memory, reinforces useful paths, and decays weak unreviewed edges. One optional REM step may invoke claude -p through the user's existing Claude subscription, capped at no more than 1% of the daily quota. No Anthropic API key is required.

First-party components

ComponentRole
HippoEncrypted records, vector index, and graph in one local store
MOSAICLeiden-family community detection with stable community identity
Lilli HDHyperdimensional substrate and structural recall
Native engineRust embedder and graph kernels

Dashboard and CLI

iai brain

The local dashboard searches the store, exposes graph neighbourhoods and contradictions, pins or fades memories, ingests files, controls the background engine, and reports token-use estimates from your own store.

iai recall · temporal-recall · search · ask · capture · teach · upload
iai watch · brain · status · last

iai upload accepts documents, Office files, e-books, source code, configuration files, and directories. Full formats and administrative commands are listed in docs/REFERENCE.md.


Benchmarks

Every harness ships in bench/; methodolo

View source on GitHub