Remem

Last verified against the code: 2026-11-13 (0.9.0)

Every mistake, made once, everywhere, by morning.

Remem is an Acific Labs project in three parts: a lab paper on memory for AI agents, a protocol for sharing what agents learn, and a product, the remem command: the memory for AI. Any agent (Claude Code, Claude Desktop, Cursor, Codex, Gemini CLI, Windsurf, anything that speaks MCP) and any model (put remem proxy in front of Ollama, LM Studio or any OpenAI- or Anthropic-compatible API) gets a memory that learns from its own surprises, and they all share it.

git clone https://github.com/acific/remem && cd remem
uv tool install .        # then:
remem setup         # wires every agent on this machine, and the nightly sleep
remem proxy         # memory for any model at http://127.0.0.1:11435/v1
remem share sync ~/Sync/remem   # lessons between machines, verified where they land

Today's AI agents start every session with amnesia. Millions of sessions run a day, each one learning something (a bug that only shows with that library version, a correction the person had to make twice), and at the end of every session all of it is thrown away. Remem keeps it, consolidates it overnight the way sleep does, and puts it where the agent will have it in mind next time. The paper takes it further: what one agent learns, verified by whether it predicts, can reach every agent.

How it works

transcripts  ──ingest──▶  episodes  ──sleep──▶  lessons  ──render──▶  the agent's memory folder
(raw stream)              (sessions,            (what the            (loaded at the start of
                           errors,               surprises add        every session)
                           corrections)          up to)                      │
                                                    │                        ▼
                                                predictions ◀──verify── next sessions
  1. Ingest reads every Claude Code session transcript into episodes: one per session (what was asked, done, how it ended) and one per surprise inside it: a tool call that failed, or a message where the person corrected the agent.
  2. Recall returns the memories that match a query, scored on relevance, recency and strength together.
  3. Sleep consolidates: faded memories are archived; surprises that look alike merge into lessons (observations, never instructions); each lesson makes a prediction that later sessions confirm or fail, which raises or lowers its strength.
  4. Render writes the lessons into the project's Claude Code memory folder, and a morning report for the owner to read and veto (delete a lesson's file and it is never written again).
  5. Serve is an MCP server so the agent can recall and remember in the middle of a task.

Everything runs locally with no dependencies. With a local model running (LM Studio or any OpenAI-compatible server), gists and lessons are written in better English; without one, they are deterministic.

Run it

uv sync                               # once; or: pip install -e .
uv run remem status              # counts and what to run next
uv run remem ingest              # read new transcripts (idempotent)
uv run remem recall "pip install failed"
uv run remem sleep               # consolidate, predict, render, write the morning report
uv run remem morning             # what was learned last night
uv run remem setup               # wire every AI agent on this machine (hooks, MCP, nightly sleep)
uv run remem proxy               # memory for any model: an OpenAI/Anthropic-compatible endpoint
uv run remem context             # the memory as a system prompt, for anything else
uv run remem serve               # the MCP server (stdio)
uv run pytest                         # the tests (no model, no network)
node scripts/docs-check.mjs           # the docs harness

Install it on the PATH with uv tool install . (then remem … works from anywhere), and wire it in:

claude mcp add remem -- remem serve                 # recall and remember, mid-task
remem hook                                               # prints the SessionEnd hook for ~/.claude/settings.json
(crontab -l; echo "0 4 * * * remem sleep") | crontab -   # sleep at 4 am

The site

npm install                 # once: marked (Markdown at build time) and wrangler
npm run build               # site/ + the paper + every doc → dist/
npm run dev                 # build, then wrangler dev at http://127.0.0.1:8815
npm run deploy              # build, then wrangler deploy to remem.acific.com (needs `npx wrangler login`)

scripts/build-site.mjs renders the paper into a page-by-page reader (/paper/, split at every ## heading; site/assets/paper.js turns the pages, paper.css draws the sheet) and every doc in its list into /docs/<name>/ (/protocol/ for PROTOCOL.md), rewriting links between Markdown files into links between pages. site/ holds the hand-written home page (site/index.html, the body only; the head and nav are shared), the styles, the fonts and marks, the okay loader (okay-loader.css/.js, copied from okaydesign, never edited here, and not loaded by any page since 2026-11-13), _headers (asset caching), robots.txt and .well-known/security.txt. /live/ is the real store on the owner's machine (scripts/live-snapshot.py writes site/live/snapshot.json; the build renders it). The design follows Vacuum's (vacuum.acific.com) since 2026-11-13. src/worker.js redirects http and other hosts to remem.acific.com, puts the security headers of SECURITY.md on every response (a strict CSP: no inline scripts or styles anywhere on the site) and can run the pre-launch gate (src/password-gate.js, a copy of the handbook's; the GATE_PASSWORD secret turns it on; it is unset, so the gate is off).

Configuration

Every setting had the prefix OPENMEMORY_ before 0.9.0, when this was Open Memory. A setting given under its old name is still read, unless its new name is set too.

Variable Default What it does
REMEM_HOME ~/.remem The database (memory.db), lessons.jsonl and morning.md
CLAUDE_PROJECTS_DIR ~/.claude/projects Where Claude Code keeps transcripts and each project's memory/ folder
REMEM_LLM 1 0 turns the local model off (deterministic text only)
REMEM_LLM_URL the first of http://localhost:1234/v1 (LM Studio) and http://localhost:11434/v1 (Ollama) that answers Any OpenAI-compatible server
REMEM_LLM_MODEL first model the server lists The model to use
REMEM_LLM_TIMEOUT 120 Seconds to wait for one completion

Docs