v0.2 · Metadata is not free to embed Stage 5.5 cross-encoder rerank (T-151r) is live: after RRF fusion, the top-20 candidates are reordered by bge-reranker-base before the budget pack, with graceful fallback to the fused order on any failure and a rerank_enabled opt-out. Measured on the committed gold-set (same harness as the model fly-off): full stack recall@5 0.90 → 1.00, MRR@10 0.78 → 0.95, nDCG@10 0.83 → 0.96 — 9 of 10 queries now rank the right memory first; scope/temporal calibration unchanged. Floors frozen and gated in CI. Wired into engram context pack, the MCP server, and the web Context Preview; dual code + security review. Plus a persistent embedding cache (~/.engram/cache/embeddings.db, content-addressed, LRU, fully degrading) so a one-shot CLI call re-embeds only changed bodies, and a remote backend (backend = remote, stdlib urllib: OpenAI-compatible embeddings + Cohere/Jina/Voyage rerank) sharing the observer's reviewed key-allowlist and redirect-stripping discipline. 1456 tests, ruff + mypy strict green. Curated metadata in the lexical channel (T-218, 2026-07-29): a memory's hand-written name and description were invisible to retrieval; indexing them lifted BM25 MRR@10 0.670 → 0.764 and the fused channel 0.781 → 0.858 on the committed gold-set, with calibration untouched. The interesting half is what we did not ship: feeding the same metadata to the embedder cost 0.056 MRR@10 on LOCOMO and 0.139 on its temporal questions, because those generated descriptions all carry a date and every asset became slightly date-relevant. BM25 has IDF to discount corpus-wide text; dense retrieval does not. Metadata that is safe to index is not automatically safe to embed. A variant that also feeds the cross-encoder scored a perfect 1.000/1.000/1.000/1.000 and is still unshipped — its LOCOMO arm is unmeasured. 1522 tests, ruff + mypy strict green. Join the discussion
Open Source Memory System

Your memory should outlive the model

engram is a local, portable, LLM-agnostic memory system that grows smarter with use. Plain markdown on your disk. Any model, any tool — you own it forever.

~/acme-platform — engram
$ engram init --name=acme-platform
→ engram initialized at ~/acme-platform/.memory

$ engram memory add --type=feedback --enforcement=mandatory \
    --name="confirm before push" \
    --description="never push without explicit go-ahead" \
    --body="Ask before pushing. **Why:** prior force-push..."
→ added local/feedback_confirm_before_push [mandatory]

$ engram memory search "push"
   3.420  local/feedback_confirm_before_push  [project/mandatory]

$ engram validate
→ clean — no errors, no warnings

$ engram status
→ .memory at ~/acme-platform · store 0.2 · 1 asset · 0 pools
Five commands, five minutes, first memory on disk. A full demo recording will land at docs/assets/demo.gif — the transcript above is the same flow.
Layer 1 — Data .memory/ directory · ~/.engram/ · plain markdown, SPEC-defined Layer 2 — Control engram CLI · memory / workflow / kb / pool / consistency / context / mcp / web Layer 3 — Intelligence Relevance Gate · Consistency Engine · Autolearn · Evolve · Inter-Repo Messenger · Wisdom Metrics optional, gated Layer 4 — Access Adapters · MCP Server · Prompt Pack · Python SDK · TypeScript SDK Layer 5 — Observation engram-web · Dashboard / Graph / Context Preview / Inbox / Autolearn Console each layer independently replaceable
Five-layer architecture — remove any layer above Layer 1 and the store keeps working.

Most LLM tools try to own your memory

Switch models, lose context. Switch tools, re-teach from scratch. engram is the opposite design.

claude-mem

SQLite · Claude-only

Memory locked inside a proprietary SQLite database. Switch to another model — context gone.

ChatGPT / mem0

Hosted · Vendor-locked

Memories stored in the vendor's cloud. No export, no git diff, no portability across tools.

engram

Plain markdown · You own it

Memory lives as human-readable .md files on your disk. Any LLM, any editor, git-friendly — forever.

Architecture

Five independent layers

Each layer is replaceable in isolation. Remove any layer above Layer 1 and the system keeps working correctly.

L5 Observation engram-web (stdlib, server-rendered) — Dashboard · Memory · Workflows · KB · Inbox · Context Preview optional L4 Access Adapters (CLAUDE.md / AGENTS.md / GEMINI.md) · MCP Server · Prompt Pack · Python SDK · TypeScript SDK LLM-facing L3 Intelligence The optional layer that makes engram get smarter over time Relevance Gate Consistency Engine Autolearn Engine Evolve Engine Inter-Repo Messenger Wisdom Metrics the magic ✦ L2 Control engram CLI — memory · workflow · kb · pool · team · org · inbox · consistency · context · mcp · web · migrate LLM-optional L1 Data .memory/ · ~/.engram/ — plain markdown, SPEC-defined, any LLM can read without a plugin permanent bet independently replaceable
Asset Classes

Three kinds of knowledge

Classes are distinguished by function — what the asset is — not by size. No hard line limits.

