Documenting Agent Decisions for Accountability
How to design tamper-resistant decision records, OTel spans, and investigator UX for agentic AI — practical patterns for compliance.

Auditability for Agentic Workflows
Agentic AI introduces operational velocity — and regulatory risk. Security and compliance teams need tamper-resistant, structured records that answer: which agent made what decision, under which policy version, and who approved it. This article defines an implementable decision record schema, signing and tamper-resistance patterns, SIEM pipelines, and investigator UX — then shows how Aegis (the Aegis Gateway) implements these patterns in production environments. Many design choices below derive from the Aegis product spec and runtime architecture.
Why auditability is now a hard requirement
Organizations moving agentic systems to production list governance, traceability and accountability as top barriers to adoption. Industry analysis and practitioner surveys confirm that governance is a primary enterprise requirement for agent deployments. Major analyst reports call out governance, risk and operational controls as prerequisites for scaling agentic AI beyond pilots. (McKinsey & Company)
Key operational constraints driving requirements:
- Regulators and SOC teams require immutable audit trails for incidents.
- For highly regulated verticals (fintech, healthcare, energy) evidence must show policy application and approval history.
- Shadow-mode policies must be recorded to prove observations during audits and for step-change rollouts.

Designing a decision record schema
A small, standard schema is the foundation. Make it consistent, SIEM-ready, and compact.
Recommended canonical fields (structured JSON record):
- timestamp (ISO 8601, canonical timezone)
- decision_id (UUID)
- agent_id (unique short ID)
- parent_agent_id (optional, for chained calls)
- tool (string)
- endpoint (string)
- params_hash (SHA256 of redacted payload)
- policy_version (semantic version or VCS commit-id)
- decision (allow | deny | would_block | sanitize | approval_needed)
- reason_code (enumerated)
- approval_id (if applicable)
- attestation_signature (see signing)
- span_id / trace_id (OpenTelemetry linkage)
- redacted_payload_snapshot (optional, only when policy permits)
Table: Example decision record fields and purpose
Field | Purpose |
timestamp | Canonical time for ordering and legal evidence |
decision_id | Unique reference to link logs, traces and approvals |
agent_id / parent_agent_id | Attribute action to originator and chain |
params_hash | Compact fingerprint to avoid storing secrets |
policy_version | Which rule set made the call decision |
decision, reason_code | Machine-readable outcome and rationale |
attestation_signature | Cryptographic proof-of-origin for the record |
span_id / trace_id | Correlate to traces in OTel backends |
This schema is intentionally minimal to keep logs SIEM-friendly while preserving auditability. Implementations should include provable indexing fields (agent_id, policy_version, decision) for investigator pivoting. Many of these fields are implemented in the Aegis Gateway telemetry model.
👉🏻 Improve visibility into how your AI makes decisions
Emitting OpenTelemetry spans and structured logs
Best practice: emit both OpenTelemetry spans for observability and structured JSON logs for SIEM ingestion. Spans provide timing, parent-child relationships, and distributed tracing; logs provide immutable decision records and are easier to export for compliance.
Operational pattern:
- Each evaluation produces an OTel span with attributes: agent_id, tool, decision, policy_version, params_hash, approval_id.
- Simultaneously emit a SIEM-ready JSON log with the canonical decision record fields.
- Ensure trace_id and decision_id are cross-referenced in both places for pivoting.

