brain.ingest() runs all of it in one call. Use the separate calls when the model runs elsewhere — in
another process, behind an MCP server, or on a human’s desk.
1. Register the source
The bytes are preserved verbatim and addressed by their hash. This is canonical memory: what was actually observed, so every later claim can be traced back to it.replace — a register plus a supersession edge, never a
mutation of bytes already stored:
Normalization pipelines
A normalized view is a deterministic transform of the original, recorded in provenance with the pipeline name and version.2. Define the task
oneOf. The
other wire schemas are available the same way:
3. Your model proposes
A
Candidate is not a Block and has no block_id. An unvalidated proposal has no identity, so it
cannot be committed by accident. Recording producer at this granularity is what makes a later batch
invalidation possible.4. Validate
Validation is the brain’s, not yours. A candidate that fails comes back rejected with a code rather than stored — and rather than raised as an error.The validation gate
DEFAULT_VALIDATORS runs seven checks, in this order:
The duplicate case is worth understanding: identical knowledge is identical, so re-submitting a set
you already committed rejects all of it and commits nothing. That is correct, not a failure.
validators=[*DEFAULT_VALIDATORS, MyDomainCheck()] to Brain.open.
5. Commit
The only write path, and one transaction: a failure part-way through leaves the previous snapshot as the current one.validate but never commit without going through it.