Immutable Audit Logs
Because autonomous agents operate without constant human supervision, post-incident forensics are critical. AgentVault maintains cryptographically chained audit trails that make log tampering mathematically detectable.Hash Chain Design
Every audit event references the hash of the previous event, forming a per-tenant chain:Hash Computation
Each event hash covers: previous hash, timestamp, trace context, event body, and participants. It excludes:observed_timestamp, delivery metadata, and the hash_chain block itself.
Chain Properties
| Property | Implementation |
|---|---|
| Algorithm | SHA-256 (for hash chain linking) + BLAKE2b (for content hashing) |
| Partitioning | Per-tenant — each tenant has its own independent chain |
| Ordering | Strictly sequential by sequence_number within a tenant |
| Genesis | sha256(b"agentvault_genesis_v1") — deterministic and auditable |
Traceparent Chaining
Agent actions are linked via W3C TraceContexttraceparent headers:
- trace_id — deterministically derived from conversation/room ID
- span_id — unique per message exchange
- trace_flags — always
01(sampled) for audit events
Event Types
| Event | Severity | Description |
|---|---|---|
message_delivered | INFO | Message successfully delivered to recipient |
message_read | INFO | Recipient acknowledged message |
agent_connected | INFO | Agent WebSocket connected |
agent_disconnected | INFO | Agent WebSocket disconnected |
decision_made | INFO | Owner resolved a decision request |
policy_evaluated | INFO | Policy pipeline evaluated a request |
action_executed | INFO | Agent executed a confirmed action |
error | ERROR | An error occurred during processing |
security_violation | FATAL | Security policy violated |
Chain Verification
API Verification
Programmatic Verification
Querying Audit Trails
By Conversation/Room
By Time Range
severity_min=17 filter returns only ERROR and above.
By Entity
Storage & Retention
- Primary storage: PostgreSQL with JSONB columns for flexibility and queryability
- Indexes: Optimized for chain traversal, trace lookup, time-range queries, and severity filtering
- GIN indexes on
bodyandattributesfor full-text JSONB search - Retention: Configurable per tenant (default: 90 days, enterprise: unlimited)
- No external stack required: The audit system runs entirely on PostgreSQL — no ClickHouse, Elasticsearch, or external observability infrastructure needed
OTel Export
Audit events are natively OTel-compatible. When OTel export is enabled, events are dual-written:- PostgreSQL — primary storage with hash chain integrity
- OTLP endpoint — exported to any OTel-compatible backend (Splunk, Datadog, Grafana)