elephia

git for your AI's context — an elephant never forgets.

A local-first, deterministic memory engine for AI coding agents — Claude, Codex, and Cursor — served over MCP. No embeddings. No cloud. No API key.

v0.1 · early beta · Apache-2.0
100% local — nothing leaves your machine Deterministic — same input, same context Auditable — every memory has a reason No API key

What it does

Every conversation turn is committed to an append-only journal. Durable facts — decisions, corrections, preferences — merge into a versioned memory wiki. Each new prompt gets a branch: a compact, token-budgeted slice of everything relevant, with full provenance and a meter showing exactly what you saved.

A real, unedited recording of the exact quick-start commands — including the honest token meter.

The git mental model

If you know git, you already know elephia.

gitelephia
repositorya .elephia/ store — per project, or one global
commita journaled conversation turn (append-only)
brancha compiled context patch for the current prompt
mergea durable fact saved to the versioned memory wiki
blameprovenance — every claim links to the turns that produced it

Why it's different

Deterministic

A mechanical scoring function, not an LLM. The same history and prompt always produce the same context — byte for byte.

Auditable

Every selection, exclusion, and supersession has an inspectable reason. --explain shows the math.

100% local

Plain JSONL on your disk. No embeddings API, no vector database, no cloud, no key. Nothing leaves your machine.

Token-metered

Every compile records patch tokens vs. what full history would have cost — honest savings, including when it's negative.

Quick start

Install from PyPI and try it in about 60 seconds.

# install
pip install elephia

# create a store and try it
elephia init
elephia demo
elephia branch "What database does Atlas use?"
elephia branch "What database does Atlas use?" --explain

# wire it into your AI app (edits the client config for you)
elephia install claude-code      # or claude-desktop / codex / cursor