Skip to main content

IETF AAT field mapping

Ujex's audit ledger implements the field schema from IETF draft-sharif-agent-audit-trail-00 (Raza Sharif, CyberSecAI, 29 March 2026). This page documents the verbatim mapping so an AAT-compliant verifier can ingest a Ujex bundle without translation.

Field-by-field

AAT fieldTypeUjex sourceNotes
record_idstring (32 hex)audit.{seq}.aat.record_idServer-minted UUIDv4 (random 16 bytes hex).
agent_idstringaudit.{seq}.payload.agentIdEmpty/null when actor is human (admin)
agent_versionstringaudit.{seq}.aat.agent_versionCaller-supplied; defaults to "unspecified"
session_idstring | nullaudit.{seq}.aat.session_idCorrelates rows within a session
action_typeenumaudit.{seq}.aat.action_typetool_call | approval | memory_write | outbound_email | inbound_email | policy_decision | human_override | governor_block | other
outcomeenumaudit.{seq}.aat.outcomesuccess | denied | error | pending
trust_levelenumaudit.{seq}.aat.trust_levelhigh | medium | low | unknown
parent_record_idstring | nullaudit.{seq}.aat.parent_record_idChains causality across rows
prev_hashstring (64 hex)audit.{seq}.prevHashEmpty string for the genesis row
hashstring (64 hex)audit.{seq}.hashsha256(prevHash ‖ payloadHash ‖ timestamp ‖ seq)
payload_hashstring (64 hex)audit.{seq}.payloadHashsha256(canonical_json(payload))
timestampISO-8601derived from audit.{seq}.timestamp (unix ms)Serialized as ISO-8601 in the export
actionstringaudit.{seq}.payload.actionUjex-native action string (e.g. postbox.send)
actor_kindstringaudit.{seq}.payload.actorKindhuman / agent / system
actor_idstringaudit.{seq}.payload.actorIdFirebase uid OR agent:<agentId>
targetstring | nullaudit.{seq}.payload.targetOptional
metaobjectaudit.{seq}.payload.metaFree-form

Canonical-JSON serialization

Ujex uses the same canonical-JSON form as @ujexdev/audit-chain: keys sorted lexicographically at every level, no whitespace, Unicode kept verbatim. This matches RFC 8785 (JCS) for AAT compatibility.

Verifier

# Offline, language-agnostic
pip install ujex-audit-chain
python -m ujex_audit_chain verify records.jsonl

# Or, via Ujex CLI (extracted bundle dir, or records.jsonl)
ujex audit verify ./bundle/

Optional signatures

AAT § 5 permits per-record ECDSA P-256 signatures. Ujex doesn't sign each row inline — the chain itself is integrity-proving, and per-row signatures inflate storage. Instead, the bundle manifest (manifest.json) can be signed at export time with auditExportAATBundle({signManifest: true}). Signed manifests bind the export range, record count, bundle hash, chain head, latest audit anchor, issuer, and trust key id.