Garry's Opinionated OpenClaw/Hermes Agent Brain
Upgrade to v0.60.52.0: PGLite to Postgres moves are graduations
gbrain migrate --to postgres (alias --to supabase) on a PGLite brain is a
verified engine graduation. It carries the brain's full history (write
requests, withdrawals, versions, takes, tokens and OAuth clients, with their
IDs), so brains with write history and managed brains can move to Postgres.
The bare command stops at exit 3 for every PGLite to Postgres move, with
or without history. It prints the plan as a confirmation_required document
and changes nothing. A script or skill that ran gbrain migrate --to supabase --url <url> and expected the copy to happen must add the confirmation step.
Never run the move without the user's agreement.
Finish the upgrade.
gbrain upgraderuns it. To be sure, on the brain host:gbrain apply-migrations --yes --no-autopilot-installA schema migration adds the
persistence_graduationtable; no rows are rewritten.Move the URL out of the command line. Ask the user to put the target URL in
GBRAIN_TARGET_URL(read -rs GBRAIN_TARGET_URL && export GBRAIN_TARGET_URL) and use--url-env GBRAIN_TARGET_URLeverywhere.Plan and ask.
gbrain migrate --to postgres --url-env GBRAIN_TARGET_URL --jsonExit 3. Relay
user_messageand the what-moves / what-stays lists, then stop until the user agrees.--planshows the same plan read-only (exit 0).Run. After the user agrees, run
fix.commandfrom the document:gbrain migrate --to postgres --url-env GBRAIN_TARGET_URL --yes --expect <plan_hash>preview_changedmeans the plan changed since the user saw it: plan and ask again.Afterwards. Check a stopped or background run with
gbrain migrate --status --json; continue withgbrain migrate --resume. The PGLite data dir is kept as<path>.graduated-<run_id>; deleting it is the user's call. Existing tokens, OAuth clients and local writers stay valid.
gbrain config set migrate.graduation false sends the move through the legacy
copier, which refuses brains with write history. Postgres to PGLite moves use
the legacy copier. On Windows a brain with history stays on PGLite
(graduation_unsupported_platform).
Full walkthrough, exit codes and recovery by error code: Move a PGLite brain to Postgres.