Subscribe to the Non-Human & AI Identity Journal

How should security teams prove what AI agents did in production?

Security teams should require a complete, cryptographically protected action trail that links the initiating request, every delegation step, the credential or token used, and the final system effect. If the trail cannot be replayed and independently verified, it is useful for operations but weak for audit, incident response, and legal defence.

Why This Matters for Security Teams

Proving what AI agents did in production is not the same as logging what a human user clicked. Agents can chain tools, delegate sub-tasks, retry actions, and change execution paths in ways that are only visible if identity, policy, and telemetry are bound together. That is why current guidance increasingly treats auditability as a cryptographic and operational problem, not just a logging problem. The OWASP OWASP Agentic AI Top 10 and the NIST AI Risk Management Framework both point toward stronger traceability, accountability, and runtime controls for autonomous systems. NHIMG research on the AI Agents: The New Attack Surface report found that only 52% of companies can track and audit the data their AI agents access, leaving a large blind spot for compliance and breach investigation.

Security teams also have to assume that the first useful audit trail may be assembled after an incident, when the agent has already touched sensitive systems, secrets, or data. In practice, many security teams discover the limits of their evidence only after a production agent has already caused a reportable event.

How It Works in Practice

A defensible production trail should let an investigator reconstruct four things: who or what initiated the action, what context the agent had, which tools and credentials were used, and what system state changed. For agents, that means the trail must include the initiating request, prompt or task context where appropriate, every delegation step, policy decision, token issuance event, and final side effect. A simple application log is not enough if it cannot be replayed or independently verified.

Current best practice is to bind each agent action to a workload identity and a short-lived credential, then record the token or attestation identifier alongside the request and response. That approach is consistent with workload identity patterns such as SPIFFE and with policy-as-code systems that evaluate authorization at runtime. It is also aligned with NHI governance research, including NHIMG’s OWASP NHI Top 10, which treats agent credential exposure and uncontrolled delegation as auditability failures as well as security failures. For implementation, teams should:

  • log the original trigger, the agent identity, and the human or system owner
  • capture policy decisions at request time, not just after the fact
  • record credential issuance, scope, TTL, and revocation events
  • preserve immutable telemetry for tool calls, data reads, writes, and outbound requests
  • link every sub-action back to the parent task so delegation can be replayed

Where this breaks down is in loosely governed environments that let agents use shared credentials, unmanaged plugins, or direct shell access, because the resulting activity cannot be cleanly attributed to a single task or policy decision. The same problem appears when logs are split across SaaS, cloud, and endpoint platforms with no shared request identifier.

Common Variations and Edge Cases

Tighter evidence capture often increases operational overhead, requiring organisations to balance forensically strong records against latency, storage, and privacy constraints. That tradeoff is especially important for high-volume agents, multi-agent orchestration, and workflows that touch regulated data. Guidance here is evolving, and there is no universal standard for how much prompt content, intermediate reasoning, or tool output should be retained in every environment.

For some production systems, the right answer is not full content retention but a verifiable metadata chain: task ID, policy version, identity token, delegation tree, and cryptographic hashes of inputs and outputs. For others, especially where legal defence or regulated decisioning matters, richer capture may be necessary. The same logic appears in NHIMG’s Moltbook AI agent keys breach and the LLMjacking research, which show how quickly exposed credentials become an attacker’s entry point. External guidance from the CSA MAESTRO agentic AI threat modeling framework reinforces the need to model agent delegation and control loss as part of the evidence chain, not as separate concerns.

In highly autonomous or multi-tenant environments, the audit trail is strongest when it is designed as a product requirement, not a post-incident retrofit.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Agentic AI Top 10 and CSA MAESTRO address the attack and risk surface, while NIST AI RMF set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
OWASP Agentic AI Top 10 A01 Agentic systems need traceable actions and bounded delegation.
CSA MAESTRO TRM MAESTRO models agent delegation and control loss as audit risks.
NIST AI RMF GOVERN AI RMF governance requires accountability and traceability for system outputs.

Model delegation trees and preserve verifiable evidence across every sub-task.