Immutable Evidence

AUDIT LOGGING

Append-only, hash-chained, cryptographically verified audit logs. Tamper-proof records of every agent action and governance decision. Forensic-ready.

SHA-256Hash Chain
<2msWrite Latency
7yrRetention

See it in action

custodex.vercel.app
AUDIT LOGGING — Custodex Dashboard

Every entry references the one before it.

SHA-256 hash chain where each audit entry contains the hash of the previous entry. Chain starts from a well-known genesis hash. Any modification breaks the chain and is detected immediately. Walk the chain from genesis to verify the entire history.

// Hash chain verification
function verifyChain(entries) {
  let prevHash = "genesis";

  for (const entry of entries) {
    if (entry.prevHash !== prevHash) {
      return { valid: false, brokenAt: entry._id };
    }

    const computed = sha256({
      agentId: entry.agentId,
      event: entry.event,
      details: entry.details,
      prevHash: entry.prevHash,
      timestamp: entry.timestamp
    });

    if (computed !== entry.hash) {
      return { valid: false, tamperedAt: entry._id };
    }

    prevHash = entry.hash;
  }

  return { valid: true, entriesChecked: entries.length };
}

Every significant event. Automatically.

All agent lifecycle events (created, suspended, revoked), policy decisions (allowed, denied, approved, rejected), certificate events (issued, rotated, revoked), and approval workflows (requested, escalated) are automatically logged with full context and metadata.

Full-text search across your entire audit trail.

Search across all fields: time range, agent ID, event type, user ID, and custom metadata. Regex support for advanced pattern matching. Export results in JSON, CSV, or PDF formats. Time-travel queries reconstruct agent state at any point in history.

Audit-ready reports. One click.

Generate compliance evidence packages for Singapore MGF, EU AI Act, SOC 2, and ISO 42001. Multiple formats: PDF for auditors, JSON for systems, Markdown for git. Timestamped and hash-verified. Meets regulatory requirements for 7-year retention.

const evidence = await generator.generatePackage({
  framework: "singapore-mgf",
  agentId: "agent_123",
  period: {
    start: Date.now() - 30 * 24 * 60 * 60 * 1000,
    end: Date.now()
  }
});

// Export as PDF for auditors
await evidence.exportPDF("compliance_jan2026.pdf");

// Export as JSON for systems
const json = evidence.toJSON();

What's included in
audit logging

01

Append-only, immutable log entries

02

SHA-256 hash chain with tamper detection

03

Automated nightly chain verification

04

Full-text forensic search with regex support

05

Evidence generation: PDF, JSON, Markdown, SIEM export

06

7-year retention with tiered cold storage archival