Gaussia / Boltzmann Brains
Boltzmann brains are an optional, experimental knowledge-source feature
built on the
Gaussia community’s
pyboltzmann library. They store memory as immutable, content-addressed OCI
artifacts with a Merkle provenance ledger and fine-grained, per-module
authorization.
What Boltzmann brains provide
Section titled “What Boltzmann brains provide”- Immutable, content-addressed memory with provenance.
- Ingestion gating and per-module access policy (
semantic,procedural,canonical, and so on). - Retirement operations:
drop,supersede,redact. - SSH-signed history, trust roots, and branch/reconciliation workflows.
Agents access a Boltzmann brain through the brain search mode in an agent spec.
Installation
Section titled “Installation”pip install "alquimia-core[boltzmann]"Governed history also needs:
pip install "pyboltzmann[authenticity]==0.10.1"Agent spec
Section titled “Agent spec”Use search_mode: "brain" to query a registered Boltzmann brain.
{ "search_mode": "brain", "brain_ref": "fourier-signals", "modules": ["semantic", "procedural"]}| Field | Type | Description |
|---|---|---|
brain_ref | string | brain_id of a registered Boltzmann brain |
modules | string[] | Memory modules to query |
CLI reference
Section titled “CLI reference”Boltzmann brains are managed with the alquimia registry brains commands. They
are referenced as brain in agent specs and the runtime API.
Brain commands
Section titled “Brain commands”| Command | Description |
|---|---|
alquimia registry brains add <brain_id> | Register a brain |
alquimia registry brains init <brain_id> | Create a governed genesis for a brain with no history |
alquimia registry brains migrate <brain_id> --to <target_id> | Replay an ungoverned brain into a new governed brain |
alquimia registry brains list | List brains |
alquimia registry brains inspect <brain_id> | Show brain registration and authenticity summary |
alquimia registry brains install <brain_id> | Pull a brain’s modules into the local store |
alquimia registry brains ingest <brain_id> <source> | Register a source and derive blocks |
alquimia registry brains publish <brain_id> | Pack and push the brain to its OCI reference |
alquimia registry brains fetch <brain_id> | Retrieve another history, reconciling cleanly if configured |
alquimia registry brains set-policy <brain_id> <memory_type> | Grant or replace module access |
alquimia registry brains set-identity <brain_id> | Declare this brain’s actor and assisting parties |
alquimia registry brains identity <brain_id> | Show who a write would be attributed to |
alquimia registry brains set-reconcile-strategy <brain_id> <strategy> | Declare the lineage a clean fetch records |
alquimia registry brains set-authenticity <brain_id> | Declare what this brain accepts as authored |
alquimia registry brains reconcile <brain_id> | Combine with another history |
alquimia registry brains reconcile-status <brain_id> | Show an unresolved reconciliation |
alquimia registry brains reconcile-resolve <brain_id> <block_id> | Answer one open reconciliation question |
alquimia registry brains reconcile-accept-removals <brain_id> | Accept that blocks removed on the other side leave too |
alquimia registry brains reconcile-continue <brain_id> | Conclude a reconciliation once questions are answered |
alquimia registry brains reconcile-abort <brain_id> | Abandon an in-progress reconciliation |
alquimia registry brains drop <brain_id> <block_id> <memory_type> | Exclude a block from the composition |
alquimia registry brains supersede <brain_id> <block_id> <memory_type> | Record that a block takes precedence over another |
alquimia registry brains demote <brain_id> <block_id> <memory_type> | Lower a block’s retrieval priority |
alquimia registry brains redact <brain_id> <block_id> <memory_type> | Destroy a block’s bytes while retaining its identity |
alquimia registry brains delete <brain_id> | Deregister a brain |
alquimia registry brains branch list <brain_id> | List local branches |
alquimia registry brains branch current <brain_id> | Print the current branch |
alquimia registry brains branch create <brain_id> <name> | Start a new branch |
alquimia registry brains branch switch <brain_id> <name> | Check out a branch, creating or tracking it |
alquimia registry brains branch delete <brain_id> <name> | Delete a local branch |
alquimia registry brains branch merge <brain_id> <name> | Bring a branch into the current branch |
alquimia registry brains tags <brain_id> | List published tags for this brain |
Registering and governing a brain
Section titled “Registering and governing a brain”Add a brain without governance:
alquimia registry brains add fourier-signals \ --oci-reference ghcr.io/acme/brains/fourier-signals \ --modules semantic,proceduralAdd a governed brain, creating its genesis now:
alquimia registry brains add fourier-signals \ --oci-reference ghcr.io/acme/brains/fourier-signals \ --modules semantic,procedural \ --governed \ --sign-with SHA256:xxx \ --govern-quorum 1Governance is chosen at creation and cannot be added or removed later. To make an existing ungoverned brain governed, migrate it:
alquimia registry brains migrate fourier-signals --to fourier-signals-v2 \ --sign-with SHA256:xxx --govern-quorum 2Use --trust-root <file> to provide a trust-root JSON/TOML file instead of
synthesizing one. Use --sign-with to name one or more ssh-agent-held Ed25519
keys (SHA256 fingerprints) that sign the genesis.
Brain branches
Section titled “Brain branches”Each line of work in a brain can have its own tag. main publishes to the
brain’s registration tag; every other branch publishes to br.<name>, with /
rewritten as . (so ana/fix becomes br.ana.fix). publish, install and
fetch default to the current branch’s tag, so collaborators on different
branches do not refuse one another’s pushes.
# List branches; add --remote to see what the registry publishesalquimia registry brains branch list fourier-signals --remote
# Start a branch from the current head, or from a branch/snapshotalquimia registry brains branch create fourier-signals ana/fixalquimia registry brains branch create fourier-signals hotfix \ --from sha256:abc123 --switch
# Switch to an existing branch, or track a published onealquimia registry brains branch switch fourier-signals ana/fixalquimia registry brains branch switch fourier-signals ana/fix --create
# Merge a branch into the current onealquimia registry brains branch merge fourier-signals ana/fixalquimia registry brains branch merge fourier-signals ana/fix --ff-only
# Delete a local branch (the registry keeps its manifest)alquimia registry brains branch delete fourier-signals ana/fix
# See every tag the brain is published underalquimia registry brains tags fourier-signalsA merge first checks containment, then tries a fast-forward that writes nothing
and needs no actor. Only when the branches have diverged does it require a
strategy and an attributed actor, leaving the same open reconciliation state as
alquimia registry brains reconcile. A head is judged before it is served past
an open reconciliation.
Brain identity
Section titled “Brain identity”Declare the actor and assisting parties for a brain:
alquimia registry brains set-identity fourier-signals \ --actor "alice@example.org" \ --actor-kind human \ --assisted-by '{"id":"alquimia/codex","kind":"agent","model":"codex"}'Show who a write would be attributed to:
alquimia registry brains identity fourier-signalsingest requires a declared actor and records the proposing model as an
assisting party. Passing --actor-kind without --actor is rejected.
Authenticity policy
Section titled “Authenticity policy”A reader declares what it accepts as authored. The policy is inherited from the
agentspace unless a brain declares its own. The inherited and default policy is
unsigned=refuse.
alquimia registry brains set-authenticity fourier-signals \ --unsigned warn \ --required-signatures 1 \ --allow-propose-head| Flag | Description |
|---|---|
--unsigned | An unsigned head: warn, refuse, or permit (default refuse) |
--required-signatures | Distinct keys a head must be signed by |
--allow-propose-head | Accept a head vouched for only by a propose-scoped key |
--clear | Remove this declaration and inherit again |
inspect shows the current pull policy and local authenticity summary.
Signing and key management (brains auth)
Section titled “Signing and key management (brains auth)”Detached SSH signatures are stored beside snapshots and do not change the snapshot digest. Only Ed25519 keys from ssh-agent can sign.
| Command | Description |
|---|---|
alquimia registry brains auth keys | List Ed25519 keys ssh-agent offers |
alquimia registry brains auth status <brain_id> | Show integrity and authenticity status |
alquimia registry brains auth trust-root <brain_id> | Show the trust root in force |
alquimia registry brains auth sign <brain_id> --sign-with SHA256:xxx | Sign the head or a snapshot |
alquimia registry brains auth pin <brain_id> | Anchor this machine to the current trust root |
alquimia registry brains auth attribution <brain_id> | Show whether actors are vouched for |
alquimia registry brains auth plan-rotate <brain_id> <trust_root> | Build a trust-root revision for countersigning |
alquimia registry brains auth countersign <brain_id> --sign-with SHA256:xxx | Sign a planned revision |
alquimia registry brains auth rotate <brain_id> --plan <plan> | Put a new trust root in force |
alquimia registry brains auth revoke <brain_id> --sign-with SHA256:xxx | Retire or compromise a key |
Rotate a trust root with a quorum:
alquimia registry brains auth plan-rotate fourier-signals new-root.json \ --sign-with SHA256:aaa# send the plan to other key holdersalquimia registry brains auth countersign fourier-signals --sign-with SHA256:bbbalquimia registry brains auth rotate fourier-signals --plan plan.jsonReconciliation
Section titled “Reconciliation”Fetch another history and reconcile automatically when the brain declares a strategy and the plan is clean:
alquimia registry brains set-reconcile-strategy fourier-signals mergealquimia registry brains fetch fourier-signals \ --reference ghcr.io/acme/brains/fourier-signals \ --tag proposal-7Use --no-reconcile to fetch only, or --reason to record why a clean
reconciliation landed.
Manually reconcile when deciding is required:
alquimia registry brains reconcile fourier-signals \ --theirs <snapshot-digest> \ --strategy merge \ --reason "accepted quarterly review"Then resolve open questions:
alquimia registry brains reconcile-status fourier-signalsalquimia registry brains reconcile-resolve fourier-signals <block_id> --kind admitalquimia registry brains reconcile-accept-removals fourier-signalsalquimia registry brains reconcile-continue fourier-signalsAbort if needed:
alquimia registry brains reconcile-abort fourier-signalsIngest
Section titled “Ingest”alquimia registry brains ingest fourier-signals release-notes.pdf \ --media-type text/plain \ --allowed semantic,procedural \ --model-ref gpt-4o-miniIngest requires a declared actor; it records the proposing model as
alquimia/leviathan assisting the declared actor.
Module access
Section titled “Module access”alquimia registry brains set-policy fourier-signals semantic \ --severity read-only --tier-grants reader,editor,operatorBrain exit codes
Section titled “Brain exit codes”Brain commands return stable exit codes so automation can react without parsing messages. The codes are append-only.
| Exit code | Name | Meaning |
|---|---|---|
0 | OK | Success. |
1 | INTERNAL | Anything not covered below. |
2 | USAGE | Wrong invocation: bad name, refused branch operation, missing strategy or actor. |
4 | NOT_FOUND | The branch or reference named does not exist. |
8 | DIVERGED | The remote moved: the push was refused before writing, or another publish replaced yours right after it landed. Fetch, reconcile, and publish again, or move the work to its own branch with alquimia registry brains branch switch <brain_id> NAME --create. |
12 | RECONCILE | A reconciliation is open, or a merge/reconcile stopped to ask questions. Finish it with reconcile-resolve / reconcile-continue, or abort with reconcile-abort. |
8 means start a reconciliation (or branch the work); 12 means finish one.
Agentspace defaults
Section titled “Agentspace defaults”An agentspace can declare default actor and authenticity policy for every brain it contains. A brain’s own declaration overrides the agentspace default.
alquimia registry set-identity
Section titled “alquimia registry set-identity”Declare the default actor and assisting parties for every brain in the
agentspace. A brain can override this with brains set-identity.
alquimia registry set-identity --namespace production \ --actor "alice@example.org" \ --assisted-by '{"id":"alquimia/codex","kind":"agent","model":"codex"}'| Flag | Description |
|---|---|
--actor | Actor to attribute writes to this agentspace’s brains to |
--actor-kind | Kind of the declared actor (default human) |
--assisted-by | Assisting party; repeatable |
--clear-actor | Remove the agentspace actor |
--clear-assisted-by | Remove the agentspace assisting parties |
alquimia registry set-authenticity
Section titled “alquimia registry set-authenticity”Declare what a pull of this agentspace’s brains accepts as authored. Every brain
inherits this policy unless it declares its own with brains set-authenticity.
The default unsigned policy is refuse.
alquimia registry set-authenticity --namespace production \ --unsigned warn \ --required-signatures 1| Flag | Description |
|---|---|
--unsigned | warn, refuse, or permit (default refuse) |
--required-signatures | Distinct keys a head must be signed by |
--allow-propose-head | Accept a head vouched for only by a propose-scoped key |
--clear | Remove this declaration and inherit again |
Runtime API endpoints
Section titled “Runtime API endpoints”| Method | Path | Auth | Purpose |
|---|---|---|---|
POST | /registry/brain | Yes | Register a Boltzmann brain |
PUT | /registry/brain/{brain_id} | Yes | Update a brain registration |
GET | /registry/brain | Yes | List registered brains |
GET | /registry/brain/{brain_id} | Yes | Get one brain registration |
POST | /registry/brain/query | Yes | Query brains by filter |
DELETE | /registry/brain | Yes | Deregister brains by filter |
Runtime configuration
Section titled “Runtime configuration”These variables configure the runtime’s handling of Boltzmann brains.
| Variable | Required | Default | Description |
|---|---|---|---|
ALQUIMIA_OCI_NAMESPACE_BRAINS | No | brains | Deployment namespace for Boltzmann brain artifacts and their index anchor |
BRAIN_STORE | No | memory | Where served brains live: memory, or layout:<root> |
BRAIN_CACHE_TTL | No | 300 | Seconds before a cached brain is revalidated |
BRAIN_CACHE_MAX_BRAINS | No | 4 | LRU cache size limit |
BRAIN_WARMUP_ENABLED | No | true | Open registered brains at worker startup |
BRAIN_VERIFICATION_UNSIGNED | No | refuse | Default brain authenticity policy for unsigned heads: refuse, warn, or permit. Since 0.6.0 the default is refuse, so pulls of unsigned brains fail closed unless explicitly relaxed |
ALQUIMIA_OCI_SIGNATURE_POLICY | No | required | OCI signature verification policy for pulled artifacts, including Boltzmann brains: required, warn, or off |
ALQUIMIA_OCI_COSIGN_PUBKEY | No | — | Cosign public key used to verify signatures on pull |
Actor attribution
Section titled “Actor attribution”Operations that write to a governed brain must attribute the write to an actor. Environment variables set a process-wide default; a brain’s declared identity overrides them.
| Variable | Required | Default | Description |
|---|---|---|---|
ALQUIMIA_ACTOR_ID | No | — | Actor identifier for the operation |
ALQUIMIA_ACTOR_KIND | No | — | human, agent, service, or pipeline. Only valid when ALQUIMIA_ACTOR_ID is set |
ALQUIMIA_ASSISTED_BY | No | — | JSON string describing assisting parties for the operation |
These variables are read by CLI commands such as
alquimia registry brains publish, reconcile, and ingest. The ingest
command still requires a brain-declared actor and records the proposing model as
alquimia/leviathan assisting that actor.
Governance and authenticity
Section titled “Governance and authenticity”Governed brains add provenance and authenticity controls on top of OCI distribution.
Trust roots and genesis
Section titled “Trust roots and genesis”A brain is either governed at creation or never. Its genesis names a trust root: a set of Ed25519 public keys, scopes, and a govern quorum. The trust root binds every key to the actor who created the genesis, so later signatures can be attributed to a known party.
alquimia registry brains add --governedcreates the genesis immediately.alquimia registry brains initcreates the genesis for a brain that was registered without governance but has no history yet.alquimia registry brains migrate --to <new_brain>replays an ungoverned brain into a new governed brain. The original brain is untouched.
Signing with ssh-agent
Section titled “Signing with ssh-agent”Governed brains are signed with keys held in the local ssh-agent. Only Ed25519
keys can sign. The key is identified by its SHA256 fingerprint, as shown by
alquimia registry brains auth keys.
Signatures are detached: they live beside the snapshot and do not change its
digest. A head can be signed by multiple keys;
alquimia registry brains auth sign --sign-with SHA256:xxx appends a signature,
and writing commands such as reconcile-continue accept --sign-with to sign
the head they leave.
Reader authenticity policy
Section titled “Reader authenticity policy”Every reader declares what it accepts as authored. The policy is local: it never
travels with the brain. An agentspace declares a default with
alquimia registry set-authenticity; a brain can override it with
alquimia registry brains set-authenticity.
| Policy flag | Meaning |
|---|---|
unsigned | warn and install, refuse, or permit silently (default refuse) |
required-signatures | Distinct keys a head must be signed by |
allow-propose-head | Accept a head vouched for only by a propose-scoped key |
warn still installs an unsigned head; refuse rejects it. The default policy
is refuse, so a brain pull fails closed when no valid signature is present. A
remote that was once seen signed is refused unsigned unless permit is set.
Pinning
Section titled “Pinning”alquimia registry brains auth pin anchors a brain to the current trust root on
this machine. Later pulls must descend from it. The pin is local and never
travels with the brain, so publishing cannot make a reader trust a replacement
root.
Attribution
Section titled “Attribution”Every write to a governed brain is attributed to an actor. The actor can be declared on the agentspace or on the brain itself; a brain declaration is authoritative and cannot be overridden by a flag or environment variable. Assisting parties can also be declared and selected per write.
| Source | Variables / flags |
|---|---|
| Brain declaration | brains set-identity |
| Agentspace default | registry set-identity |
| Invocation | --actor, --actor-kind, --assisted-by, --empty-assisted-by |
| Environment | ALQUIMIA_ACTOR_ID, ALQUIMIA_ACTOR_KIND, ALQUIMIA_ASSISTED_BY |
ingest requires a declared actor. It does not use --actor or the
environment; instead it records the proposing model as the agent
alquimia/leviathan assisting the declared actor.
Reconciliation
Section titled “Reconciliation”Governed brains share history through OCI. alquimia registry brains fetch can
automatically reconcile a fetched history when the brain has declared a strategy
and the plan is clean. If the other history requires decisions, the fetch
reports what stopped it and leaves the current head untouched.
Manual reconciliation uses alquimia registry brains reconcile and the
reconcile-status, reconcile-resolve, reconcile-accept-removals,
reconcile-continue, and reconcile-abort commands. An unresolved
reconciliation refuses every write to the brain until it is resolved.
Brain branches
Section titled “Brain branches”Brains support branches so that different lines of work can publish
independently. main publishes to the brain’s registration tag; any other branch
publishes to br.<name>, with / rewritten as . (for example, ana/fix
publishes as br.ana.fix). publish, install, and fetch default to the
current branch’s tag, so collaborators on separate branches do not refuse one
another’s pushes.
alquimia registry brains branch listshows local branches and, with--remote, the branches published in the registry.alquimia registry brains branch createstarts a new branch from the current head, a named branch, or asha256:snapshot.alquimia registry brains branch switchchecks out a branch, optionally creating it or tracking a published branch from its tag.alquimia registry brains branch mergebrings another branch into the current one. It checks containment first, then tries a fast-forward that writes nothing, and only if the histories diverged does it perform a reconciliation that stops to ask questions.alquimia registry brains branch deleteremoves the local branch ref; the registry manifest remains because OCI registries delete manifests, not tags.alquimia registry brains tagslists every tag the brain is published under, includingmain, branch tags, and any release tag set withbrains publish --tag.
A held head is judged before it is served past an open reconciliation, so switching to a branch cannot silently bypass an unfinished reconcile.
Lifecycle example
Section titled “Lifecycle example”For high-stakes knowledge that must be provable and versioned, a Boltzmann brain stores content as an immutable, content-addressed OCI artifact with a Merkle provenance ledger.
# Register the brainalquimia registry brains add fourier-signals \ --oci-reference ghcr.io/acme/brains/fourier-signals \ --tag v1
# Grant access per memory modulealquimia registry brains set-policy fourier-signals semantic \ --severity read-only --tier-grants reader,editor,operatoralquimia registry brains set-policy fourier-signals canonical \ --severity destructive --tier-grants operator
# Ingest new evidence through the CLI gate (not by agents)alquimia registry brains ingest fourier-signals ./evidence/lecture07.txt
# Publish a new versionalquimia registry brains publish fourier-signals --tag v2Retirement operations include:
drop— remove a block and rebuild the composition over the survivors. Dropping canonical evidence cascades to everything derived from it.supersede— mark a block as replaced by a newer block (append-only, suitable for episodic memory).redact— destroy bytes for legal or safety reasons while keeping the provenance ledger intact.