Skip to content
Beta. This surface may change before GA; breaking changes are dated in the changelog.

Review

A Brain has one of four admission levels. The level is an owner decision: the Brain’s policy decides each write, never the caller. Human writes land, with one exception: a source snapshot that would change a value a person or another source supports waits in Review below L4, whoever sent it. The ladder governs agent writes. A write made with a management key (nsk_) is a person’s: it acts as the person who minted the key, and is recorded against the key’s id so it stays distinguishable from that person’s console writes.

Level Name Agent writes that land automatically
L1 Human approval only None; every agent record or statement write stages
L2 Auto-approve trivial No-op and formatting-only edits
L3 Auto-approve new and non-conflicting Writes admitted by the consequence rules (the default)
L4 Auto-approve all Everything, including destructive deletes

On the API, mode names the level: reviewed is L1, trivial is L2, open is L3, and unrestricted is L4. mode is a property of the Brain, never of the caller.

The level governs what the Brain asserts: records, statements, and the changes a source snapshot applies. It does not gate documents. A document is evidence, so it lands at every level, attributed to the key that wrote it. A document an agent wrote does not count as independent grounding for records the same key writes. If a team wants documents gated, send them through a source snapshot, whose changes follow the level.

One Brain · chain of custodyIllustrative lifecycle
01Sources
Records
Documents
Agent writes
02Review
ProposedHuman or policy decisionAccept · edit · reject
03Context
Accepted stateCited answer[1] source passage
04Receipt
Verified0198f3a2What the read consumed
Terminal window
curl -X PATCH "$API/v1/brains/tenant:acme" \
-H "authorization: Bearer $NICIA_KEY" \
-H "content-type: application/json" \
-d '{ "mode": "reviewed" }'

Every new Brain starts at L3 (open), whether you create it in the app or over the API, so routine agent writes do not need a person on every change. Choose a tighter or looser level as the Brain’s role changes.

Nothing about how you write. The same call returns a different status:

{
"data": {
"records": [{ "id": "acme", "kind": "company" }],
"change": {
"id": "chg_44a1e0",
"status": "staged",
"createdAt": "2026-08-14T10:59:41Z"
}
}
}

Branch on change.status, always:

Status Meaning
applied It landed. Readable now.
staged Waiting for a decision. Not readable yet.
rejected The Brain declined it. The request was fine; the content was not.

A rejection is a 200. The request was well-formed and the Brain made a decision — that is not an HTTP error.

A write only ever returns one of those three. A change you read back from GET /changes can also carry superseded (a selection, below, replaced it with a successor, or its target moved on before it was reviewed). The ?status= filter on /changes still only selects the three admission outcomes above.

Reads tell you the same thing from the other side: every /context response carries staged, so an empty answer distinguishes “nothing known” from “waiting on you.”

A staged change is one reason a Brain needs a person. GET /attention lists all of them, one item per decision, each with the reason that says which decision it is:

