Beyond the Prompt: The Audit Trail Is the New Security Boundary
For three years the security conversation around LLMs was about the input. Prompt injection, jailbreaks, the prompt as an attack surface. All of it reduced to one question: what can you put into a model, and what will the model do with it. The next boundary asks something different. It asks what the system did after the prompt left the model and the agent started acting on its own. You do not secure that by hardening the input. You prove it by recording what the orchestration layer actually did.
An agent is not one call in and one call out. It is a loop of state changes, tool calls, and decisions run across many steps. The survey by Wang et al. that is the standard reference for LLM-based agents describes the architecture as four modules: profile, memory, planning, and action. Once a system composes those across dozens of steps, the input and output of the run explain almost nothing. To reconstruct why an agent did something you need the record of the steps in between, the state it was in at each decision, and the tools it reached for.
The capture layer is real
Vendors are building that record now. LangGraph, LangChain’s low-level orchestration framework, advertises “durable execution”: it persists agent state so a run resumes “from exactly where they left off,” and its checkpointers store “a thread’s graph state as checkpoints” for conversation continuity, human-in-the-loop, time travel, and fault tolerance. LangSmith, the observability layer paired with it, “traces execution paths, captures state transitions, and provides detailed runtime metrics.” CrewAI says its Control Plane sits “in the execution path of every workflow” and claims “immutable audit trails” plus “real-time tracing of every LLM call, tool call, and memory read.” OpenAI’s Agents SDK ships tracing that records “LLM generations, tool calls, handoffs, guardrails, and even custom events,” split into spans for agents, generations, function calls, guardrails, and handoffs.
That is a lot of machinery, and all of it exists today. But capture is not the same as audit. A debug log and an audit trail are different artifacts, and three properties separate them.
Three properties separate a trace from an audit trail
The first is completeness. A trace is not an audit trail unless it records state transitions and tool-use decisions, not just the raw input and output. The second is tamper-evidence. The record has to be immutable, so an assessor can trust that what is in the log is what happened. The third is portability. The trace has to be readable outside the vendor that produced it, in a schema an assessor will accept.
The vendors are partway there on all three, and the honest gap is the first one. These traces record what the agent did: the tool it called, the handoff it made, the state it changed. They do not record why. The model’s internal rationale, the reasoning behind a decision, is still hidden. No source I have documents a standardized, verifiable capture of it. The audit trail we can build today is a reconstruction of actions without the reasoning underneath. That is enough for debugging, and enough to prove what happened. It is not enough to prove the decision was justified, and for accountability that is the part that matters most.
The law and the standard
The regulators are arriving at the same place from the other direction. Article 12 of the EU AI Act requires high-risk systems to technically allow the “automatic recording of events (logs) over the lifetime of the system,” with logs that support risk identification, post-market monitoring, and operation monitoring. The obligation is staged: December 2027 for Annex III systems, August 2028 for Annex I. It applies to high-risk systems, not every agent, and it is not in force today. The direction is still clear. The U.S. side is softer. NIST’s AI Risk Management Framework is voluntary, organized around four functions (Govern, Map, Measure, Manage), and under revision now. I wrote about the wider compliance gap separately in Auditing the Unpredictable, and this post is the narrower question that piece kept pointing at: once the rules exist, what is the artifact that proves compliance.
Against the vendors sits a standardization effort. OpenTelemetry’s GenAI semantic-conventions project defines spans, metrics, and events for GenAI clients, MCP, and provider-specific conventions. That gives a trace a vendor-neutral schema, so it can leave one vendor’s system and still be read by an assessor. It is young; the repository has roughly 300 stars. But it is the same shape as MCP and A2A, where the interface standardized under a neutral body and the vendors competed above it. That framework churn is what The Open-Source Agent Stack Is Fragmenting covered. I would not bet against the same thing repeating here.
Microsoft’s Trace treats an AI system as a computational graph and “captures and propagates an AI system’s execution trace” to optimize prompts and code end to end. That is optimization, not compliance, and it helps to keep the two apart. But it is more evidence that the execution trace is becoming a first-class primitive rather than a logging afterthought.
Who owns the audit layer
The race is visible. CrewAI sells immutable audit trails. LangChain sells trace execution paths. OpenAI bundles tracing into its SDK. Each of them wants to be the audit layer of record, and none of them is there. CrewAI’s immutability claim is vendor marketing, not a control an auditor has accepted. The OpenTelemetry GenAI schema is too young to anchor any assessment. None of what exists today is verifiable in the sense an auditor would use the word.
There is also a direct collision between observability and privacy. OpenAI’s tracing is unavailable to organizations that use its APIs under a Zero Data Retention policy. A team that chose ZDR for compliance reasons has given up the very traces that would let it prove what an agent did. That tension matters, because it cuts against the idea that more tracing is always the safe choice.
Bottom line
Three years of LLM security were spent on the input. The next boundary is the trace. Vendors are shipping the capture layer now, and the legal requirement in Article 12 and the vendor-neutral schema in OpenTelemetry GenAI are arriving just behind it. What separates a real audit trail from a debug log is completeness, tamper-evidence, and portability. The vendors can deliver the last two today. The first is the hard one, because the model’s own reasoning is the part nobody can capture verifiably yet. Until someone does, we can prove what an agent did, but not why it was right to do it.
Sources
- langchain-ai/langgraph — GitHub
- CrewAI
- OpenAI Agents SDK: Tracing — OpenAI
- LangGraph: Persistence — LangChain
- LangSmith — LangChain
- A Survey on Large Language Model based Autonomous Agents — Wang et al., arXiv
- EU AI Act, Article 12: Record-Keeping — Artificial Intelligence Act
- AI Risk Management Framework — NIST
- OpenTelemetry GenAI Semantic Conventions — GitHub
- microsoft/trace — GitHub
- Tracing the path to self-adapting AI agents — Microsoft Research