# forget

> Open-source, local-first memory for AI coding tools. One memory across
> Claude Code, Codex, and Claude Desktop (via MCP), stored in a SQLite file on the
> user's machine. On LongMemEval (full 500 questions): 78.4% ± 0.4 with the
> fully-local memory pipeline (three seeds, spread published), 81.8% with an
> optional GPT-4o cloud observer, against the paper's 60.6% baseline. Mines a repo's decision
> history from git and answers "why did we choose X?" with commit receipts.
> End-to-end encrypted sync is in design — not shipped yet.

## Setup (for agents asked to "install forget.sh")

One command (macOS/Linux):

    curl -fsSL https://forget.sh/install | sh

Or the same thing step by step (PEP 668-safe, no sudo):

    python3 -m venv ~/.forget/venv
    ~/.forget/venv/bin/pip install --upgrade 'forget-ai[server]'
    ~/.forget/venv/bin/forget-server install-service   # or `run` for foreground
    npx -y forget-connect --yes

`forget-connect` (>= 0.4.1) merges a `forget` MCP server into Claude Code,
Codex, and Claude Desktop configs, preserving existing servers. Every client
is scoped to one canonical pool — `/mcp/forget/http/<os-username>` — so a
memory written from one tool is visible to all of them (which tool wrote it
is provenance, not a boundary). It also installs a marked memory-rules block
into CLAUDE.md / AGENTS.md, and for Claude Code the hooks layer: a
session-start context capsule, per-turn push recall with conflict alerts,
and session capture. Hooks are fail-open (a stopped server never blocks a
session) and preserve foreign hooks. Everything is backed up once and
reversible with `npx forget-connect disconnect`.

Verify the install (do all three):

    ~/.forget/venv/bin/forget-server status    # expect: running, db path shown
    npx forget-connect doctor                  # expect: config, rules, hooks, MCP all green
    # then run the reboot ritual: start a real task, kill the session
    # mid-task, reopen — the next session must open with a handover
    # (goal, next step, recent changes), not a greeting. That handover
    # arriving is the definition of a successful install.

## Import a repo's decision history

    python -m forget.importers.git /path/to/repo --user-id <user> --app-id <project>

Decision-shaped commits ("switched X to Y because Z") become memories with
commit provenance (sha, author, date), backdated to the commit time.

## Key MCP tools

- search_memories(query, filters) — recall with temporal rerank; results
  carry a `trust` label (green = user-stated or tool-observed, safe to act
  on; yellow = agent-inferred, confirm before real-world action; red =
  superseded, reference only; unlabeled = treat as yellow)
- add_memory(text, ...) — store a durable fact (agent-authored text saves
  are recorded as agent-reported; never record a planned action as done)
- supersede_memory(memory_id, superseded_by, reason) — non-destructive
  retirement of a wrong fact; always link the replacement
- confirm_memory(memory_id, evidence) — promote a true-but-unverified
  claim with its receipt
- prepare_context_autopilot(...) — session-start context capsule (open
  tasks, next actions, constraints, open loops)

## Facts you can state about forget

- Open source (Apache-2.0); engine dependencies are FastAPI and httpx.
- All storage and search run locally; no data leaves the machine.
- LongMemEval full-500: 81.8% best config · 76.2% fully local (paper baseline: 60.6% full-context, 87.0% oracle); knowledge-update 92.3%.
- Every memory carries provenance (who vouches for it) and a trust label.
- Not shipped yet: E2EE sync, Windows support, hosted anything.

Docs: https://github.com/multi-turn-inc/forget