OpenTelemetry is increasingly the industry standard for traces and metrics; project references and community activity in 2024–25 confirm adoption momentum. (OpenTelemetry)
👉🏻 Design AI systems grounded in fairness and accountability
Signing and tamper-resistance patterns
Tamper evidence is required for many auditors. Options range from simple signed attestations to chained hashes for high assurance.
Two practical patterns:
- Signed attestation token (recommended)
- The enforcement service produces a compact attestation: base64(JWT{decision_id, timestamp, policy_version, signer_id}) signed using Ed25519 or an HSM-backed key.
- Attach attestation_signature to the decision record. The verifier can validate the signature and timestamp without needing full logs.
- Chain-hash ledger (higher assurance)
- Log entries include previous_entry_hash producing an append-only chain. Store periodic anchors (e.g., S3 object with versioning or a ledger API).
- Useful when regulations require non-repudiation over long retention windows.
Operational note: keep private keys in a hardware-backed KMS (cloud KMS or HSM) and rotate them periodically. Aegis supports optional audit signing and ledgering of policy versions and decisions.
SIEM pipelines and export formats
Design logs so they map directly into SIEM dashboards and compliance exports.
Implementation checklist:
- JSON lines (one object per line) with canonical fields above.
- Field names should match SIEM parsers or use a transformation layer (Logstash/Fluent Bit).
- Include an export module that can produce regulator-ready CSV/JSON with selected fields and signatures.
Table: Suggested SIEM fields mapping
Decision Field | SIEM Column |
timestamp | @timestamp |
agent_id | agent.id |
tool | resource.name |
decision | security.action |
policy_version | policy.version |
attestation_signature | audit.signature |
Aegis provides adapters for common collectors (Splunk, ELK, Datadog) and ships SIEM-ready JSON logs directly from the gateway.
👉🏻 Design AI systems grounded in fairness and accountability
Investigator UX and operational tooling
Auditors and SOC analysts need fast pivoting and evidence packages.
Core investigator features:
- Filter by agent_id, policy_version, decision, time range.
- “Who-approved-what” view that links approvals to decisions.
- Replay mode: re-run a recorded call trace in an isolated test environment with candidate policy versions to demonstrate expected behavior.
- Exportable evidence package: zipped JSON logs, signed attestations, policy diffs and a human-readable timeline.
Placeholder image: Flowchart illustrating the 4-step process of Aegis's agentic response to a runtime threat (decision evaluation → attestation → enforcement → SIEM export).
Practical patterns - shadow mode, policy versioning, redaction
- Shadow mode: record would_block events as decisions "would_block" without enforcement. Use these records to compute false-positive risk and tune regex/conditions before flipping to enforce.
- Policy versioning: every policy push must create an immutable version_id and changelog entry. Decision records reference version_id so auditors can prove which rules applied at the time.
- Redaction: include only hashed or redacted payloads in logs by default. Where policy allows, attach redacted payload snapshot for high-fidelity evidence.
These are core controls supported by the Aegis design, including hot-reloadable bundles, shadow mode, and retention controls.
👉🏻 Increase adoption through trustworthy AI experiences

EHR exfil attempt — evidence package
Clinical-agent requests bulk patient export; policy denies because destination != internal-ehr.myorg; decision record references policy v1.3.2, reason_code=egress_violation; attestation_signature included; SOC exports signed evidence for regulators.
This pattern demonstrates how trace + signed attestation + policy version produce a concise, verifiable narrative for auditors. See Aegis EHR scenario and problem statements for operational details.
👉🏻 Track every action with a complete audit trail
How Aegis implements these patterns
Aegis Gateway is a runtime policy and telemetry fabric that enforces agent boundaries, emits OTel spans, and produces signed decision records. Key capabilities:
- Identity & short-lived tokens per agent to bind calls to identities.
- Data plane authorizer (ext_authz) that evaluates policies (compiled to OPA) and returns structured decisions with optional attestation signatures.
- Telemetry engine that emits OpenTelemetry spans and SIEM-ready JSON logs for every decision.
- Shadow mode, approval workflows (Slack/Teams), and replay tooling for investigators.
These components map directly to the schema, signing, and pipeline patterns described above and are detailed in the Aegis technical brief.
👉🏻 Prepare your systems for regulatory audits with confidence
Operational advantages:
- Centralized enforcement prevents agent privilege escalation via tool chaining.
- Consistent, signed audit trails reduce SOC investigation time.
- Per-agent budgets and rate limits address FinOps concerns while preserving traceability.
ae