reason What is waiting What a person decides
proposed_change A staged write or a held Proposal Approve or reject
reopened A record whose grounds moved since it was affirmed: it reads needs_review Still holds, revise, or withdraw
unconfirmed A decision, rule or belief no person stands behind as it now reads Lock it in, edit it, or retire it
disagreement Sources that disagree about one subject and predicate: an open finding Choose a value, or keep both
import_exception A source snapshot’s entries held for review Take the source’s value, or keep mine
Terminal window
curl "$API/v1/brains/tenant:acme/attention" \
-H "authorization: Bearer $NICIA_KEY"
{
"data": {
"counts": {
"total": 3,
"byReason": {
"proposed_change": 1,
"reopened": 1,
"unconfirmed": 0,
"disagreement": 0,
"import_exception": 1
},
"incomplete": []
},
"items": [
{
"id": "proposal:2d347264-2d7f-48e9-bdc4-c427ce275466",
"reason": "proposed_change",
"surfaces": ["proposed_change"],
"subject": {
"type": "proposal",
"id": "2d347264-2d7f-48e9-bdc4-c427ce275466",
"source": "direct",
"title": "Edit to “Every invoice says net 30”"
},
"changeIds": ["chg_44a1e0"],
"records": [{ "id": "invoice-net-30", "kind": "rule" }],
"documents": [],
"documentLinks": [],
"related": ["record:rule:invoice-net-30"],
"since": "2026-11-05T10:55:12.000Z",
"updatedAt": "2026-11-05T10:55:12.000Z",
"admissionReasons": ["brain_policy_contradicts_accepted"],
"consolePath": "/knowledge/brains/brain_3a91c7?tab=review&item=proposal%3Aprp_71c2",
"consoleUrl": "https://app.nicia.ai/knowledge/brains/brain_3a91c7?tab=review&item=proposal%3Aprp_71c2"
},
{
"id": "record:rule:invoice-net-30",
"reason": "reopened",
"surfaces": ["reopened", "unconfirmed"],
"subject": {
"type": "record",
"id": "invoice-net-30",
"kind": "rule",
"title": "Every invoice says net 30"
},
"changeIds": [],
"records": [{ "id": "invoice-net-30", "kind": "rule" }],
"documents": [],
"documentLinks": [],
"related": ["proposal:2d347264-2d7f-48e9-bdc4-c427ce275466"],
"since": "2026-11-05T09:12:40.000Z",
"updatedAt": "2026-11-01T16:03:09.000Z",
"grounds": {
"state": "needs_review",
"reasons": [
{
"kind": "input_changed",
"recordId": "net-30-terms",
"changed": { "position": 41, "at": "2026-11-05T09:12:40.000Z" },
"path": [{ "edge": "based_on", "recordId": "net-30-terms" }],
"change": {
"kind": "field",
"field": "status",
"to": "superseded"
}
}
],
"monitored": {
"claims": ["net-30-terms"],
"sources": [],
"closure": 1
},
"observedThrough": {
"position": 44,
"at": "2026-11-05T11:02:00.000Z"
}
},
"consolePath": "/knowledge/brains/brain_3a91c7?tab=review&item=record%3Arule%3Ainvoice-net-30",
"consoleUrl": "https://app.nicia.ai/knowledge/brains/brain_3a91c7?tab=review&item=record%3Arule%3Ainvoice-net-30"
},
{
"id": "proposal:a48a5db7-d7d6-4244-bbce-04dfa55d6616",
"reason": "import_exception",
"surfaces": ["import_exception", "proposed_change"],
"subject": {
"type": "snapshot",
"id": "01a1ae3f-a98b-7d03-addd-66de619e71cc",
"source": "price-list",
"proposalId": "a48a5db7-d7d6-4244-bbce-04dfa55d6616",
"title": "Review source snapshot price-list revision 1."
},
"changeIds": ["chg_9b20f4"],
"records": [{ "id": "gizmo", "kind": "product" }],
"documents": ["prices"],
"documentLinks": [],
"related": [],
"since": "2026-11-05T08:30:00.000Z",
"updatedAt": "2026-11-05T08:30:00.000Z",
"admissionReasons": ["brain_policy_contradicts_accepted"],
"waiting": 1,
"consolePath": "/knowledge/brains/brain_3a91c7?tab=review&item=proposal%3Aprp_c45d",
"consoleUrl": "https://app.nicia.ai/knowledge/brains/brain_3a91c7?tab=review&item=proposal%3Aprp_c45d"
}
]
}
}

One problem is one item. A snapshot’s held entries are the pending change of the Proposal that carries them, so they are one import_exception item whose surfaces names proposed_change too. A rule whose grounds moved and that no person stands behind is one reopened item that also surfaces as unconfirmed. Items that are separate decisions about the same record name each other in related: above, an agent’s held edit to a rule, and the same rule reopening. counts.byReason counts items by their primary reason, so it sums to counts.total.

