app.ai_requests
TableRow level security on
One row per Aurora AI model call (Section 4.7): who asked, for which feature, with which configured model, about which record, and the prompt and output with personal data redacted. Written only by app.ai_begin_request and app.ai_complete_request. Kept under the audit retention rules; customer data is never used for training.
Primary key: id
| Column | Type | Nullable | Description |
|---|---|---|---|
| id | uuid | No | Primary key, UUID v7. |
| org_id | uuid | No | Owning org. A row never moves to another org.References app.organizations.id |
| person_id | uuid | No | Person who asked, set from the session. The model acted with their permissions only.References app.people.id |
| feature | app.ai_feature | No | Feature that made the call. |
| model | text | No | Model identifier read from configuration at call time, for example claude-sonnet-5-5. |
| subject_table | text | Yes | Table of the record the request was about, or null. |
| subject_id | uuid | Yes | Record the request was about, or null. |
| outcome | app.ai_request_outcome | No | Pending, Answered, No Answer or Failed. |
| prompt_redacted | text | Yes | Prompt as sent, with personal data replaced by labels. Restricted fields were never in it. |
| output_redacted | text | Yes | Model output, with personal data replaced by labels. |
| failure_code | text | Yes | Why a Failed request failed, for example model_timeout. |
| completed_at | timestamp with time zone | Yes | When the request finished; null while Pending. |
| created_at | timestamp with time zone | No | When the row was inserted. Set by the database. |
| created_by | uuid | Yes | Person who inserted the row, or null for a platform process. Set by the database.References app.people.id |
| updated_at | timestamp with time zone | No | When the row last changed. Set by the database. |
| updated_by | uuid | Yes | Person who last changed the row, or null for a platform process. Set by the database.References app.people.id |
| deleted_at | timestamp with time zone | Yes | Soft delete time. A row with deleted_at set is ignored by every access helper. |