Open Memory
Last verified against the code: 2026-10-21 (first commit)
Every mistake, made once, everywhere, by morning.
Open Memory 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 openmemory command, that gives a coding agent a memory that
learns from its own surprises.
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. Open Memory 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.
- Site: https://open.acific.com (the paper page by page, the docs, the protocol; behind the pre-launch password
until launch). Built from this repository by
npm run build, served by a Cloudflare Worker (src/worker.js). - Paper: paper/OPEN-MEMORY.md
- Status: 0.1.1, a working single-agent memory for Claude Code (read, recall, sleep, render, MCP). No shared commons yet; see docs/GOALS.md for what is built and what is next.
- Source: github.com/acific/openmemory (private until launch).
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
- 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.
- Recall returns the memories that match a query, scored on relevance, recency and strength together.
- 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.
- 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).
- Serve is an MCP server so the agent can
recallandrememberin 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 openmemory status # counts and what to run next
uv run openmemory ingest # read new transcripts (idempotent)
uv run openmemory recall "pip install failed"
uv run openmemory sleep # consolidate, predict, render, write the morning report
uv run openmemory morning # what was learned last night
uv run openmemory hook # the Claude Code hook, MCP and cron lines to install
uv run openmemory 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 openmemory … works from anywhere), and wire it in:
claude mcp add openmemory -- openmemory serve # recall and remember, mid-task
openmemory hook # prints the SessionEnd hook for ~/.claude/settings.json
(crontab -l; echo "0 4 * * * openmemory 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 open.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 okay loader
(okay-loader.css/.js, copied from okaydesign, never edited here), _headers (a strict CSP: no inline scripts
or styles anywhere on the site) and robots.txt. src/worker.js redirects other hosts to open.acific.com and runs
the pre-launch gate (src/password-gate.js, a copy of the handbook's; the GATE_PASSWORD secret turns it on).
Configuration
| Variable | Default | What it does |
|---|---|---|
OPENMEMORY_HOME |
~/.openmemory |
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 |
OPENMEMORY_LLM |
1 |
0 turns the local model off (deterministic text only) |
OPENMEMORY_LLM_URL |
the first of http://localhost:1234/v1 (LM Studio) and http://localhost:11434/v1 (Ollama) that answers |
Any OpenAI-compatible server |
OPENMEMORY_LLM_MODEL |
first model the server lists | The model to use |
OPENMEMORY_LLM_TIMEOUT |
120 |
Seconds to wait for one completion |
Docs
- docs/README.md: index and glossary
- docs/GOALS.md: purpose, goals with status, non-goals, principles
- docs/ARCHITECTURE.md: the components and how they fit
- docs/IMPLEMENTATION.md: how each goal is built, file by file, and the gaps
- docs/USER-GUIDE.md: every command, the morning report, vetoes, FAQ, troubleshooting
- docs/OPERATIONS.md: files on disk, the local model, the nightly job, troubleshooting
- docs/MIGRATIONS.md: how changes reach an existing memory without losing it
- docs/PROTOCOL.md: the lesson wire format and the merge rule (draft)
- docs/ROADMAP.md: from one agent's memory to the commons
- docs/AUDIT-LOG.md: every documentation audit
- CHANGELOG.md
- AGENTS.md: the contract for coding agents working here
- okaypaper/README.md: Okay Paper, the page-by-page reader and editor the paper is published in