counts always covers every item and every reason, whatever page you ask for. Filter the page with ?reason=, and walk it with ?limit= and nextCursor. Items come ranked, most pressing first: a kind whose schema declares consequence: review, then grounds that moved, then contested standing (sources disagree, or another decision touches the same record), then the longest waiting. Records one change reopened share a cause, such as source:handbook@2 for a cited document’s second version; each is still its own decision. Each read is bounded: when one reached its bound, counts.incomplete names the reasons whose count is a floor rather than a total.

A proposed change’s subject.title says what it does and to which record or document: New owner for “Billing escalations go to the finance owner”, New rule: Refunds need a receipt, Edit to “Tallyworks support handbook”. A change that touches several things is titled by what its writer said it is, a branch’s intent for example, or else by the first records it touches. documentLinks names every Brain document an item mentions, in documents, cause or grounds, with its title and the console page that reads it. A document with no published version yet is not listed.

grounds is a reopened record’s validity as /context serves it, with at most three reasons; GET /records/{id} has them all. consoleUrl opens the decision in the console’s Review; opening it needs organization membership. The read needs the review capability, like GET /changes. It names titles, fields and standing, never record values, so it commits no receipt.

Terminal window
curl "$API/v1/brains/tenant:acme/changes?status=staged" \
-H "authorization: Bearer $NICIA_KEY"
{
"data": {
"changes": [
{
"id": "chg_44a1e0",
"status": "staged",
"consoleUrl": "https://app.nicia.ai/knowledge/brains/brain_3a91c7?change=chg_44a1e0",
"author": {
"kind": "key",
"id": "key_7f3a1c",
"name": "support-agent"
},
"records": [
{
"id": "bob-smith",
"kind": "person",
"before": { "role": "Head of Platform" },
"after": { "role": "VP Platform" },
"evidence": [
{
"source": "all-hands-2026-08",
"document": {
"id": "all-hands-2026-08",
"title": "August all-hands notes"
},
"anchor": "§ August all-hands › Org changes",
"quote": "Bob Smith, now VP Platform, confirmed…"
}
]
}
],
"createdAt": "2026-08-14T10:55:12Z"
}
],
"nextCursor": "eyJrIjoi…"
}
}

Every staged change carries the diff and the passage it came from, so a reviewer is deciding about evidence rather than about a model’s assertion. Each entry in records[].evidence is a citation the writer attached, shaped as GET /records/{id} shows it once the change is applied: the document (its id, its source’s name for a document of a named source, and its title when it was written with one), the anchor the Brain resolved the citation to (a heading path such as § Memo › Page 10, or a line range such as L12-L14), the quoted words in quote, and the writer’s own locator when it sent one. A citation of a source outside the Brain names its uri and versionToken instead of a document. source repeats the document id, or the uri, as one string for clients written before document and anchor. A citation without a quote has no quote. An applied change carries the same citations.

A source snapshot’s change also lists the documents it serves or retires ({ source, id, action }), apart from its records.

Every change also carries consoleUrl, the console page that shows it: its card in Review while it is staged, its entry in Changes once it is applied. An agent that wants a person to look at a change, or that approved one and wants to show a colleague, hands over that link. The person needs to be a member of the organization; see Share it.

Deciding a change is two steps on the lifecycle verbs. Approve binds the exact candidate you reviewed; publish applies it. Both need the review capability. Approve’s body may be omitted, except for a change that carries a standing answer: see below.

Terminal window
curl -X POST "$API/v1/brains/tenant:acme/changes/chg_44a1e0/lifecycle/approve" \
-H "authorization: Bearer $NICIA_KEY"
curl -X POST "$API/v1/brains/tenant:acme/changes/chg_44a1e0/lifecycle/publish" \
-H "authorization: Bearer $NICIA_KEY" \
-H "content-type: application/json" \
-H "idempotency-key: publish-chg_44a1e0" \
-d '{}'

Approving alone applies nothing: its answer reads "application": "not_applied" until publish answers "applied". Publishing again under the same Idempotency-Key returns the committed outcome instead of applying twice.

A change that proposes a standing answer is approved normally only when its regression check passed for that exact revision. Its outcome is on the change (evaluationState), and an edit after the check makes a pass stale. Any other finished outcome needs a recorded reason, which is kept with the reviewer:

