Command Brain
The central AI supervisor for the Passport / AngelCoin / agent economy. Each cycle it observes the whole system, decides exactly one bounded action, records what it did, and conditions on its own history. It is deliberately constrained — it can never move money.
What it manages safely
| Domain | Manageable? | Why |
|---|---|---|
| Rail health | OK | quarantine a failing rail — reversible, audited |
| Discovery cadence | OK | trigger /discover when stale — idempotent |
| Execution cadence | OK | run /tick (dry-run only) — never moves money |
| Integrity | OK | trigger attestation — append-only evidence |
| Disputes | Advisory | flag for attention; jurors decide, not the brain |
| Money movement | NEVER | only /settle + reserve services may move value |
| Key custody / interlock | NEVER | human/ISSUER-only |
Features
- Bounded action space: An explicit allowlist (NOOP / RECORD_NOTE / RUN_DISCOVERY / RUN_TICK / TRIGGER_ATTESTATION / QUARANTINE_RAIL / INVESTIGATE_DISPUTE). Anything else resolves to NOOP.
- Observability: A single datapoint snapshot each cycle — economy health, integrity, rails, disputes, and a composite health score.
- Persistence: Append-only BrainMemory table: each cycle writes OBSERVATION, DECISION, and OUTCOME rows.
- Playbook learning: Per-action success rates calculated from OUTCOME rows; the prompt tells the model which actions have actually worked.
- Fail-closed: LLM or transport failure => NOOP. The brain never guesses an action.
- Guardrails: No money-moving action is ever in the allowlist. Rate-limited. ISSUER/scheduler auth required.
Datapoints fed each cycle
From gatherDatapoints(): economy health (supply, reserve, coverage, external-revenue share, velocity, disputes, verifications, capabilities, offers, pipeline jobs), integrity status+issues, rail counts (enabled/quarantined), open disputes, and a composite health_score.
Endpoints
POST /api/v1/raillab/brain/cycle— run one cycle (ISSUER key orx-scheduler-secret)GET /api/v1/raillab/brain/memory— recent brain memory
The brain now runs on a configurable cron cadence via the scheduler. Set BRAIN_SCHEDULE env (default */10 * * * * = every 10 minutes).
Guardrails (never-do)
- Never mint, burn, transfer, settle, or redeem.
- Never clear the execution-safety interlock.
- Never touch signer/operator keys.
- Never act outside the allowlist; unknown proposals resolve to NOOP.
- Never act on an LLM failure — fail closed.