Docs/Authority/Audit Logging

Audit Logging & Provenance

The predicate-authorityd sidecar generates a cryptographic proof event for every authorization mandate it issues or denies. How you handle these events depends on your environment.

πŸ”

Looking for Fleet-Wide Visibility?

If you need centralized logging across all your agents, MCPs, CLIs, and skills in one place, see the Centralized Fleet Logging section below or explore the full Predicate Vault documentation for fleet management, SIEM integrations, and compliance features.


Local Sidecar Logging (Default)

By default, the sidecar writes verification events and mandate receipts to a local queue file. This mode is designed for local development, single-agent testing, and CI/CD pipeline debugging.

predicate-authorityd \
  --local-identity-enabled \
  --local-identity-registry-file ./.predicate-authorityd/local-identities.json

Local queue endpoints:

  • GET /ledger/flush-queue - List pending audit events
  • GET /ledger/dead-letter - List quarantined events
  • POST /ledger/flush-now - Trigger immediate flush
  • POST /ledger/requeue - Retry a quarantined event

Ephemeral by Design

Local sidecar logs are deliberately ephemeral:

  • 24-hour TTL: Queue items auto-expire after 24 hours by default
  • Payload redaction: Sensitive fields (principal_id, action, resource) are redacted in API responses
  • No aggregation API: Each sidecar is isolated; no cross-node query capability
# Configure TTL (default: 86400 seconds / 24 hours)
--queue-item-ttl-seconds 86400

This design reflects the operational reality of distributed systems, not an artificial limitation.


Constraints in Distributed Environments

Relying on isolated sidecar logs in a production, multi-agent fleet introduces strict operational constraints:

ConstraintImpact
Ephemeral data lossIf a container crashes or scales down, local logs are destroyed. You lose the cryptographic proof of what the agent did.
Lack of immutabilityLocal log files are mutable. A compromised host can alter or delete logs to erase an agent's tracks.
Fleet blindnessNo native way to query a single intent_hash or principal_id across 50+ distributed sidecars.
Compliance gapsSOC2, ISO 27001, and similar frameworks require Write-Once-Read-Many (WORM) retention and strict access controls.

Building a compliant audit pipeline from ephemeral sidecar logs requires:

  • Log forwarding infrastructure (FluentBit, Logstash, Vector)
  • Centralized storage with WORM guarantees (S3 Object Lock, Azure Immutable Blob)
  • Custom indexing for principal_id, intent_hash, mandate_id queries
  • Merkle tree implementation for tamper-evident integrity proofs
  • Retention policy enforcement and legal hold workflows

Production Governance: Predicate Audit Vault

For production workloads, connect sidecars to the Predicate Control Plane. Instead of writing to local disk, the sidecar streams signed proof events directly into the Audit Vault.

predicate-authorityd \
  --mode cloud_connected \
  --control-plane-enabled \
  --control-plane-tenant-id "your-tenant" \
  --control-plane-project-id "your-project"

Capabilities

CapabilityDescription
Immutable retentionAppend-only event storage with configurable retention periods
Global searchQuery across your entire fleet by principal_id, intent_hash, or mandate_id
Integrity proofsMerkle tree inclusion proofs for any audit event
SIEM streamingWebhook delivery to Datadog, Splunk, or any HTTP endpoint
Legal holdPreserve audit exports beyond normal retention for investigations

Integrity verification

Verify any audit event is included in the tenant's tamper-evident log:

# Get current Merkle root
curl -s "https://api.predicatesystems.dev/v1/audit/integrity/root?tenant_id=your-tenant" \
  -H "Authorization: Bearer $TOKEN" | jq

# Get inclusion proof for specific event
curl -s "https://api.predicatesystems.dev/v1/audit/integrity/proof/<event_id>?tenant_id=your-tenant" \
  -H "Authorization: Bearer $TOKEN" | jq

Audit exports

Export audit events for compliance reporting or external analysis:

# Create export job
curl -s -X POST "https://api.predicatesystems.dev/v1/audit/exports" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "tenant_id": "your-tenant",
    "start_time": "2024-01-01T00:00:00Z",
    "end_time": "2024-01-31T23:59:59Z",
    "format": "jsonl"
  }' | jq

# Download completed export
curl -s "https://api.predicatesystems.dev/v1/audit/exports/<export_id>/download" \
  -H "Authorization: Bearer $TOKEN" -o audit-export.jsonl.gz

Centralized Fleet Logging

When running multiple AI agents across different environmentsβ€”MCP servers, CLI tools, custom skills, browser automationβ€”you need a single place to see what every agent did.

The question: "How do I get audit and governance for all my agent tools in one centralized view?"

The answer: Connect your sidecars to the Predicate Control Plane. Every authorization decision from every sidecar streams to a unified audit log.

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Agent + MCP    β”‚   β”‚  Agent + CLI    β”‚   β”‚ Agent + Skills  β”‚
β”‚   (Sidecar)     β”‚   β”‚   (Sidecar)     β”‚   β”‚   (Sidecar)     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚                     β”‚                     β”‚
         β”‚  POST /v1/audit/events:batch              β”‚
         β”‚                     β”‚                     β”‚
         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                               β”‚
                               β–Ό
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚   Control Plane     β”‚
                    β”‚  ─────────────────  β”‚
                    β”‚  ProofEvents Table  β”‚
                    β”‚  Merkle Verifier    β”‚
                    β”‚  Retention Manager  β”‚
                    β”‚  Kafka/SSE Stream   β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                               β”‚
                               β–Ό
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚     Vault UI        β”‚
                    β”‚  ─────────────────  β”‚
                    β”‚  Fleet-wide view    β”‚
                    β”‚  Audit timeline     β”‚
                    β”‚  Integrity checks   β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

What You Get

CapabilityDescription
Fleet-wide aggregationAll sidecars report to a single control planeβ€”see every ALLOW/DENY across your entire infrastructure
Real-time streamingEvents stream via SSE or Kafka for live dashboards and alerting
Cross-agent queriesSearch by principal_id, action, resource, or time range across all agents
Tamper-proof auditMerkle tree integrity verification proves logs weren't modified
Compliance retentionHot (30 days), Warm (1 year), Cold WORM (7 years) retention tiers

Quick Setup

# Connect sidecar to control plane
predicate-authorityd \
  --mode cloud_connected \
  --control-plane-enabled \
  --control-plane-tenant-id "your-tenant" \
  --control-plane-project-id "your-project"

Once connected, open the Predicate Vault to see your fleet-wide audit timeline.

β†’

Full Fleet Management

For policy management, global kill-switches, SIEM integrations, and more, see the complete Predicate Vault documentation.


Choosing Your Audit Strategy

EnvironmentRecommended Approach
Local developmentLocal sidecar logging (default)
CI/CD pipelinesLocal sidecar logging with test assertions
Staging / Pre-prodControl-plane connected for integration testing
ProductionControl-plane connected with SIEM streaming
Regulated industriesControl-plane with legal hold and retention attestation