If you cannot replay what an agent did, you cannot run it
Acceptance criteria and audits both depend on a record of what the agent saw and did, step by step. What to capture, and what the platforms give you today.
When an agent does something wrong in production, the first question is what it saw and what it decided, step by step. If the only answer is the final output and a timestamp, the agent should not have been in production. Everything else I ask of an agent rests on being able to replay a run.
I have written before about auditable AI in regulated industries and about asking a vendor how they will define done. Observability is the mechanism under both. An acceptance criterion says what correct output looks like for a given input; checking it means seeing the input, the retrieved context, the tool calls and the output together. An audit asks who approved what and against which version; answering it means the approval is in the same record as the run. Without the trace, neither check can be done.
What to capture
The record of a run is a trace: a timeline of nested steps, each with its inputs, outputs, duration and cost. The useful minimum, from the deployments we run and from the OpenTelemetry conventions, looks like this:
- The user, session and conversation identifiers, so a run can be found from a complaint.
- The agent’s name and version, and the model and deployment it called.
- The prompt and the completion, including the system instructions, captured with redaction and access control.
- Every tool call: the tool name, the call identifier, the arguments and the result. Tool results are where injected instructions arrive, so they belong in the record.
- The documents or data sources the agent retrieved, by identifier, so a wrong answer can be traced to a wrong source.
- Handoffs between agents and any planning steps, as nested spans.
- Token usage, including cached and reasoning tokens, and the cost derived from it.
- Latency per step and any error.
- Approval decisions: who approved, what they saw, and when.
- User feedback, linked to the run it concerns.
Two of those deserve a note. Content capture, meaning the prompts, tool arguments and results, is off by default in every instrumentation I have looked at, and for good reason: it often contains personal data, and on AWS a July 2026 SDK bug wrote raw prompts and responses into CloudWatch spans readable by anyone with log access. Capture it with redaction and access control; a metadata-only trace shows that a tool was called and nothing about why. Microsoft’s Agent Framework documentation says to enable sensitive data only in development or test, so on that stack decide deliberately where content is captured and who reads it. Application Insights now has a separate table for those attributes that you can mark as protected, readable only by a privileged monitoring role. And approvals need to live in the trace, since an approval recorded in a separate ticketing tool is hard to match to a run six months later.
Where the standard stands
A standard is emerging. The OpenTelemetry GenAI semantic conventions define spans for invoking an agent, calling a model and executing a tool, a flag for content capture, and conventions for MCP calls and agent-to-agent handoffs so a trace can continue across a tool boundary. Microsoft Agent Framework, AgentCore, Google’s agent runtime and the main independent tools all emit or accept them.
None of it is stable yet. The conventions moved out of the core OpenTelemetry repository into their own in June 2026, and the new repository had no tagged release when I checked in November. Every attribute carries development status, and dashboards keyed on an old attribute name break when SDKs move. The practical consequence is to pin the convention version you instrument against, and expect to migrate once.
What the platforms give you
On Microsoft Foundry, tracing is generally available for prompt and hosted agents and in preview for workflow and external agents; it switches on when a project is connected to Application Insights, and the portal keeps 90 days of traces. The agent monitoring dashboard and the Application Insights agents view were still marked preview in October 2026. On AWS, AgentCore Observability and CloudWatch’s generative AI observability have been generally available since October 2025, with session counts, latency, token usage and error rates, and Bedrock’s model invocation logging is off by default until you enable it. Google’s agent runtime traces to Cloud Trace with one variable for telemetry and a second for content, and its documentation asks you to have user consent and data handling in place before you set the second.
There is a gap to plan for. Microsoft’s Agent Framework documents that hosted or provider-managed MCP tools do not receive your trace context, because the provider’s service makes the call. I would assume the same wherever a provider runs a tool for you, and where the trace matters, run those tools yourself.
The caveat is that a trace shows what happened and says nothing about whether it was right. Quality still needs evaluators and a person who signs off. And full-content traces are large; Datadog, for one, bills on ingested spans, so sampling policy is a cost decision as well as an audit one. What I would not do is skip the trace to save storage. Sample, and keep the content for the runs that matter.
I wrote up the capture checklist and the per-platform setup in the QueryNow guide to AI agent observability.