M
Memory

Atomic assertion

One fact, rule, preference, or pointer that can be independently superseded. The baseline for LLM context priming.

Structure: single .md + YAML frontmatter

Role: loaded into system prompt via Relevance Gate

No size cap — adaptive signals replace fixed thresholds

W
Workflow

Executable procedure

Has a runnable spine, fixture test cases, and a metrics tracker. Not just a description — it must actually execute.

Structure: workflow.md + spine.* + fixtures/ + metrics.yaml

Role: loaded on task match; Autolearn Engine evolves it

Autolearn tracks outcomes and proposes improvements

KB
Knowledge Base

Domain reference

Multi-chapter document a human would read deliberately. LLM compiles a _compiled.md digest for efficient context loading.

Structure: README.md + chapters + assets/ + _compiled.md

Role: digest enters budget first; full chapters fetched on demand

Human writes; LLM compiles digest

Three adaptive signals replace hard size caps: dynamic budget allocation · percentile length signal · split/promote/demote proposals from the Evolve Engine

Scope Model

Two axes, not one line

Real teams share knowledge in more than one way. engram separates membership hierarchy from topic subscription into two independent axes.

Hierarchy Axis — membership & inheritance you belong → you inherit automatically org ~/.engram/org/<name>/ · highest authority team ~/.engram/team/<name>/ · 0 or N teams user ~/.engram/user/ · cross-project baseline project .memory/local/ · most specific Subscription Axis — topic pools you opt in → pool behaves at subscribed_at level pool: kernel-work ~/.engram/pools/kernel-work/ subscribed_at: team Scenario examples: org subscribes compliance → affects all projects team subscribes design-system → team's projects project subscribes playbook → just that project Enforcement levels: mandatory — engram validate errors if overridden default — can override, must declare overrides: id hint — freely overridable Conflict resolution (one decision tree) mandatory > default > hint project > user > team > org (within level) pool participates at its subscribed_at level subscribed_at
Pool content participates in conflict resolution at the hierarchy level where it was subscribed — not at a fixed "pool level".
Consistency Engine

Seven conflict classes

The Consistency Engine runs a four-phase scan and surfaces proposals. It never auto-executes changes.

factual-conflict

rule-conflict

reference-rot

workflow-decay

EXPIRED

time-expired

silent-override

topic-divergence

never mutates

Engine proposes, never mutates. Deletions always flow through archive/ with a minimum 6-month retention floor before physical removal.

Cross-Repo Collaboration

Inter-Repo Messenger

Your agents often work on multiple related repos in parallel. When agent A spots a bug in repo B, it can send a structured inbox message — without interrupting B's session.

Repo A LLM finds bug in Repo B's SDK engram inbox send --to=repo-b ~/.engram/inbox/ repo-b/ journaled · deduplicated next session Repo B sees message alongside memory fix · acknowledge Resolved state: resolved reverse notification sent notified on A's next startup Repo A notified ✓ All messages: journaled · deduplicated by code-ref · rate-limited to prevent noise
The Inter-Repo Messenger is point-to-point. Topic pools handle broadcast sharing; the inbox handles targeted signals.
Comparison

Capability comparison

The combination no other system attempts: data-asset portability + active quality maintenance + quantifiable self-improvement.

Capability engram v0.2 claude-mem basic-memory Karpathy Wiki mem0 MemGPT / Letta ChatGPT Mem
Plain markdown storage✓ openSQLite✓ gisthostedhostedhosted
Tool-agnostic (any LLM)Claude onlypartialpartialpartial APIpartial APIChatGPT only
Two-axis scope (hierarchy + pool)
Explicit enforcement levels
Consistency detection (7 classes)partial
Executable workflowspartial
Knowledge Base class✓ manual
First-class Web UIpartial hostedpartial hostedpartial hosted
MCP server
Cross-repo inbox
Quantified self-improvement✓ Wisdom Metrics
Open source✓ MITpartial
Wisdom Metrics

Smarter over time — measurably

Four quantitative curves prove the store self-improves. "It feels more useful" becomes a number that can regress or improve.

workflow success rate over time

Workflow Mastery

time-to-complete on recurring tasks ↓

Task Recurrence Efficiency

active / validated / non-redundant ratio ↑

Memory Curation Ratio

tokens used / actual task value ↓

Context Efficiency

Track via engram wisdom report — each curve computed from recorded outcomes, not heuristics.

Philosophy

Five non-negotiable principles

01

Memory is a data asset, not a product feature

The store belongs to its owner, not the tool that writes it. Any text editor. Any LLM. Any version control system.

02

Portability beats cleverness

Boring markdown wins decade-scale bets. The format is the permanent commitment; the intelligence layer is the optional investment.

03

Quality over capacity

No cap on how much you store. Strict bar on quality. The Consistency Engine keeps the store coherent as it grows.

04

Never auto-delete

Deletions flow through archive/ with a minimum 6-month retention floor. Every retirement requires an explicit decision.

05

Evidence-driven evolution

Memory confidence is computed from recorded outcomes, not vibes. The system retires bad memories because it has data that they're bad.