Terminal window
curl -X POST "$API/v1/brains/tenant:acme/changes/chg_44a1e0/lifecycle/approve" \
-H "authorization: Bearer $NICIA_KEY" \
-H "content-type: application/json" \
-d '{"evaluationOverrideReason": "The judge misread the refund window; checked by hand."}'

Without one, approve answers 400 validation. A check still running answers 409 conflict and cannot be overridden. An answer published over an override is never reported verified; its verification keeps the outcome and your reason. This gate governs Review only. Whether an agent’s write enters Review at all is the Brain’s admission level (above), and an answer an agent writes directly is served as not_evaluated.

Publishing never overwrites a newer write. Every record a change was staged against is re-checked when it publishes, and if any of them was edited, created or deleted since staging, nothing is applied: publish answers 409 conflict naming each record that moved, and the change’s lifecycle becomes blocked, with blockedReason: "candidate_base_moved" and blockedRefreshAction: "restage_against_current_state". Approving it again cannot help — have the producer write the change again against the current records, then review that one. A blocked change can still be rejected or cancelled. Rejecting takes a reason, which is required — a rejection is never silent — and which GET /changes?status=rejected reports back:

Terminal window
curl -X POST "$API/v1/brains/tenant:acme/changes/chg_44a1e0/lifecycle/reject" \
-H "authorization: Bearer $NICIA_KEY" \
-H "content-type: application/json" \
-d '{ "reason": "Title is from a signature block, not a statement." }'

Read any change back by its id, in whatever state it is in. The answer is the change as /changes lists it, plus who decided it (decidedBy), who published it (publishedBy), its lifecycle and its operations. A write the Brain admitted without review has no lifecycle and no decidedBy:

Terminal window
curl "$API/v1/brains/tenant:acme/changes/chg_44a1e0" \
-H "authorization: Bearer $NICIA_KEY"

Approve part of a change by selecting operations. GET /changes/{changeId}/lifecycle lists the change’s operations (one per record written or deleted, with the operations each depends on), and select partitions them:

Terminal window
curl -X POST "$API/v1/brains/tenant:acme/changes/chg_44a1e0/lifecycle/select" \
-H "authorization: Bearer $NICIA_KEY" \
-H "content-type: application/json" \
-d '{ "selectedOperationIds": ["…"], "omittedOperationIds": ["…"] }'

The answer names a successorChangeId (what you selected) and a remainderChangeId (what you set aside, still pending). The original change is superseded and can never apply in full, so approve and publish the successor; the remainder stays in the queue until someone decides it. Selection is per record, not per field, and it does not edit values: when the substance is right and the wording is not, reject with a reason and have the corrected value written.

Undoing a change that has already landed is a console action today, not an operation on this API surface. When it runs, it either restores the content or refuses the whole revert up front — it never marks a change reverted while leaving the content in place.

An approval in Review confirms the content a person approved: the record’s confirmed is true from that publication, until anyone changes what it says. It does not clear a needs_review the record has since earned; only a successful Still holds does. It can be sent by a native person credential or by a Brain key carrying its organization’s issuer-attested person identity; an ordinary agent key still cannot affirm. A person’s partial edit of an agent’s rule does not confirm the text they left alone. A selection that would publish a replaces link without superseding its target is refused, so a reversal reaches Review whole or not at all; see reversing a decision.

An attested Brain key can use /revise only when it has both review and write. The merged content is still the agent key’s write, so the Brain’s usual admission policy and protections decide whether it lands. A staged write returns unaffirmed with reason: "staged"; it does not stand behind the draft. See Still holds.

Attribution is derived from the key that made the call, never from a field somebody filled in. A change’s author is the key that proposed it, on every change in GET /changes, applied ones included. Reading the change by its id adds decidedBy, who approved or rejected it, and publishedBy, who applied it. When a person decided, decidedBy.name is their display name as it was when they decided. So “who wrote this” and “who let it in” are both answered by the Brain, not by your logging.

