Build with Nicia
Outcome
Section titled “Outcome”You will give each tenant a stable Brain, sync the structured records your product already owns, add source documents, and read grounded context with citations. Nicia does not replace your system of record.
Read in this order
Section titled “Read in this order”Bootstrap sequence
Section titled “Bootstrap sequence”- Set
API=https://api.nicia.aiand keep credentials server-side. - Choose an immutable handle such as
tenant:${stableTenantId}. Do not use a mutable company slug. - Provision with
PUT /v1/brains/{handle}and setmodetoreviewed. - Use your management credential only in your provisioning backend. Mint a sync key with
writeandreview, and an agent key withreadandwritebut neverreview. - Write application-owned records with deterministic ids and stable idempotency keys. Approve only the change id returned by that sync write.
- Add non-empty source text as addressed documents. Empty record or source collections are successful no-ops; an empty document or malformed request fails validation, and missing rows never mean deletion.
- Run a typed query and a
/contextread. Surface its citations and receipt to your users. - Submit an agent-authored update. It must stage for review while accepted state remains unchanged.
- Retry only
429and5xxwith the same idempotency key or address, honorRetry-After, then revoke credentials and clean up your test Brain.
Success checks
Section titled “Success checks”- Repeating provisioning returns the same Brain.
- Repeating a write does not create a duplicate record or change.
- Context includes a citation for the document you added.
- An agent key cannot settle its own staged change.
- Empty record or source collections are successful no-ops. Empty documents and malformed input fail visibly without partial state.
See the detailed activation guide, API errors, idempotency guidance, and OpenAPI JSON.