Memory Doctor

Your AI Has 12 Memory Systems.
How Many Are Actually Working?

A service can show "loaded" while producing nothing. A database can exist while being locked. A file can be present while being stale. Memory Doctor checks what matters — not just "does it exist?" but "is it actually working?"

$95 one-time purchase Buy Now — $95
✓ BUILT IN PRODUCTION
🛡️ PROTECTED BY BACKUP & RESTORE
The Problem

Silent memory failures are everywhere

Your AI has a WAL, LCM database, semantic search, PostgreSQL, markdown files, snapshots, flush logs, bootstrap files, and more. Any of them can fail silently. You won't know until your AI forgets something critical.

Service Shows "Loaded" But Is Dead

Your WAL service is registered with launchd. It shows "loaded." But it's pointing to the wrong script, producing nothing. You don't notice for days.

Database Exists But Is Locked

Your LCM database file is there. It has data. But a stale lock prevents any new writes. Summaries stop accumulating. Context compacts to nothing.

File Present But Stale

Your snapshot exists. It's the right size. But it hasn't been updated in 3 days. Your AI recovers from a 72-hour-old snapshot and misses everything since.

Missing Sections, No Warning

MEMORY.md exists and looks fine. But the "SYSTEM ARCHITECTURE" section got deleted during a bad merge. Your AI loses critical knowledge — silently.

PostgreSQL Down, Agent Blind

Postgres stopped accepting connections. Your photos table, tech handoffs, dispatch jobs — all inaccessible. Your AI can't look up history.

Bootstrap Files Missing

HEARTBEAT.md got deleted. Or IDENTITY.md. Or TOOLS.md. Your AI starts up without critical configuration — and you don't know which file is missing.

12 layers
Every memory system. One command.

Memory Doctor checks all 12 memory layers in your OpenClaw installation, color-codes the results, and tells you exactly what's broken and how to fix it.

Complete Coverage

Every memory layer, verified

01

WAL (Write-Ahead Log)

Is session-wal.sh running? Is the WAL file fresh (last write < 10 min)? File size growing? Today's file exists? Checks the actual process AND the output — not just "loaded."

02

LCM Database

Is lcm.db accessible? Not locked? Size reasonable? Recent summaries exist? Message count growing? Can run queries successfully? Catches stale locks before they eat your context.

03

QMD (Semantic Search)

Is Ollama running? Is the qmd CLI available? Collection indexed? Executes a test query and verifies results. Not just "is the service up" but "can it actually find things."

04

PostgreSQL

Is Postgres accepting connections? Can it query your database? Do all required tables exist (photos, tech_handoffs, part_lifecycle, dispatch_jobs, agent_tasks)? Row counts for each.

05

MEMORY.md

File exists? Recently modified? Size > 0? Contains expected sections? Catches the "file exists but critical sections got deleted" failure mode.

06

SOUL.md

Your agent's identity file. Checks existence and verifies Core Commitments and Tripwire Wisdom sections are intact. Without SOUL.md, your agent has no identity.

07

Snapshots

ops/snapshots/latest.md — exists? Fresh (< 24h)? Size reasonable? A stale snapshot means your recovery point is hours or days behind reality.

08

Daily Memory

Today's memory file exists? Yesterday's? Total archive count? Daily memory files capture decisions and context changes — if they stop being created, something broke.

09

No Amnesia Flush

ops/flush-log.md — exists? Recent flush logged (< 1h)? If the flush system stops running, your AI's maximum memory loss goes from 5 minutes to infinity.

10

Bootstrap Files

All 7 auto-loaded files present: AGENTS.md, SOUL.md, TOOLS.md, IDENTITY.md, USER.md, HEARTBEAT.md, MEMORY.md. One missing file = one blind spot.

11

Recovery System

RECOVERY.md should NOT be present (cleaned up after use). Wisdom service running? If Wisdom is down, your behavioral monitoring is blind.

12

Credentials

ops/credentials/ directory exists with files? Without credentials, your agent can't authenticate to external services.

Four Modes

Diagnose. Fix. Monitor. Automate.

01

Diagnose

Run the full 12-layer check. Color-coded report with ✅/⚠️/❌ for every check. Exit code tells you the overall health. One command, instant answer.

02

Fix

Pass --fix and Memory Doctor attempts auto-repair: restart WAL, clear LCM locks, create missing daily memory files, clean up stale recovery files. All repairs logged.

03

Monitor

Pass --watch for continuous monitoring. Re-checks every 5 minutes. Alerts only on state changes — when something breaks or recovers. Background it and forget.

04

Automate

Pass --json for machine-readable output. Integrate with dashboards, heartbeat scripts, launchd services, or your own monitoring stack.

See It Work

Real output from a production system

╔══════════════════════════════════════════════════════╗
║          MEMORY DOCTOR — Diagnostic Report          ║
╚══════════════════════════════════════════════════════╝
  2026-03-26 00:38:36 HST

  ✅   1. WAL (Write-Ahead Log)
      ✓ WAL service loaded via launchd
      ✓ Today's WAL exists: 2026-03-26.md
      ✓ Last write 42s ago (limit: 600s)

  ✅   2. LCM (Lossless Context Management)
      ✓ lcm.db found (1,107,763,200 bytes)
      ✓ 2,225 summaries in LCM database
      ✓ No stale lock files detected

  ⚠️   3. QMD (Semantic Search)
      ✓ Ollama is running
      ⚡ qmd CLI not found in PATH

  ✅   4. PostgreSQL
      ✓ Connected to jarvis_coo
      ✓ photos exists (42 rows)
      ✓ dispatch_jobs exists (1 rows)

  ─── Summary ───
  ✓ 27 passed  ⚡ 3 warnings  ✗ 0 failed

  WARNINGS: 3 check(s) need attention.
✓ BUILT IN PRODUCTION
🛡️ PROTECTED BY BACKUP & RESTORE

This tool was born from experience. A WAL service showed "loaded" for a week while pointing to the wrong script. A Jarvis Doctor only checked "loaded" not "working." Memory Doctor checks what matters — actual output, actual freshness, actual health.

Stop guessing. Start diagnosing.

12 memory layers checked. Color-coded results. Auto-repair. Continuous monitoring. $95, once, forever.

Buy Now — $95

14-day money-back guarantee. No questions asked.