This release is a pre-release and may not be stable for production use.
pyboltzmann
An SDK for the Boltzmann Protocol: portable, verifiable, model-agnostic knowledge.
The brain conserves, validates, and retrieves knowledge. An external LLM processes, contextualizes, and uses it.
Reference: Boltzmann Brain: A Versioned, Distributable, and Model-Agnostic Knowledge Architecture (Gaussia, 2026).
What this is
A client for a Boltzmann brain. You open a directory, call methods, and they
work against an OCI artifact. Brain implements the complete protocol, including
hierarchical catalog navigation.
brain = Brain.open("./my-brain", actor=curator)
brain.ingest(pdf, request, my_llm) # register → delegate → validate → commit
brain.search(Query(text="Fourier")) # filter, resolve, verify
brain.drop(DropRequest(...)) # rebuild the Merkle DAG, cascade, record
await brain.push(client, "ghcr.io/org/brain", "v1")
The line it draws: the SDK does whatever the protocol defines mechanically; the
implementer supplies whatever the paper assigns elsewhere. Identity, the wire
formats, the four operation paths and a conformance suite are here; the model, the
ranking, the index engines and any CLI or MCP server are yours. No language model is
embedded — interpretation enters through CandidateProposer and nowhere else.
Installation
pip install pyboltzmann # the distribution
pip install 'pyboltzmann[oci]' # plus the network registry transport
import boltzmann # the import package
The two names differ because boltzmann on PyPI belongs to an unrelated package —
the same split as pygaussia providing gaussia.
Python >= 3.11. The core needs only pydantic and rfc8785; [oci] adds the
network registry transport.
Usage
The whole lifecycle of Section 11, against a real OCI layout:
from boltzmann import Actor, Brain, MemoryType, Producer, Query
from boltzmann.blocks import ActorKind, ProducerKind
from boltzmann.ingest import Candidate, CandidateSet, RegistrationRequest
curator = Actor(id="curator", kind=ActorKind.HUMAN)
brain = Brain.open("./my-brain", actor=curator)
# You supply the model. The SDK embeds none: what knowledge a source yields is its
# judgment, and what gets stored is the protocol's.
def my_llm(task, source):
# task.output_schema names the schema; brain.candidates_schema(task) *is* it, with the
# payload resolved per memory type. Hand it to the model as structured output.
return CandidateSet(
producer=Producer(kind=ProducerKind.MODEL, id="claude-opus-5", version="2026-07"),
candidates=[
Candidate(
memory_type=MemoryType.SEMANTIC,
evidence=[task.source],
locator="p.147",
payload={
"kind": "formula",
"label": "Fourier series",
"statement": "decomposes a periodic function into sines",
"subject": "signals",
},
)
],
)
request = RegistrationRequest(media_type="application/pdf", actor=curator, license="CC-BY-4.0")
pdf = b"%PDF-1.7 lecture 07: Fourier analysis"
# Register, delegate, validate, commit. Registering the same source twice is a no-op.
commit = brain.ingest(pdf, request, my_llm)
# Data with its provenance, never prose, every match verified against the snapshot.
bundle = brain.search(Query(text="periodic function"))
assert bundle.all_verified
assert bundle.matches[0].sources[0].locator == "p.147"
# Membership is provable in O(log n), without holding the rest of the module.
block_id = commit.committed[0]
assert brain.prove(block_id, MemoryType.SEMANTIC).verify(brain.root_of(MemoryType.SEMANTIC))
assert brain.verify()
Documentation
The docs/ directory
is the source of truth, and it is published as the Boltzmann SDK section of the
Gaussia docs.
| Quickstart | Ingest, query, prove, publish, remove — in one file |
| Architecture | Blocks, compositions, modules, snapshots |
| Memory types | The five typed blocks and the rules each obeys |
| Identity | JCS, the three levels of hashes, the values a payload refuses |
| Merkle DAGs | RFC 9162 over sorted leaves, and inclusion proofs |
| Catalog | Hierarchical classes and virtual paths over canonical sources |
| Interfaces | The protocol surface, and the things you plug in |
| Ingestion | Preserve the source, delegate the interpretation, validate |
| Query | Evidence Bundles, filters, and supplying a planner |
| Retention | Drop, supersede, demote, prune, redact |
| Distribution | Pack, push, pull, and selective installs |
| Conformance | Golden vectors, and the suites you inherit |
Development
uv sync
uv run pre-commit install && uv run pre-commit install --hook-type commit-msg
uv run ruff check . && uv run ruff format .
uv run mypy src
uv run pytest
Commits follow Conventional Commits — use
uv run cz commit for the interactive prompt. Releases are cut by
python-semantic-release from the commit history.
License
MIT — see LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyboltzmann-0.8.0b6.tar.gz.
File metadata
- Download URL: pyboltzmann-0.8.0b6.tar.gz
- Upload date:
- Size: 289.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f5f53022081dc96fae2aee7c0c22fb09e2960cf2b0c49388a26a754c6cf4ee4
|
|
| MD5 |
95be1186e544b0fdfa9bbee010b1ea52
|
|
| BLAKE2b-256 |
c0f6e5e4a4df089f2a23d0db30521de4d4127f6e0c2645262f4a0ac49e3167b5
|
Provenance
The following attestation bundles were made for pyboltzmann-0.8.0b6.tar.gz:
Publisher:
release.yml on gaussia-labs/pyboltzmann
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyboltzmann-0.8.0b6.tar.gz -
Subject digest:
3f5f53022081dc96fae2aee7c0c22fb09e2960cf2b0c49388a26a754c6cf4ee4 - Sigstore transparency entry: 2655187351
- Sigstore integration time:
-
Permalink:
gaussia-labs/pyboltzmann@3ae96724a52e011b7b08e7fb5a3d5f467c0a7a5e -
Branch / Tag:
refs/heads/develop - Owner: https://github.com/gaussia-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3ae96724a52e011b7b08e7fb5a3d5f467c0a7a5e -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyboltzmann-0.8.0b6-py3-none-any.whl.
File metadata
- Download URL: pyboltzmann-0.8.0b6-py3-none-any.whl
- Upload date:
- Size: 351.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53a44f5ea89b7237450f8303545b26e487d68ea1ac87aa0664f604c57575525f
|
|
| MD5 |
be09a1958d4bf82bcede122920e8916d
|
|
| BLAKE2b-256 |
4b111c3b25f7d51fb27fbd3c978739818365febb51124fa1ec6a729ad5f4e41d
|
Provenance
The following attestation bundles were made for pyboltzmann-0.8.0b6-py3-none-any.whl:
Publisher:
release.yml on gaussia-labs/pyboltzmann
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyboltzmann-0.8.0b6-py3-none-any.whl -
Subject digest:
53a44f5ea89b7237450f8303545b26e487d68ea1ac87aa0664f604c57575525f - Sigstore transparency entry: 2655187358
- Sigstore integration time:
-
Permalink:
gaussia-labs/pyboltzmann@3ae96724a52e011b7b08e7fb5a3d5f467c0a7a5e -
Branch / Tag:
refs/heads/develop - Owner: https://github.com/gaussia-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3ae96724a52e011b7b08e7fb5a3d5f467c0a7a5e -
Trigger Event:
push
-
Statement type: