What should an audit record for an AI action contain? A field-by-field list

Audit standards were written for people clicking buttons. When an AI agent acts, the record needs more: which agent, on whose behalf, what the rules decided, what it claimed and what actually changed.

The short answer

An audit record for an AI agent’s action should contain the four basics every health audit record needs, who, whose record, what and when, plus seven more: the agent’s identity and version, the person or service it acted for, the rule decision before the action, who approved it if anyone did, what the agent said it did, what the system of record shows afterwards, and the resource versions before and after. Add a signature or hash chain so changes to the record can be detected. Without the claim-versus-observed pair, a record tells you what the agent reported, not what happened.

Each action ends in a signed record: what ran, who approved it, what the check found. Records are chained, each one carrying the fingerprint of the one before, and they can be checked offline. Made-up record.

The baseline standards already set

ISO 27789:2021, the audit trail standard for electronic health records, says each audit record should at minimum identify the user, the subject of care, the function performed and the date and time.1 India’s EHR Standards from NRCeS list ISO 27789 as the advisory standard, ask that all actions on health information be recorded, “including viewing”3, and require date, time, record and user identification, with alterations to records and audit logs detected.3

In the US, HIPAA’s Security Rule requires audit controls: mechanisms that record and examine activity in systems holding ePHI.6 IHE’s Basic Audit Log Patterns (BALP) 1.1.4 profiles FHIR AuditEvent for create, read, update, delete and query, each with a patient-specific variant.2

None of these were written with AI agents in mind. They’re still the floor.

What changes when the actor is an AI agent

Four things break the “user did X” model:

  1. The actor is software acting for someone. “User” now has two parts: the agent and the person or service it acted on behalf of.
  2. Rules decide before the action. A policy may allow, hold or refuse the call. That decision is part of what happened.
  3. Approval is a separate event. When a person approves a held write, that’s a second actor with a different role.
  4. The agent’s report can be wrong. An agent says “updated the record”. The server may have stored something else, or nothing. The record needs both the claim and an independent observation.

The field list

# Field Example Why
1 Time 2026-10-27T10:42:07+05:30 ISO 27789 basic1
2 Subject of care Patient/p-12 ISO 27789 basic
3 Function update Observation ISO 27789 basic
4 Accountable user dr-rao (on whose behalf) ISO 27789 basic, made explicit
5 Agent identity scribe-agent, model and version Which software acted
6 Tool call Exact request sent Reproduce what was asked
7 Rule decision held: rule high-risk-order v3 Why it ran, waited or stopped
8 Approver nurse-iyer, 10:44, two-factor Who took responsibility
9 Agent’s claim “Updated value to 7.2” What it reported
10 Observed result Read-back: value 7.2, version 5 What actually happened
11 Versions Before 4, after 5 Lets anyone vread both
12 Outcome match, mismatch, refused One-word summary
13 Integrity Signature, previous record hash Detect later changes

Fields 1 to 4 meet the baseline. Fields 5 to 8 describe the decision chain. Fields 9 to 12 separate what the agent said from what happened. Field 13 lets someone check the record wasn’t altered.

A worked example

An agent proposes correcting a lab value. The rule holds it; a nurse approves; the agent writes; a read-back shows the server stored the value with a unit dropped.

Code Data in JSON, the format software uses to pass records and settings.

{
  "time": "2026-10-27T10:44:31+05:30",
  "subject": "Patient/p-12",
  "function": "update Observation/obs-17",
  "on_behalf_of": "Practitioner/dr-rao",
  "agent": { "id": "lab-agent", "model": "model-x 2026-09" },
  "decision": { "result": "held", "rule": "lab-correction v3" },
  "approver": { "who": "Practitioner/nurse-iyer", "at": "10:44:02" },
  "claimed": "value 7.2 mmol/L",
  "observed": "value 7.2, unit missing, version 5",
  "versions": { "before": "4", "after": "5" },
  "outcome": "mismatch",
  "prev_hash": "…", "signature": "…"
}

The agent’s own log would say “success”. This record says what a reviewer needs: approved, written, and stored differently from what was approved.

Where the fields live in FHIR

FHIR R4 splits the job. AuditEvent is a security log entry with type, recorded time, agents (each flagged as requestor or not) and the reporting source; servers that support it generally don’t accept updates or deletes to it.4 Provenance tracks the activity that created, revised or signed a specific version of a resource, with agents that each have a type, role, who and onBehalfOf, and an optional signature.5

So fields 1 to 6 sit naturally in AuditEvent, the decision chain and versions in Provenance, and the claim-versus-observed pair needs an extension or an envelope, because neither resource has a slot for “what the agent said happened”. Our open draft, AAP-H, is FHIR R4 Provenance and AuditEvent profiles plus a JSON envelope that holds the agent, the rule decision, the approver, the claim and what the system of record shows afterwards.9 More on the split in AuditEvent vs Provenance.

Retention and tamper evidence

How long to keep records depends on the rule that applies. HIPAA requires its required documentation to be kept six years from creation or from when it was last in effect, whichever is later.7 India’s DPDP Rules ask data fiduciaries to keep the logs they list for one year.8 Hospital and state rules often ask for longer; set retention per jurisdiction with your legal team.

For tamper evidence, a database row anyone with admin rights can edit isn’t enough. Sign each record and chain it to the previous one. In AAP-H each record is signed and chained so a hospital, payer or auditor can check it offline with the issuer’s public keys.9 A valid record shows the issuer wrote those values and nothing covered by the signature changed since; it doesn’t show the AI was right, or that the issuer saw every action.9

Questions people ask

Is a FHIR AuditEvent enough for AI actions?

It covers the security-log basics. It has no place for the rule decision or for the difference between what the agent claimed and what was stored, so add Provenance and an extension or envelope.

Should we log reads by AI agents?

India’s EHR Standards ask for all actions including viewing to be recorded3, and BALP profiles reads and queries.2 Agents read far more than people, so plan storage for it.

Who should hold the signing keys?

The organisation running the system, not the AI vendor alone, and with the public keys shared with auditors.

The spec page has full examples, and the FHIR write integrity study shows why the observed-result field matters. Hospitals can start from our healthcare overview. To try approvals and read-backs on a real database in your browser, open the playground; to grade what an agent can reach on your own machine, run npx deedglass scan (the grade, explained).

Written with AI assistance and checked against our claims register.

The takeaway

An AI action record needs the four ISO 27789 basics plus agent, on-behalf-of, rule decision, approver, claimed versus observed result, versions and a signature.

Read nextEHR audit logs: what they record, what research learned, and what AI agents change Try it: install in 7 s

Related on this site

More posts

Sources

  1. 1ISO 27789:2021 Health informatics: Audit trails for electronic health records · committee.iso.org · checked 27 October 2026
  2. 2IHE ITI Basic Audit Log Patterns (BALP) 1.1.4 · profiles.ihe.net · checked 27 October 2026
  3. 3NRCeS: EHR Standards for India · nrces.in · checked 27 October 2026
  4. 4HL7 FHIR R4: AuditEvent · hl7.org · checked 27 October 2026
  5. 5HL7 FHIR R4: Provenance · hl7.org · checked 27 October 2026
  6. 645 CFR 164.312: HIPAA technical safeguards · ecfr.gov · checked 27 October 2026
  7. 745 CFR 164.316: HIPAA documentation · ecfr.gov · checked 27 October 2026
  8. 8MeitY: Digital Personal Data Protection Rules, 2025 (G.S.R. 846(E)) · meity.gov.in · checked 27 October 2026
  9. 9Agent Action Provenance for Health (AAP-H) v0.1 draft · deedglass.com · checked 27 October 2026

Published 27 October 2026, sources last checked 27 October 2026. If something here is out of date, write to hello@deedglass.com.

Try it on your own setup

npx deedglass scan

Grades only your own setup. Nothing is uploaded.

Pricing