insonl
← journal

Decide What an AI Workflow Audit Log Must Record

date
27 November 2026
by
Insonl
read
8 min read

In a hypothetical supplier-onboarding workflow, a model recommends accepting a certificate. A reviewer puts the application on hold because the certificate names the supplier’s parent company. A prompt update goes live that afternoon. When compliance checks the case later, it needs to know which document revision the model saw, which prompt and rules applied, who put the application on hold, and whether the hold took effect.

An AI workflow audit log needs records for the machine’s proposal, the business rule applied to it, any human disposition, the action that took effect, and changes to the configuration that governed the run. Give each event an actor, a timestamp, a target, and a result. Links between events should let an investigator follow the evidence from the final outcome back to the version of the proposal the reviewer saw.

Require a common set of fields

OWASP recommends recording event time, source, actor, and activity. Its guidance distinguishes when an event occurred from when it was logged, covers both human and machine actors, and recommends carrying an interaction identifier across related events. It also lists the action, affected object, result, and reason as fields to consider. The schema below applies that general guidance to an AI workflow. OWASP Logging Cheat Sheet, Event attributes

Field What to record
Event identity A unique event ID, controlled event type, and schema version. Use the event ID when another record needs to point to this exact decision.
Time When the action happened and when the event was recorded, in UTC. Use the authoritative system’s timestamp for an applied change.
Actor The authenticated account or service identity and its type. Capture a role or authorization reference when permissions determine whether the action is valid.
Source and scope The emitting service and deployment, the environment, and the tenant or operating unit where relevant.
Target The workflow and case ID for a decision. For a configuration change, identify the prompt, model binding, or policy and the deployment scope affected.
Action and outcome The action attempted, whether it took effect, and a controlled reason code for outcomes such as blocked, deferred, or failed.
Related records The event or revision the action applies to. Link an override to its proposal and a committed state change to the decision that authorized it.

Take the actor from authenticated application context. OWASP points to application code as the primary event source because it has access to identity, permissions, and business context. In a deployment, the person who requested a change, the person who approved it where required, and the service that applied it may all be different. Record each against the event it owns. If a scheduled process initiated the change, give that process its own identity. OWASP Logging Cheat Sheet, Event data sources

Preserve the proposal, review, and applied action

A case may have several proposals and several reviews. Store the revision IDs on each review record so an investigator can tell which of them the reviewer acted on. Define the events and their required fields before approving the workflow for live use.

Event Fields specific to the event
Model attempt finished Attempt ID, input record and revision references, material lookup results or references, prompt template version, requested model identifier, resolved model revision if reported, execution settings that affect the result, and response status.
Proposal recorded Attempt ID, proposal revision, output validation status, and validated values used by the workflow. For unstructured output, use an authorized reference to the exact revision if the review depends on its wording.
Rule applied Proposal revision, rule or policy version, conditions that drove the disposition, and the action selected, such as routing to review.
Review submitted Reviewer ID, proposal and input revisions shown, review action, authorization context where relevant, and reason. For an override, include the prior and replacement values or references to both revisions.
Business action recorded Authorizing decision ID, executing identity, affected record, prior and resulting state or revision, and confirmed outcome. If the destination has yet to confirm the outcome, record it as pending or unknown.

For the supplier example, record “certificate acceptable” as the original proposal and “hold for entity check” as the reviewer’s decision. The override can carry a reason code for an entity mismatch and a protected reference to the reviewer’s evidence. When the application moves to hold, link that transition to the override. If the certificate changes while the review form is open, record a submission against the old revision as stale and require a decision on the current revision.

Use revision-specific input references. A link to today’s supplier record can open a different certificate from the one assessed. If the exact input revision is unavailable, record that explicitly. For an input field, prefer the smallest authorized reference or value that answers the audit question. Keep credentials out of log entries and remove or mask sensitive data where appropriate. The related retention article covers what belongs in routine logs versus restricted evidence, and how to set expiry. OWASP Logging Cheat Sheet, Data to exclude · Set a Data Retention Policy for AI Workflow Logs

Make production changes attributable

OWASP includes configuration changes among the events to log. For an AI workflow, apply that to prompt edits, model changes, fallback settings, thresholds, routing rules, and changes to required review. Define an event for the request and one for the application of the change. Add an approval event wherever the workflow requires sign-off. OWASP Logging Cheat Sheet, Which events to log

For each applied change, capture the component, its previous and new immutable versions, the scope where the change took effect, and the effective time. Include the changed fields and their before and after values when safe to log. A prompt change can point to two protected template revisions. A switch from mandatory to optional review can record the old and new setting directly. Add the request reference and reason, the applying service identity, and the approval reference where applicable. Record a rollback with its own event and link it to the change it reverses. If a deploy succeeds for one operating unit and fails for another, capture each outcome with the corresponding scope.

Record the effective versions on the model and rule events themselves. A run may start before a rollout and call the model afterward. A retry may use a fallback model. Record the requested identifier and the revision returned by the provider when available. If the provider exposes only an alias, store the alias and mark the revision unknown. For a manual change made outside the deployment interface, collect evidence from the system that accepted the change. If it reports the new value without identifying the person responsible, flag the attribution gap.

Ask someone outside the build team to reconstruct a decision

Give a compliance reviewer an illustrative case ID and a known sequence in which a prompt changes, a review ends in an override, and the application confirms the new state. Ask them to identify the input and output revisions, the effective configuration, who requested and applied the change, the reviewing account, and the final outcome from the records. Then exercise a stale review and a failed change. Check that both appear with their outcomes and that the affected state stays as it was.

Have engineering check that a correction creates a linked event and preserves the original. Verify that the reviewer can read the necessary fields, that workflow actors lack permission to rewrite the audit history, and that event access is itself logged. OWASP recommends testing logging and access controls, and protecting stored records with tamper detection and restricted read access. OWASP Logging Cheat Sheet, Verification · Protection

If an investigation turns to why a queue handoff stalled or an ERP write timed out, the order-tracing article covers the diagnostic path. Trace One AI Processed Order Across the Queue and ERP

Sources

Audit one workflow

Bring one decision your team struggled to explain and the screen where a reviewer can override it. Use the audit to identify which events and fields would answer who changed what. The audit is free. Insonl charges for any follow-on work you commission. Request a free AI workflow audit