Getting Started

Core Concepts

Understanding how Audital stores, chains, and verifies AI governance events. This page explains the data model and the cryptographic properties that make the audit trail irrefutable.

Last updated: 2 March 2026

Audit Events

An audit event is the fundamental unit of data in Audital. Every meaningful action taken by or on an AI system — an inference, a training run, a configuration change, a deployment — is captured as an audit event. Events are append-only and immutable once written.

Event types

Event TypeWhen it occurs
MODEL_REGISTEREDA new AI model is onboarded to Audital
INFERENCEThe model produces an output for a given input
TRAINING_STARTEDA training or fine-tuning job begins
TRAINING_COMPLETEDA training job finishes (with metrics)
DEPLOYMENTA model version is promoted to an environment
CONFIG_CHANGEModel parameters, thresholds, or prompts are updated
DATA_ACCESSTraining data or evaluation data is read
HUMAN_REVIEWA human reviewer overrides or approves a decision
ALERTAudital detects an anomaly or policy breach
SHADOW_AI_DETECTEDUnregistered AI usage detected in the organisation

Full event schema

json
{
  "id": "evt_01HZABCDEF1234567890ABCD",
  "chainPosition": 4821,
  "blockHash": "sha256:7c4a8d09ca3762af61e59520943dc26494f8941b",
  "previousHash": "sha256:e3b0c44298fc1c149afb4c8996fb92427ae41e4649",
  "timestamp": "2026-03-02T10:14:33.821Z",
  "eventType": "INFERENCE",
  "severity": "INFO",
  "modelId": "mdl_abc123",
  "organisationId": "org_xyz789",
  "actor": {
    "type": "SERVICE",
    "id": "svc_scorer_api",
    "ipAddress": "10.0.1.45"
  },
  "payload": {
    "inputHash": "sha256:e3b0c44298fc1c149afb4c8996fb92427ae41e4649",
    "outputHash": "sha256:a87ff679a2f3e71d9181a67b7542122c",
    "latencyMs": 142,
    "confidence": 0.97,
    "decisionOutput": "APPROVED",
    "featureImportance": {
      "credit_score": 0.41,
      "debt_to_income": 0.29,
      "employment_months": 0.18
    }
  },
  "tags": ["credit-risk", "high-value"],
  "verified": true
}

The Hash Chain

Audital stores events in a Merkle-style hash chain. Each block's hash is a cryptographic commitment to both its own content and every preceding block. This means you cannot silently alter historical records.

Genesis

hash: 000000...

prev:

Block 1

hash: 7c4a8d...

prev: 000000...

Block 2

hash: a87ff6...

prev: 7c4a8d...

Block N

hash: f8b3c1...

prev: a87ff6...

Hash formula

H(n) = SHA-256( H(n‑1) ‖ canonical_json(payload) ‖ timestamp )

where ‖ denotes concatenation and canonical_json is deterministic JSON with sorted keys and no whitespace.

hash_chain.py·python
# Pseudo-code: how each block hash is computed
import hashlib
import json

def compute_block_hash(previous_hash: str, payload: dict, timestamp: str) -> str:
    """
    H(n) = SHA-256( H(n-1) ‖ canonical_json(payload) ‖ timestamp )
    """
    canonical = json.dumps({
        "previousHash": previous_hash,
        "payload": payload,
        "timestamp": timestamp,
    }, separators=(',', ':'), sort_keys=True)

    return "sha256:" + hashlib.sha256(canonical.encode('utf-8')).hexdigest()

# Example chain of 3 blocks
genesis_hash = "sha256:" + "0" * 64  # Genesis block previous hash

block_1_hash = compute_block_hash(
    previous_hash=genesis_hash,
    payload={"eventType": "MODEL_REGISTERED", "modelId": "mdl_abc123"},
    timestamp="2026-03-01T09:00:00.000Z",
)
# -> sha256:7c4a8d09ca3762af61e59520943dc26494f8941b...

block_2_hash = compute_block_hash(
    previous_hash=block_1_hash,
    payload={"eventType": "INFERENCE", "modelId": "mdl_abc123", "latencyMs": 142},
    timestamp="2026-03-01T09:14:33.821Z",
)
# -> sha256:a87ff679a2f3e71d9181a67b7542122c...

Why this is tamper-evident

If any event in the chain is modified — even a single character — its block hash changes. But the next block still stores the original hash as its previousHash. This mismatch propagates forward through every subsequent block, making the breach immediately detectable.

verify_chain.py·python
# How Audital detects tampering
# If an attacker modifies block N, block N's hash changes.
# But block N+1's previousHash still refers to the ORIGINAL hash of N.
# This mismatch propagates forward — any re-computation of the chain fails.

def verify_chain(blocks: list) -> bool:
    for i in range(1, len(blocks)):
        expected_prev = blocks[i - 1]["blockHash"]
        actual_prev   = blocks[i]["previousHash"]
        if expected_prev != actual_prev:
            print(f"INTEGRITY FAILURE at block {blocks[i]['chainPosition']}")
            print(f"  Expected previousHash: {expected_prev}")
            print(f"  Stored  previousHash:  {actual_prev}")
            return False
    return True

Evidence Packages

An evidence package is a compiled, auditor-ready bundle of audit events, chain proof, model metadata, and framework-specific documentation. Packages are generated on demand and are signed with Audital's private key so regulators can verify authenticity.

FCA SS1/23

  • Model purpose & risk classification
  • Governance controls audit trail
  • Human oversight evidence
  • Explainability artefacts

EU AI Act Annex IV

  • Technical documentation
  • Risk management system records
  • Training data governance
  • Post-market monitoring logs

Generating a package

bash
curl -X POST https://api.audital.ai/v1/evidence/generate \
  -H "Authorization: Bearer ak_live_xxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "modelId": "mdl_abc123",
    "framework": "FCA_SS1_23",
    "dateRange": {
      "from": "2026-01-01T00:00:00Z",
      "to": "2026-03-01T23:59:59Z"
    },
    "includeChainProof": true
  }'

The response includes a downloadUrl that expires after 24 hours, plus apackageSignature you can use to verify the bundle's authenticity. See the Evidence API reference for the full schema.

Glossary

Block
A single audit event plus its chain metadata (hash, previousHash, chainPosition).
Chain Position
The monotonically increasing integer index of a block within an organisation's chain.
Genesis Block
The first block in the chain. Its previousHash is a string of 64 zeros.
Hash Collision
Two different inputs producing the same SHA-256 hash — computationally infeasible with modern hardware.
Evidence Package
A compiled, signed bundle of audit events and documentation aligned to a specific regulatory framework.
Shadow AI
AI systems or models in use within an organisation that have not been registered with Audital.
Chain Integrity
The property that every block's previousHash matches the actual hash of its predecessor.