deja
kept per project · stays on your computer · for coding assistants

deja

Memory that lets your coding assistant pick up where it left off.

AI coding assistants forget everything between sessions. You re-explain the same project details over and over. Deja keeps the decisions and preferences that matter for this project in one small file on your computer. Nothing leaves your machine unless you choose to share a specific note.

Storage
SQLite + FTS5
Scope
Git repository
Context
Token bounded
Runtime
Bun + MCP
why memory fails

A database is not enough.

Memory has to show up in the right project, stay short enough to fit inside a prompt, remember when you corrected something, stop repeating work you finished, and show evidence when it gets something wrong. Deja builds those constraints into the tool.

scope

Kept per project

Memory is tied to the Git repository you are actually working in. Two checkouts of the same project can share notes; unrelated projects never leak.

budget

Keeps it short

Recall accepts a limit on how much to return and what kind of memory you want. It sends the smallest useful packet, not the whole history.

truth

Old versions stay visible

When a note gets corrected, the old version stays in the file so you can see what changed. Recall follows the current version while keeping the evidence inspectable.

the mechanism

Write less. Recover more.

finish a session
const decision = d.remember(
  "Decision: use Bun for repo scripts",
  { kind: "decision" }
);

d.keep([decision.id]);

d.handoff({
  summary: "Converted scripts; tests pass.",
  next: ["update the release workflow"],
});
start the next one
const context = d.recall("release workflow", {
  maxTokens: 600,
  kinds: ["decision", "pitfall", "wip"],
});

// hits are scoped to this project
// one active catch-up note
// provenance + trust score
// a receipt to evaluate later

d.assessRecall(context.traceId, "useful");
v0.1.0

A complete local memory loop.

typed memory

Seven useful kinds

Decision, preference, procedure, pitfall, fact, work-in-progress, and note. Your assistant can classify explicitly; the fallback is conservative.

evidence trust

Relevance is not truth

BM25 finds matching text. Draft-versus-kept state and used-versus-wrong outcomes determine trust. High means repeatedly useful, not magically authoritative.

handoff lifecycle

Old work stops directing

Catch-up notes are active, completed, or abandoned. Only active notes from the current project reach a fresh assistant.

feedback

Recall can be evaluated

Every retrieval has a content-free receipt. Mark it useful, wrong, missed, or unnecessary, then inspect real quality with deja eval.

correction

Changes are explicit

Link a new note to an old one as a replacement, contradiction, or related. Old matches resolve to the current note without deleting history.

inspection

One file, ordinary tools

Open ~/.deja/deja.db with SQLite. Use the library, MCP tools, or CLI. No daemon, account, hidden model call, or remote ingestion path.

install

Give your assistant memory in sixty seconds.

terminal
bun add github:acoyfellow/deja
bunx github:acoyfellow/deja init
MCP configuration
{
  "mcpServers": {
    "deja": {
      "command": "bunx",
      "args": ["github:acoyfellow/deja", "mcp"]
    }
  }
}

Tool descriptions are the operating contract. No SKILL.md, AGENTS.md, or memory prompt pasted into every session.

agent tools

Small primitives, closed loop.

recall

Scoped, budgeted context plus the active catch-up note.

remember

Draft or keep typed memory; link corrections immediately.

handoff

Leave one short note for the next session.

resolve_handoff

Complete or abandon work so it stops resurfacing.

signal

Mark one memory used, wrong, or forgotten.

assess

Evaluate the whole retrieval after acting.

link

Replace, contradict, or relate existing notes.

send / inbox / reply

Optional local coordination; deliberately separate from memory.

evidence, not slogans

The failures stay in the repository.

Deja includes behavior tests, negative results, protocol experiments, claim-to-evidence mapping, and a one-command release gate. The eight-case lexical score is a smoke test, not proof that memory improves every assistant.

local
SQLite recall path
0
wrong-project fixture hits
4
release-gate checks
release gate
bun run check
# tests
# strict TypeScript
# lexical recall smoke bench
# behavioral evidence bench
preview · cloudflare only

Shared memory works and is not ready to ship.

The preview uses a Cloudflare Worker, one Durable Object SQL authority per memory space, numbered commits, SSE, and rebuildable local SQLite mirrors. Read-after-write, live peer updates, explicit stale state, catch-up, and hard deletion are tested.

It remains local dogfood until verified identity, revocation, retention, content policy, audit boundaries, and encryption are resolved. We will not call a bearer-token demo production.

Let the next session start further ahead.

Stays on your computer. Inspectable. Falsifiable. Built for the assistant using it.

Install Deja