Quick Start

Get started in 3 lines

v0.2 CLI is under active construction. M2 scaffold landed 2026-04-20 — clone, pip install -e "cli[dev]", then engram --version. Subcommands roll out through M2–M4. SPEC + DESIGN are open for review in parallel.

Small team

pip install engram-cli
engram init --subscribe=kernel-work --adapter=claude-code,codex
engram web serve    # open http://127.0.0.1:8787

Large organization

engram init --org=acme --team=platform \
  --subscribe=compliance-checklists,kernel-work,design-system \
  --adapter=claude-code,codex,gemini

Use with any LLM

claude                    # reads CLAUDE.md → reads .memory/
codex                     # reads AGENTS.md → reads .memory/
engram mcp serve          # for Claude Desktop, Zed, any MCP client
engram context pack --task="fix auth flow" --budget=4k | ollama run qwen:7b

Ongoing maintenance

engram review              # aggregate health check
engram consistency scan    # detect conflicts, suggest resolutions
engram wisdom report       # see the four self-improvement curves
Roadmap

Eight milestones

M1

SPEC Freeze

SPEC + DESIGN v0.2 frozen — 14 chapters each; external review open

M2

Core CLI

done — full CRUD + validate + review, 15 tasks

M3

Scope + Pool

done — full 2-axis scope, pool subscription, v0.1→v0.2 migrate

M4

Intelligence + Auto-Continuation

done — Relevance Gate, Consistency Phase 1–3, MCP, 5 adapters, 4-tier auto-continuation (T-200–T-212)

M5

Workflow + Autolearn

Workflow asset class shipped — spine / fixtures / rev. Autolearn ratchet still open

M6

KB + Inbox

KB class + inbox roundtrip & reverse-notify + Consistency Phase 3. Phase 4 staleness pending

M7

Web UI

done — stdlib server-rendered, 6 read-only P0 pages, no node/build step

M8

Full Evolve + SDK

next: benchmark-driven retrieval (RRF / rerank), Evolve Engine, TypeScript SDK

Retrieval

Finding the right memory

On every task the Relevance Gate decides which memories enter the context budget. How well it ranks them is the product's core quality — so retrieval is measured against a frozen benchmark and only allowed to improve. It runs on plain keywords by default; an optional model adds semantic and cross-lingual matching when you want it.

Default

Keyword (BM25)

Lexical ranking in pure stdlib. No model, no download, no extra dependency — the shipped default, instant and offline.

Enough when the query shares words with the memory.

Blind spot: "how do we ship to prod" won't match a note titled "blue-green rollout"; a Chinese query won't match an English note.

Shipped · the zero-dependency baseline

Optional · local

Semantic, on-device

A small multilingual embedding model plus a cross-encoder reranker, run locally via ONNX — no PyTorch, no API key, no network. It catches paraphrases and cross-lingual matches the keyword path misses, then reranks the top hits by reading query and memory together.

Turn on with pip install engram[ml].

Models pinned by id + revision, so the benchmark stays reproducible.

Opt-in · landing in M8, benchmark-gated

Optional · remote

Semantic, hosted

The same two stages served by an endpoint you choose — Ollama on your own machine, or OpenAI / Cohere / Voyage. No local download; the trade is a network call and sending text off-device.

For teams already running an embedding endpoint.

Default off. Endpoints scheme-validated; keys read from env, never logged.

Opt-in · planned, M8 fast-follow

Graceful by default: if no model is configured or a provider is unreachable, retrieval falls back to keyword search for that query. The base install stays pure-stdlib — the model is a capability you opt into, never a dependency you inherit.

Inspiration

Standing on shoulders

Each prior project shaped one specific piece of engram.

Karpathy LLM Wiki

LLM-compiled knowledge compounds in value over time. Inspired the Knowledge Base class and the compilation step.

autoresearch

Eight-discipline agentic self-critique loop. Shaped the Autolearn Engine's evolution cadence for Workflow assets.

Agent Factory

Experience as executable code, not text. The founding insight behind the Workflow asset class with its runnable spine.

evo-memory (DeepMind)

Search → Synthesize → Evolve lifecycle. ReMem action-think-refine loop drives the Evolve Engine's memory proposals.

MemoryBank

Ebbinghaus curve for LLM memory. Adapted to evidence-driven confidence scoring rather than time-based decay.

MemGPT / Letta

Memory as OS virtual memory. Inspired the Layer 1 tiered data structure — without the managed-service requirement.

Claude Code Memory

The direct precursor engram generalizes. Proved the value of LLM-adjacent markdown memory in practice.

MemPalace

Retrieval algorithm research informing the Relevance Gate's candidate ranking pipeline.

Join the design review

The SPEC and DESIGN are open. For open-ended talk on the scope model, asset-class boundaries, Consistency Engine taxonomy, or your use case — join Discussions. For concrete bug reports and feature requests, file an Issue.

Found a bug, or want a specific feature?

Issues tracks concrete tasks — each one has a clear actionable outcome. For open-ended discussion, head to Discussions.

File an Issue