Implementation checklist for security teams
- Define canonical decision schema and map to SIEM columns.
- Instrument the enforcement layer to emit OTel spans and JSON logs with decision_id and trace_id.
- Implement signing (attestations) and store keys in KMS/HSM.
- Enable shadow mode and collect would_block data for a run period.
- Build investigator UI with pivotable filters and replay capability.
- Define retention and export policies for regulator requests.
👉🏻 Monitor performance and behavior with key observability metrics
Two quick comparison tables
Tamper-resistance tradeoffs
Method | Assurance | Operational cost |
Signed JWT attestation | Medium–High | Low (key management) |
Chain-hash ledger | High | Medium–High (storage + anchors) |
SIEM + RBAC logs only | Low | Low |
Typical telemetry outputs
Output | Contains | Consumer |
OpenTelemetry span | trace_id, span_id, agent_id, decision | Tracing backends (Jaeger, Tempo) |
SIEM JSON log | full decision record + signature | SOC, auditors |
CSV export | selected fields (for regulators) | Compliance teams |
Frequently Asked Questions
Q: What minimum fields should every decision log include?
A: timestamp, decision_id, agent_id, tool, params_hash, policy_version, decision, reason_code, trace_id, attestation_signature.
Q: Should I store full payloads in logs?
A: Preserve hashed or redacted snapshots by default. Only include payload snapshots when legally acceptable and necessary for investigations.
Q: How long should decision logs be retained?
A: Follow regulatory and internal policies — commonly 1–7 years for finance/healthcare. Also store policy version history for the same retention window.
Q: How do you scale policy evaluation without latency spikes?
A: Use prepared OPA queries, in-memory caches, and optionally WASM compilation for hot paths. Aim for P99 < 20ms for decision calls. Aegis targets these performance budgets.
Q: What external standards should I follow?
A: Use OpenTelemetry for traces (opentelemetry.io) and consider Open Policy Agent (OPA) for policy evaluation. (OpenTelemetry)
Q: How do I produce an audit package for regulators?
A: Export zipped JSON of decision records, signed attestations, policy diffs, and a replay transcript demonstrating the call flow with the applied policy_version.
👉🏻 Establish governance structures to oversee AI usage
Secure AI Infrastructure with Confidence with Aegis
Auditability for agentic workflows is achievable with a small set of engineering controls: a canonical decision schema, synchronous OTel spans + SIEM logs, cryptographic attestations, policy versioning and investigator tooling. Products like Aegis implement these controls as a runtime gateway and telemetry fabric so enterprises can enforce least-privilege agent behavior while delivering regulator-ready evidence.
Implementation checklist for security teams
- Define canonical decision schema and map to SIEM columns.
- Instrument the enforcement layer to emit OTel spans and JSON logs with decision_id and trace_id.
- Implement signing (attestations) and store keys in KMS/HSM.
- Enable shadow mode and collect would_block data for a run period.
- Build investigator UI with pivotable filters and replay capability.
- Define retention and export policies for regulator requests.
👉🏻 Strengthen internal capabilities for secure AI adoption
Two quick comparison tables
Tamper-resistance tradeoffs
Method | Assurance | Operational cost |
Signed JWT attestation | Medium–High | Low (key management) |
Chain-hash ledger | High | Medium–High (storage + anchors) |
SIEM + RBAC logs only | Low | Low |
Typical telemetry outputs
Output | Contains | Consumer |
OpenTelemetry span | trace_id, span_id, agent_id, decision | Tracing backends (Jaeger, Tempo) |
SIEM JSON log | full decision record + signature | SOC, auditors |
CSV export | selected fields (for regulators) | Compliance teams |
Frequently Asked Questions
Q: What minimum fields should every decision log include?
A: timestamp, decision_id, agent_id, tool, params_hash, policy_version, decision, reason_code, trace_id, attestation_signature.
Q: Should I store full payloads in logs?
A: Preserve hashed or redacted snapshots by default. Only include payload snapshots when legally acceptable and necessary for investigations.
Q: How long should decision logs be retained?
A: Follow regulatory and internal policies — commonly 1–7 years for finance/healthcare. Also store policy version history for the same retention window.
Q: How do you scale policy evaluation without latency spikes?
A: Use prepared OPA queries, in-memory caches, and optionally WASM compilation for hot paths. Aim for P99 < 20ms for decision calls. Aegis targets these performance budgets.
Q: What external standards should I follow?
A: Use OpenTelemetry for traces (opentelemetry.io) and consider Open Policy Agent (OPA) for policy evaluation. (OpenTelemetry)
Q: How do I produce an audit package for regulators?
A: Export zipped JSON of decision records, signed attestations, policy diffs, and a replay transcript demonstrating the call flow with the applied policy_version.
Secure AI Infrastructure with Confidence with Aegis
Auditability for agentic workflows is achievable with a small set of engineering controls: a canonical decision schema, synchronous OTel spans + SIEM logs, cryptographic attestations, policy versioning and investigator tooling. Products like Aegis implement these controls as a runtime gateway and telemetry fabric so enterprises can enforce least-privilege agent behavior while delivering regulator-ready evidence.