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

DomainManageable?Why
Rail healthOKquarantine a failing rail — reversible, audited
Discovery cadenceOKtrigger /discover when stale — idempotent
Execution cadenceOKrun /tick (dry-run only) — never moves money
IntegrityOKtrigger attestation — append-only evidence
DisputesAdvisoryflag for attention; jurors decide, not the brain
Money movementNEVERonly /settle + reserve services may move value
Key custody / interlockNEVERhuman/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 or x-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.

Related

Economy Health Dashboard