Operations

Last verified against the code: 2026-10-21 (first commit)

Open Memory runs on one machine, as the person. There is nothing to deploy and no secret anywhere.

Files on disk

Path What Written by
~/.openmemory/memory.db The store (SQLite): episodes, sessions, lessons, predictions ingest, recall (touches), sleep, serve (remember)
~/.openmemory/lessons.jsonl The wire format: one lesson per line sleep
~/.openmemory/morning.md Last night's report sleep
~/.claude/projects/<project>/*.jsonl The raw stream: Claude Code's transcripts (read only) Claude Code
~/.claude/projects/<project>/memory/om-<id>.md One rendered lesson sleep (render)
~/.claude/projects/<project>/memory/MEMORY.md The index Claude Code loads; Open Memory owns one marked section sleep (render), Claude Code
~/.claude/projects/<project>/memory/written.json, vetoed.json What render wrote; what the owner vetoed sleep (render)

Back up ~/.openmemory to keep the memory; the raw stream is Claude Code's own and can be re-read at any time (openmemory ingest after deleting memory.db rebuilds everything except notes, touches and vetoes).

Configuration

Variable Default What it does
OPENMEMORY_HOME ~/.openmemory Where the store, lessons.jsonl and morning.md live
CLAUDE_PROJECTS_DIR ~/.claude/projects Where transcripts are read and memory folders written
OPENMEMORY_LLM 1 0 (or false, off) disables the local model
OPENMEMORY_LLM_URL the first of localhost:1234/v1 (LM Studio) and localhost:11434/v1 (Ollama) that answers, probed once per process with a one-second timeout The OpenAI-compatible endpoint
OPENMEMORY_LLM_MODEL first listed The model id; otherwise the first in GET /models
OPENMEMORY_LLM_TIMEOUT 120 Seconds per completion

The local model

Any OpenAI-compatible chat server. LM Studio is the default because it listens on port 1234 with no setup. The model is asked to write a session gist (300 tokens) per ingested session and a lesson (80 tokens) per new lesson, with temperature 0.2. Reachability is checked once per process with a two-second timeout; a server that is down costs two seconds and nothing else.

This machine (AMD Ryzen AI MAX+ 395, Radeon 8060S, 128 GB unified memory) runs mid-size local models comfortably. Ollama 0.40.8 is installed under ~/.local/ollama (no sudo) and runs as a user service (~/.config/systemd/user/ollama.service, systemctl --user status ollama, started at boot through loginctl enable-linger), with hf.co/unsloth/Qwen3-30B-A3B-Instruct-2507-GGUF:Q4_K_M pulled for sleep (Ollama's own qwen3:30b-a3b-instruct-2507-q4_K_M tag is the same model): a mixture-of-experts instruct model (no thinking) that is fast on this hardware and only needs to summarize and to write one careful sentence. ~/.local/ollama/bin/ollama ps shows whether a run used the GPU.

The site: open.acific.com

A Cloudflare Worker named openmemory serving dist/ as static assets through the ASSETS binding (wrangler.jsonc: assets.directory is dist, run_worker_first so the gate sees every request, the custom domain open.acific.com on the acific.com zone, workers_dev on). npm run deploy builds and deploys; it needs npx wrangler login once on the machine. The pre-launch gate is on when the GATE_PASSWORD secret is set (npx wrangler secret put GATE_PASSWORD; the shared password from the handbook) and off otherwise, so local npm run dev is open. Assets are cached four hours at the edge: bump V in scripts/build-site.mjs when a file under site/assets/ changes. The okay loader files come from okaydesign (npm run sync there); openmemory is listed in its consumers.json.

The nightly job

0 4 * * * openmemory sleep >/dev/null 2>&1

Sleep runs in well under a second without a model on hundreds of episodes; with a model it takes as long as the model needs per new lesson. It is safe to run twice. The report is in morning.md either way.

The hook

openmemory ingest --quiet on Claude Code's SessionEnd (openmemory hook prints the JSON). Ingest with a model takes one completion per session; without one it is instant. A session that is still open is re-read on its next end because its mtime changed.

Monitoring

openmemory status is the dashboard: counts, the model found, what to run next. The morning report's first line has the trend; comparing predictions confirmed with failed over weeks is the system's own fitness signal (paper §7.3).

Troubleshooting

Problem Where to look
Ingest reads nothing openmemory paths; ls $CLAUDE_PROJECTS_DIR/*/*.jsonl
A lesson keeps coming back after deleting it It was not written by render (no om- prefix) or vetoed.json was removed
memory.db is locked Two commands at once (cron sleep during a hook ingest); SQLite waits five seconds by default, then fails; rerun
A rendered file has the wrong project Episodes carry the cwd of their session; sessions started from ~ render into ~'s project
The model times out Raise OPENMEMORY_LLM_TIMEOUT or load a smaller model; or --no-llm