The cold-start protocol

# 1. Load routing rules + preferences (auto-loaded; this is the manual form)
Get-Content /memories/00-routing.md

# 2. Generate a curated cold-start brief — local model, ~60 sec, zero-cost
pwsh tools/qwen-coldstart.ps1

# 3. Read the latest session journal (compressed if >24h old)
pwsh tools/latest-revival.ps1 -N 1

Paths shown are from the reference implementation. Equivalent flows compose easily on macOS / Linux / any shell.

Install the reference implementation

The reference repo ships a self-contained scaffold: 9 PowerShell scripts, a brain container blueprint, 4 starter memory templates, an installer, and a config file you copy from config.example.json and fill in.

# Windows (PowerShell 7+)
git clone https://github.com/RecallWorks/Recall
cd agent-os
Copy-Item config.example.json config.json
# edit config.json — workspaceId, storage account, ceiling
pwsh ./bootstrap.ps1

# macOS / Linux
git clone https://github.com/RecallWorks/Recall
cd agent-os
cp config.example.json config.json
# edit config.json
./install.sh

Bootstrap registers four scheduled tasks (vault sync nightly, vault promote weekly, brain snapshot weekly, rolling summary every 15 min), copies starter memory templates into your editor's memory dir, and runs the spend-gate self-test.

What ships in the repo

bin/
spend-gate.ps1
Three-layer fail-closed cost gate. Kill switch, cooldown cache, MTD spend check.
Layer 1 of 3
vault-sync.ps1
Nightly azcopy of workspace + memory + touched-folder log to draft container.
Cool tier · 24h SAS
vault-promote.ps1
Weekly promote of stable draft contents into WORM-immutable vault.
Archive tier · 7yr
brain-snapshot.ps1
Weekly snapshot of vector brain to vault. Two newest kept hot. Sealed local copy.
vault/brain/
bin/ (cont.)
qwen-coldstart.ps1
Curated ~3KB cold-start brief. State files + audit-trail tail + newest journal → local model.
~60 sec, zero cost
qwen-rolling-summary.ps1
Every 15 min, summarize the active transcript before host compaction lands.
/memories/session/*-rolling.md
latest-revival.ps1
Find the newest session journal. Auto-compress with local model if >24h old.
REVIVAL-*.md
mark-touched.ps1
Register an out-of-workspace folder so the next vault-sync grabs it.
state/agent-touched-folders.log
templates/
00-routing.md.tmpl
Routing triggers, cold-start protocol, memory layout. Copy into your /memories/ root.
starter routing rules
audit-trail.md.tmpl
Format spec for the one-row-per-session decision log.
| S-id | STATUS | summary |
REVIVAL-template.md
Standard layout for per-session detail journals.
structured dossier
fix-at-root-reflex.md.tmpl
Encoded discipline rule: notice bug in shared infra → fix source first, never route around.
discipline convention
brain/
Dockerfile
Pinned ChromaDB + FastAPI + sentence-transformers image. Builds restart-safe brain service.
recall.works/brain:v0.2
docker-compose.yml
Single-service compose. Named volume, port 8080, health probe.
one-command spin-up
recall.py
v0.1 stub with /health endpoint. Full server is on the v0.2 roadmap.
FastAPI + SSE
agency_sidecar_patch.md
Design note: frozen-read + writable-sidecar pattern, merge-by-distance at query time.
architecture explainer

Where this could matter

Long-running coding campaigns. When work spans weeks across many sessions and any detail loss costs hours of rediscovery.

Regulated environments. WORM-immutable audit trail with cryptographic time-based retention. Every session, every decision, every command — restorable for 7 years.

Multi-agent handoffs. When one agent finishes and a different model picks up. Curated brief + audit-trail + repo memory mean the receiving agent doesn't start cold.

Cost-sensitive autonomy. When the agent has authority over billable resources. Three-layer fail-closed cost gate plus outside-in budget alert means autonomy without surprise bills.

Where to go next