Skip to main content
Two endpoints that bracket a run. attach gives an agent a compact, citable snapshot of what the company believes; consolidate sends back what the run learned. They are a pair. The citation tokens attach hands out are the tokens consolidate accepts back, which is how a run can say this contradicts what you told me without inventing an id.

Attach

Body

Response — the capsule

200
Read render first. It is a prose rendering of the whole capsule written for a model to read. The JSON beside it is for machines. An agent that reads only the JSON has to re-derive the labelling scheme that render already explains.

The three fields that make a capsule useful

Belief ordering is deterministic — by confidence, then observation time, then id — so [B1..Bn] labels are reproducible for identical data. A label is stable within a capsule, not across capsules; always resolve through citation_map. deltas.newly_active and deltas.invalidated are empty when you send no since_watermark, because there is nothing to diff against.

Consolidate

The run-end debrief. Returns 202 Acceptedthe writes are proposals, not facts.

Body

202 is the whole point. Nothing you send to consolidate becomes company truth on its own. Each learned item becomes a proposal routed through the memory gateway, and the gateway’s mode decides what happens next:Read mode in the response — do not assume it. Accepting a proposal is brain.proposal.accept, which defaults to human approval.Track what happened to your proposals with GET /v1/brain/proposals.

quote is what makes a claim reviewable

quote is the span the claim was drawn from. A proposal with a quote can be checked against its source by a human in seconds; one without has to be re-investigated. Include it whenever the claim came from text.

Per-tenant twins

Both operations also exist under /v1/users/{user_id}/brain/…, which scopes the call to one tenant rather than the company. Use the company form for company knowledge and the tenant form when the knowledge belongs to one customer.