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

Build with Nicia

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 doesn’t need to replace your system of record, and it can hold those records too.

  1. Overview
  2. Quickstart
  3. Add a Brain
  4. Authentication
  5. Errors and Idempotency
  6. OpenAPI reference
  1. Set API=https://api.nicia.ai and keep credentials server-side.
  2. Choose an immutable handle such as tenant:${stableTenantId}. Do not use a mutable company slug.
  3. Provision with PUT /v1/brains/{handle} and set mode to reviewed.
  4. Use your management credential only in your provisioning backend. Mint a sync key with write and review, and an agent key with read and write but never review.
  5. Write application-owned records with deterministic ids and stable idempotency keys. Approve only the change id returned by that sync write.
  6. Add non-empty source text as addressed documents. A document write asks Nicia to extract proposed records from the text only when you send "extract": true; when your own pipeline or agent writes the typed records, leave it off so Review holds your agent’s writes and not extraction’s guesses. A batch or document write must carry at least one item — an empty collection is a 400 validation error, so skip the call when nothing changed. A write whose values already match what is stored succeeds as a no-op instead, coming back with fields: [] and no change id. An empty document or malformed request fails validation, and missing rows never mean deletion.
  7. Run a typed query and a /context read. Surface its citations and receipt to your users.
  8. Submit an agent-authored update with the agent key, not the management key: a management key is a person’s, so its writes land even on a reviewed Brain. The agent’s write must stage for review while accepted state remains unchanged.
  9. Retry only 429 and 5xx with the same idempotency key or address, honor Retry-After, then revoke credentials and clean up your test Brain.
  • 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.
  • An empty record or source collection is a 400, not a no-op — skip the call when nothing changed. A write whose values already match what is stored succeeds as a no-op instead, with fields: [] and no change id. Empty documents and malformed input fail visibly without partial state.

See the detailed activation guide, API errors, idempotency guidance, and OpenAPI JSON.