Skip to main content

AI Turn Audit: Verbatim AI Decision Records

AI Turn Audit records every completed AI agent turn — the system prompt, the user prompt, and the assistant response, stored verbatim alongside model, tokens, latency, retrieval and tool-call references — into an append-only evidence log scoped to your tenant. It backs SOC2 / HIPAA / FINRA evidence requests and implements the GDPR Article 22 § 3 human-override path for contested automated decisions.
This page describes Orbit’s platform controls. It is not legal advice. Whether your posture requires verbatim AI records depends on your regulator, your counsel, and your data-handling policy. The control is tenant-owned: you opt in, you opt out, and you own the retention decision.

What this control does — and why it is fail-closed

When enabled, every completed AI agent turn writes one immutable row to your tenant audit table with:
  • the full system prompt and user prompt as sent to the model (verbatim, unredacted — a regulator must be able to reproduce the decision context),
  • the final assistant response,
  • model and version, token counts, latency, confidence, and the outcome (ok, escalated, refused, error, cost_capped),
  • retrieval references (document name, score) and tool-call references (name, status, duration).
Default OFF. An org that never opts in records no verbatim turns. The toggle is fail-closed by design: a lookup error reads as disabled, so a transient storage problem never implies verbatim prompt logging is on. Agent replies are never blocked by the audit write — a failed write is logged and swallowed. Verbatim prompt records are a PII surface under multi-year retention. Treat enabling as a deliberate, policy-backed choice — and pair it with a retention decision.

Enable and disable (the Settings toggle)

The on/off switch lives at Settings → Compliance → AI Turn Audit in the dashboard, or over the API on the Settings surface:
To opt in (owner-only — the opt-in is an org-owner compliance decision):
To disable later, re-run the same PUT with enabled: false. Every change is written to the org audit log. Distinguish the two endpoints that share a shape:

Filter and paginate the recorded turns

GET /api/v1/agents/ai-turn-audit returns rows newest-first with cursor pagination. Filter by agent, conversation, or a date range (common windows: day, week, quarter — a day range is from=2026-08-29to=2026-08-30).
Pass next_cursor back as cursor and repeat until next_cursor is null — the chain is deterministic so a same-millisecond batch never re-orders mid-export. Page size is clamped to 1–200 rows (default 50). Two narrower views:
  • One conversation: GET /api/v1/agents/conversations/{conversationId}/ai-turn-audit — the per-conversation evidence chain behind the dashboard’s chain-of-decisions panel.
  • DSAR (Art. 15): enumerate the subject’s conversations and pull each through the per-conversation route; see DSAR.
Full request/response schema: API Reference → Agents.

Record a GDPR Art-22 § 3 human override

When a human contests an automated decision, stamp the audit row with an override — the original decision is preserved; the override appends a second stamp rather than mutating the row.
Constraints:
  • The auditId path segment is the row’s UUID.
  • reason is free text, 1–2000 characters, trimmed server-side.
  • Append-once: a second override on the same row returns 409 OVERRIDE_ALREADY_APPLIED; an unknown id returns 404 AUDIT_ROW_NOT_FOUND.
  • Access is owner/admin — the same gate as the tenant export.
In the dashboard the override is recorded from the expanded row under Settings → Compliance → AI Turn Audit — the “Record human override” button opens the same dialog with the same append-once semantics.

Periodic export — JSONL with a 5000-row soft cap

The canonical SOC2 / HIPAA / FINRA evidence pull exports the filtered set as JSON Lines — one audit row per line, bit-for-bit the same row shape the API returns (no field renaming, no row-shape coercion). In the dashboard an Export JSONL button in the page header walks the cursor until exhausted and downloads ai-turn-audit-<date>.jsonl. Over the API you do the same: page through next_cursor at up to 200 rows per call and write one row per line. The dashboard export applies a soft cap of 5000 rows so a misclicked unfiltered range cannot run away. If your export hits the cap, narrow the date range or the agent/conversation filter and re-run the remainder — needed, for example, on quarterly FINRA reviews of high-volume tenants.

When to leave it off vs on

Leave it OFF (the default) unless your policy literally requires verbatim AI records. This is the fail-safe direction for ordinary SMB, marketing, or support workloads — enabling costs write amplification and a multi-year PII surface a casual tenant doesn’t want. Turn it ON when your audit policy requires verbatim evidence: “Off by accident” and “on by accident” are both findings in a compliance review — decide explicitly and record it in your posture binder.