Review is a checkpoint, not necessarily a human. A key with the review capability can settle changes, so you can put your own evaluator in front of the queue and only escalate what it is unsure about.

const changes = `${API}/v1/brains/tenant:acme/changes`;
const auth = { authorization: `Bearer ${NICIA_KEY}` };
// One page of the queue; walk the rest with `data.nextCursor`.
const { data } = await fetch(`${changes}?status=staged`, {
headers: auth,
}).then((response) => response.json());
for (const change of data.changes) {
const verdict = await myEvaluator(change);
if (verdict.confident) {
const lifecycle = `${changes}/${change.id}/lifecycle`;
await fetch(`${lifecycle}/approve`, { method: "POST", headers: auth });
const published = await fetch(`${lifecycle}/publish`, {
method: "POST",
headers: {
...auth,
"content-type": "application/json",
"idempotency-key": `publish-${change.id}`,
},
body: "{}",
});
if (!published.ok) {
const { data: state } = await fetch(lifecycle, { headers: auth }).then(
(response) => response.json(),
);
if (state.lifecycle.blockedReason === "candidate_base_moved") {
// A record it was staged against moved since staging. Re-run
// whatever produced the change against the current records.
await restage(change);
} else {
throw new Error(`publish ${change.id}: ${String(published.status)}`);
}
}
}
// leave the rest for a person
}

mode sets the policy’s default outcome — it is not a per-write switch. A key cannot ask for its writes to skip review, and no request body can either. The Brain’s admission policy evaluates the write’s consequence, magnitude, duplicates, and conflicts at the selected level.

“Wait” means the change stages until a human or a trusted service settles it; “land” means it is admitted immediately and shows up in /changes. L1 keeps all agent output in Review. L2 admits only trivial changes. L3 admits routine new, non-conflicting writes while retaining consequence gates. L4 turns those gates off, including the destructive-write hold, so use it only for a pipeline you explicitly trust. Human writes land at every level, except a snapshot’s change to a value a person or another source supports.

A trusted pipeline can write with an nsk_ organization management key: those writes count as a person’s writes, as described above, rather than as agent writes. Keep the pipeline in the same knowledge owner’s Brain. A management key has broad authority; do not hand it to an agent that should be governed as an agent. Admission still applies, including source-snapshot protection of values supported by a person or another source.

A staged change’s reason names why it waits, as codes joined with ; . The Brain decides each record a write touches on its own and stages the write as one change, so reason lists every distinct code that held one of them back: brain_policy_unbacked_agent_stake; brain_policy_conflicts_within_batch means some records waited for one reason and some for the other. Once a change is rejected or superseded, reason is the reviewer’s note instead, or a sentence saying what replaced it.

The first group comes from the Brain’s admission policy, at the levels shown.

