GET /v1/brain/info.
200 application/json
training block is camelCase. That is how the route actually answers, and it is worth noticing before you write a parser.
What it is
ExoBrain, a small graph neural model trained on one organization’s knowledge graph (in practice, a file atbrains/<org>/base.onnx that turns a query into a set of focal nodes plus a confidence).
Focal nodes, the nodes the model settled on as the centre of an answer (in practice, the ids that the reasoning converged to, which are usually not the same as the ids plain cosine similarity would have returned).
Parity, the check that the exported model gives the same numbers as the model that was trained (in practice, a hard gate: an export that drifts past a tiny tolerance is rejected and never published).
One brain per organization, not one per subject. It trains on the whole org’s graph, and retrieval filters its output down to the nodes the effective subject actually owns. That is why deleting a subject marks the org’s brain stale rather than deleting it.
Where it comes from
Training is an admin-scope job, not a synchronous call.POST /v1/brain/train enqueues it and returns immediately.
202 application/json
training block of GET /v1/brain/info, which reports status: "none" on an org that has never trained instead of failing.
The published artifact is only replaced when the new one passes parity. A run that fails, or that trains a model whose export does not match, leaves the previous good brain serving. You never get a worse brain by trying to retrain.
Field reference
When the brain serves, and when it does not
A retrieval takes the brain path when the org has a trained artifact that still matches the graph. Otherwise it falls back to hybrid vector plus keyword search and says so:
Staleness has two triggers, and they behave differently:
- Shape drift. The artifact is exported at a fixed node and edge count. If the graph has grown or shrunk since, the brain refuses to run and retrieval falls back with
brain_stale. - Content drift. Editing a node’s text or forgetting one does not change the counts, so the shape check cannot see it. Every mutation you make through the API stamps the org as dirty instead. Here the brain still answers, because a slightly stale brain is a better answer than no brain, and the response carries
degraded: truewithdegradationReason: "brain_stale".
path: "brain" and degraded: true together are a valid, expected combination. See Brain path and hybrid path.
Reading the glass box directly
POST /v1/brain/query runs one forward pass and returns the reasoning state without wrapping it in a retrieval. It is the route behind an attention heat map or a “what did the model look at” view.
200 application/json
cosine_top is the plain nearest-neighbour list, included so you can compare it against focal. A focal node with cosine_in_seed: false is one the model reached through the graph that similarity alone would have missed. That gap is the clearest single demonstration of what the brain adds.
Why does the brain family ignore X-Exo-Subject?
Why does the brain family ignore X-Exo-Subject?
POST /v1/brain/query and POST /v1/brain/answer read the API key owner’s own content, so the subject selector is not accepted on them. If you need per-subject reasoning output, use POST /v1/retrieve with X-Exo-Subject, which returns the same reasoning state in its cognition block already filtered to that subject’s nodes.Why 404 and 409 on a brain query
Why 404 and 409 on a brain query
404 means no artifact exists for the org yet: train one. 409 means an artifact was just published and the serving layer has not picked it up. The serving layer reloads when the training timestamp changes, so a 409 clears on its own shortly after a train; retry rather than retraining.
What makes a training run fail permanently
What makes a training run fail permanently
Two failures are terminal on the first attempt rather than retried. A parity failure means the exported artifact did not reproduce the trained model, so republishing it would serve numbers nobody verified. Too few nodes means the graph is too small to train anything meaningful. Neither is worth burning GPU time on three times, so both stop immediately and report through
training.lastError.Does deleting a subject destroy the brain?
Does deleting a subject destroy the brain?
No.
DELETE /v1/subjects/{subject_id} erases that subject’s rows and marks the org’s brain stale, because the brain was trained across every subject. Retrieval keeps working on the fallback path until you retrain. The erased subject’s content is gone from the graph either way, and retrieval filters brain output to nodes that still exist.Limits
- One brain per organization. There is no per-subject brain and no route to request one.
- One training run in flight per org. A concurrent request is refused with 409, not queued.
GET /v1/brain/infohas no typed response schema in the contract. Thetrainingblock is the stable, documented part; treat unknown top-level keys as additive.- The brain’s
tierreports graph size, not reasoning depth. See Cognition. - Training cost is real GPU time and is metered. It is not something to run on every write.
Next
Brain path and hybrid path
What
path, degraded and degradationReason mean on a retrieval.Get ExoBrain status
The full info response and the training block.