agentskit.js
Observability

Signed audit log

Hash-chained, HMAC-signed log that makes it cryptographically detectable if any record is altered or deleted.

Compliance and incident response both depend on a log you can trust. createSignedAuditLog writes each event with a sequence number, timestamp, HMAC, and a hash of the previous record β€” so tampering with any entry breaks the chain and verify() throws.

import { createSignedAuditLog } from '@agentskit/observability'

const audit = createSignedAuditLog({
  path: '.agentskit/audit.log',
  key: process.env.AK_AUDIT_KEY!,
})

const runtime = createRuntime({ adapter, observers: [audit.observer] })

#Verify

const ok = await audit.verify() // throws on tamper

Each record contains { seq, at, kind, payload, prevHash, hmac }.

Explore nearby

✎ Edit this page on GitHubΒ·Found a problem? Open an issue β†’Β·How to contribute β†’

On this page