Code Level What it means What the writer can do
brain_mode_reviewed L1 An agent write no more specific code named, such as one citing a document someone else wrote, or a link between records. At L1 every agent write waits. Nothing; a reviewer decides. The owner can raise the level.
brain_write_policy_requires_review L1 The same as brain_mode_reviewed, on a Brain whose policy was seeded from its write-policy setting rather than from mode. The same.
brain_mode_trivial L2 An agent write that is more than a no-op or a formatting-only edit. L2 admits only those. The same.
brain_policy_unbacked_agent_stake L1 An agent write that asserts content and cites nothing that grounds it. Cite the passage it came from in a document someone else wrote. At L1 it still waits, under brain_mode_reviewed.
brain_policy_self_cited_agent_stake L1 An agent write whose only citations are documents the same writer submitted. Cite a document another key or a person wrote.
brain_policy_destructive_write L1–L3 An agent delete, retype, schema change that removes or loosens what was declared, or a document retirement. Nothing; these wait below L4 by design.
brain_policy_contradicts_accepted L1–L3 The write disagrees with something the Brain already holds: it changes a value a person set, re-creates a record a person deleted, contradicts an accepted record in the classifier’s judgement, or (for an edit) changes what the record itself said. From any writer, also a source snapshot changing a value a person or another source supports. Check the accepted record. If the Brain is out of date, the reviewer approves; if the write is wrong, fix it.
brain_policy_conflicts_within_batch L1–L3 The write disagrees with another write in the same request: two statements giving different values for one subject and predicate, or two records the classifier judged cannot both be true. Nothing accepted is involved. Decide which is right and send only that one, or let the reviewer pick.
brain_policy_review_field_changed L1–L3 A substantive change to a field or kind the schema declares consequence: "review". Nothing; the schema asks a person to see these.
brain_policy_restates_existing L1–L3 The write repeats an accepted record: the same text as one of the same kind (ignoring case, spacing and punctuation), the same declared values as a typed record of the same kind, or a record the classifier judged it adds nothing to. An edit that only rewords itself counts too. Update the existing record instead of writing a second one.
brain_policy_restates_within_batch L1–L3 The write repeats another write in the same request: the same or nearly the same text, the same declared values, or, in the classifier’s judgement, nothing the other does not say. Merge the two into one record.
brain_policy_unverified_contradiction L1–L3 The classifier could not check the write against accepted knowledge: it timed out, failed, or was unsure, the write’s text was over 16,000 characters, or the Brain could not retrieve records to compare. The write fails closed. Nothing is wrong with the write; a reviewer decides.
brain_policy_unverified_within_batch L1–L3 The classifier could not check the write against the other writes in the same request. Send unrelated claims as separate requests, or let a reviewer decide.
brain_policy_workflow_proposal All The write came from one of the Brain’s built-in maintenance agents, whose writes always wait. Nothing; review it.

The classifier is a model that compares what a write says with the records it could collide with and with the other writes in its request. It informs the facts the policy reads; the policy, not the model, decides. Both unverified codes exist so that a judgement it could not make never lets a write through.

The classifier is shown up to 20 records the Brain holds, found by shared words and, on a deployment with embeddings, by meaning, so a new policy can be caught contradicting a record it never names. A record with no prose, such as a statement or a typed company row, is compared by what its fields say, one field: value per line. That holds when an agent creates a typed record as well: it is checked against the Brain as a page is. An agent’s edit to the fields of an existing typed record is not judged as a change of meaning; it is governed by who set the value and by the field’s declared consequence.

A write with both kinds of finding, one against what the Brain holds and one against another write in the same request, is named by the one against what the Brain holds: brain_policy_contradicts_accepted, not brain_policy_conflicts_within_batch.

The three _within_batch codes were added on 2026-10-30. A Brain created before then may keep the policy it was given: it stages the same writes, but names them brain_policy_contradicts_accepted, brain_policy_restates_existing and brain_policy_unverified_contradiction until its level is set again with PATCH /v1/brains/{handle}.

The second group comes from the path that made the change, not from the level.

Code What it means
brain_branch_merge_plan Merging a branch into the main Brain always waits for review. Policy codes the merge earned follow it.
brain_branch_merge_conflict Records or documents the merge writes were also changed on the main Brain since the branch was made.
source_plan_closed_to_review A source snapshot change that waits because a change it depends on in the same plan waits.
organization_schema_rollout An organization schema update offered to a Brain that has grown its own kinds or fields, so it is not applied automatically.
caller_requires_review A person saved a page in the console and asked for review, though policy would have let it land.

The change a write returns carries reason too. A staged write’s is the codes above. A rejected write’s names each refused record by its position in your request (records[2]: …). A write that only repeats a proposal a change already holds is answered by that change, with already_staged: or already_rejected: followed by the record and field; see records. A snapshot apply’s rejected entries carry policy codes, source_plan_closed_to_reject, or source_plan_mutation_invalid: followed by what the planner refused.

Register a webhook so a staged change reaches your queue instead of waiting to be polled:

Terminal window
curl -X POST "$API/v1/brains/tenant:acme/webhooks" \
-H "authorization: Bearer $NICIA_KEY" \
-H "content-type: application/json" \
-d '{ "url": "https://ops.example/nicia", "types": ["change.staged"] }'