AI Agent Assurance for Your Agent Deployments

Agent Assurance Tests How Your Agent Actually Behaves across Workflows, Tools, and Actions to Catch Failures and Vulnerabilities.

npm install -g @testmuai/rook@latest

Agent Tracing Is Self-Reported - Here's How to Turn Traces Into Evidence

Agent tracing shows what your AI agent says it did. Use the REPLAY test to make traces tamper-evident, replayable and owned by you, not your vendor.

Summarise with AI

Agent tracing is now the norm. In a post from November 19th, LangChain noted that across the 16k+ production agents on LangSmith, 87% of teams had tracing enabled prior to their first deployment. They describe traces as an audit trail for regulators, security bodies and teams.

Three days earlier Gartner had published a survey of 298 infrastructure and operations leaders. 95% had at least one agent-related incident over the past 12 months, 57% rated their AI governance as weak, and only 15% had automatic circuit breakers in place to stop runaway agent errors.

Put those two together, and you've got the very question that this article sets out to answer. Teams now have the traces. When something goes wrong, do those traces provide any evidence of what the agent actually did?

Our view at TestMu AI is that they usually don't. Here's why and how you can go about testing your own.

TL;DR

Agent tracing captures every model call, tool call and handoff that an AI agent makes. In the SDK scenario, the trace is generated by the agent's own runtime (which was built by the team that built the agent) and is stored wherever the vendor wants it. That makes it excellent for debugging and very poor as evidence. The REPLAY test is the way to close that gap.

What Is the REPLAY Test for Agent Tracing?

  • Recorded at the boundary: An evidence-grade agent trace has every side effect logged by the gateway, MCP proxy or database audit log, not only the agent's SDK.
  • Every step attributed: Each agent trace span names the model version, prompt hash, tool schema, policy version and the identity that approved the action.
  • Protected: Agent trace spans sit in append-only, hash-chained storage that the agent's own credentials cannot edit or delete.
  • Legible: A reviewer who did not build the agent can explain a failed run from the agent trace alone, the basis of AI verifiability.
  • Assertable: Deterministic checks in CI read the agent traces, so a broken policy, such as a refund above the limit, fails the build.
  • Yours: The deploying company exports and verifies its agent traces without the vendor's console, which is what an AI audit needs.

What's the Difference Between Agent Tracing and LLM Tracing?

  • AI agent tracing: Links model calls to tool calls, handoffs and guardrail checks across a whole agent run, in OpenTelemetry GenAI spans.
  • LLM tracing: Records one span per model call, with the prompt, response, latency and tokens, and feeds AI observability dashboards.
  • Debug trace vs evidence: Neither AI agent tracing nor LLM tracing is evidence for AI agent governance until it passes the REPLAY test.

What Is Agent Tracing?

Agent tracing is the practice of recording each step that an agent takes (model calls, tool calls, handoffs, guardrail checks) as a series of linked, time-stamped spans so that you can fully reconstruct a single run end to end. LLM tracing is the more narrow version of that, one span per model call.

Major agent frameworks now produce traces by default. The OpenAI Agents SDK documentation makes it clear that tracing is on by default and will record spans for agent runs, LLM generations, function (tool) calls, guardrails and handoffs.

OpenTelemetry's GenAI semantic conventions define agent and tool spans with operation names such as invoke_agent and execute_tool. Those conventions are still currently marked as "Development" rather than stable.

Agent tracing is the raw material of LLM observability. Observability tools take the traces and turn them into dashboards, cost reports and evals. The trace is the record at the bottom.

Agent tracing architecture where SDK spans and boundary records feed a tamper-evident evidence store owned by the deployer.

Why Isn't an Agent Trace the Same as an AI Audit Trail?

A trace only becomes an audit trail when it's something that someone other than the agent's builders can trust. Default traces fail that test in three respects: who writes them, what they omit and who has them.

1. The Agent's Runtime Is the Witness

In SDK-based tracing, the spans are generated by the instrumentation running in the same process as the agent, and that instrumentation is configured by the same team. Capture can be turned off via an environment variable, a function call or a per-run setting (the OpenAI docs list these quite explicitly).

The v0.26.0 release of the OpenAI Agents SDK (24th November) fixed how the global tracing switch is respected in Realtime sessions. That's just standard maintenance, and it illustrates the point perfectly: whether or not a step is captured is a matter of the configuration of the framework which took the step.

This is the first of TestMu AI's trust principles as applied to logs. No model checks its own work. By the same logic, no agent runtime should be the only one to see its own actions.

NIST came to a similar conclusion from the identity perspective. Their post of 27th October on the design principles for agent identity systems calls for an append-only body of evidence which is logged independently of the agent, as a compromised agent could otherwise alter its own logs.

2. Default Traces Leave Out the Content

The OpenTelemetry GenAI conventions have instrumentations not capturing prompt and response content by default (i.e. it's opt-in) as that content is very likely to contain sensitive and personal data. That is the correct privacy default.

It means that a default trace will show that the agent invoked a tool, but won't show what it was told or what it said. That's the bit you need if you're having a dispute about what the agent promised the customer.

3. Custody Sits Wherever the Vendor Put It

The EU AI Act requires that high-risk AI systems be capable of automatically recording events throughout their lifetime (Article 12). The provider and/or deployer must maintain those logs for a period of at least six months 'to the extent such logs are under their control' (Articles 19 and 26(6)).

Following the AI Omnibus, the Annex III high-risk system rules will apply from 2 December 2027.

Read the qualifier again. A log that you can't export, verify or keep on your own is a very weak position to be in. You're in a position where whoever controls the trace store has the record.

Amazon's November 20 write-up on the Cairn agents makes this perfectly clear from the attacker's perspective. The agents' full operational history (including prompts and AI output) was only visible to the outside world because the operator had left the server publicly accessible, running unauthenticated.

The REPLAY Test: When Does an Agent Trace Become Evidence?

The REPLAY test is TestMu AI's six-part test to see if an agent trace can be used as evidence: Recorded at the boundary, Every step attributed, Protected, Legible, Assertable and Yours. Each of the six parts comes with a test that the QA team can run this sprint and a failure signal to look out for.

CheckWhat it requiresTest to run this sprintFailure signal
Recorded at the boundarySide effects are captured where they hit real systems (API gateway, MCP proxy, database audit log), not only by the agent's SDKRun the agent with SDK tracing disabled. Does a boundary record of every write still exist? Diff the twoA side effect in the boundary log with no matching span, or no boundary log at all
Every step attributedEach span names the model and version, prompt template hash, tool schema version, policy version and the identity that authorized the actionPick a random sample of spans and try to answer "which model, which policy, who allowed it" for eachAny span you cannot attribute without asking the builder
ProtectedAppend-only, hash-chained storage the agent's credentials cannot rewriteUse the agent's own credentials to edit or delete a spanThe edit succeeds, or succeeds silently
LegibleA person outside the team can read what happened; machines can parse it in an open format such as OpenTelemetry GenAIGive one failed run to a reviewer who did not build the agentThey cannot explain the failure from the trace alone
AssertableTraces feed deterministic checks and replays in CI, so a rule breach blocks releaseWrite one assertion per policy (for example, "no refund tool call above the limit without an approval span") and break it on purposeThe release goes out anyway
YoursTraces land in your control plane, in a format and retention period you set, verifiable without the vendor's toolExport last month's traces and verify the hash chain with your own scriptExport is partial, proprietary or needs the vendor's console

The order is important. R and P determine if the record is trustworthy.

E and L determine if it's usable. A and Y determine if it changes what ships and whether it survives a vendor change.

The REPLAY test for agent tracing: six checks that turn a debug trace into evidence.

How Is an Evidence-Grade Trace Different From a Debug Trace?

A debug trace answers the question "why did this run fail?" An evidence-grade trace answers the question "can we prove what actually happened to someone who doesn't trust us?" Most teams will need both. They're built in very different ways.

PropertyDebug traceEvidence-grade trace
Who writes itAgent SDK, in-processSDK plus independent capture at the tool and data boundary
ContentOften metadata only; content opt-inContent kept in a protected, access-controlled store, or a hash of it kept where content can't be stored
IntegrityUsually editable records in an observability backendAppend-only, hash-chained; tampering is detectable
AttributionModel name, latency, tokensModel version, prompt hash, tool schema, policy version, authorizing identity
UseDashboards, debugging, evalsRelease gates, incident review, audits, disputes
OwnerWherever the observability vendor stores itThe deploying company's control plane, exportable in an open format

Tamper-evident logs aren't new. Certificate Transparency has had Merkle trees as append-only public logs for years (RFC 9162 describes version 2.0 of the protocol). Agent tracing can take the same approach.

Comparison of a default agent trace and an evidence-grade agent trace across capture point, integrity, content and ownership.

How Do You Actually Test Agent Tracing?

Treat the trace pipeline as a system under test with its own test plan and release gate. Here's the checklist we'd recommend, in the order we'd run it.

  • Inventory every side effect. List every tool, every API and every data store that the agent is capable of writing to. Each of those things requires a boundary record rather than just an SDK span.
  • Add boundary capture. Route tool calls via a gateway or MCP proxy which will log the requests and responses on its own credentials.
  • Reconcile. Run a nightly job that joins SDK spans to boundary records by trace ID (W3C Trace Context's traceparent header carries it across services) and flags orphans in either direction.
  • Stamp attribution. Add model version, prompt template hash, tool schema version and policy version as span attributes at the commencement of every run.
  • Decide on content handling. Either turn on content capture into a restricted store with redaction, or store a hash of the prompt and response so that you can later prove which text was sent without actually storing the text.
  • Hash the store. Each batch of spans has the hash of the previous batch. Run a tamper test with the agent's own credentials on every release.
  • Write trace assertions. One deterministic assertion per business rule, run against the traces from the staging runs. A failed assertion will cause the build to fail.
  • Replay prior to every model change. Re-run the recorded tool responses against the new model/prompt and compare the paths and outcomes. A model upgrade can alter behavior without any code change at your end.
  • Run a fire drill. Take a past run and have someone outside the team go back and reconstruct it from the trace. Note what was missing and then fix that.
  • Export and verify. Once a quarter export the traces in OpenTelemetry format and verify the chain without the vendor's tooling.

This checklist also acts as an agent harness requirement. The harness that runs your agent must be able to emit attribution and must be able to route tool calls through a boundary. Fix the harness if it can't do either of those things before you start to scale the agent.

Does REPLAY Work for In-House Agents and Under Very Strict Privacy Rules?

Yes. Independence means independent of the agent's runtime and credentials, not necessarily independent of the agent's company. Three edge cases are worth resolving upfront.

You built the agent and the tracing yourself - that's perfectly fine. The boundary capture and the evidence store just need credentials that the agent can't use and a team other than the agent's builders to own the reconciliation. That's the whole point of the Y check - to own your own evidence, not to have a conflict with it.

Your observability vendor also runs your evals (all right, that's fine for debugging). As evidence of that, you can export and verify the record without that vendor. If you can, then you have continuity. If you can't, then your audit trail has a single point of failure.

Privacy rules don't permit us to store the prompts. We can store the hash of the prompt (which will tell us which prompt was sent without actually storing the prompt) and the redacted content as permitted by your policy. The hash will confirm which prompt was sent and will fail in an obvious way if anyone subsequently attempts to substitute a different version.

Where Is the Agent Tracing Market Going?

Agent tracing is being absorbed into the larger observability and security platforms, and the buyer is going to start asking those platforms for proof rather than just visibility. The deals over the past four months make the first half of that perfectly clear:

  • CrowdStrike agreed to acquire Fiddler on 3rd November, with CEO George Kurtz describing it as "the flight recorder for every agent".
  • Elastic announced on 19th November an agreement to acquire HoneyHive (an agent tracing and evals company) and aims to bring its workflows into Elastic Observability.
  • Dynatrace agreed in August to acquire Arize in a deal valued at $915 million.
  • Microsoft on 17th November and over 40 other organizations launched the AI Transparency Initiative to work on open standards for AI that can be independently verified.

A flight recorder is the right analogy, with one caveat: an aircraft's flight recorder is designed to survive the crash and is then examined by the investigators, not just the airline. Agent tracing is not yet there.

We think that prior to the EU Annex III obligations coming into force on 2 December 2027, the enterprise AI RFPs will be adding the trace integrity questions (independent capture, tamper evidence, open export) to the SOC 2 questions that they already ask. That's our view, not a finding. It's based on the two trends we've already referenced: the logging obligations with a fixed date and the industry movement around independent verification.

Where Does TestMu AI Fit In?

TestMu AI is the independent verification layer: the layer that tests the agents and provides the evidence rather than the agent describing what it did. Agent tracing tells you what happened in production. Verification tells you what the agent does when it's pushed, prior to release.

Those are the three types of interaction. KaneAI and Kane CLI (which runs the deterministic end-to-end checks from the terminal) cover the human using software. Agent Testing for chat, voice and IVR agents covers the human talking to an agent.

Agent Assurance (run from the rook CLI) covers agents working with agents, with agents testing agents prior to release. HyperExecute orchestrates those runs at scale.

We're all subject to the same REPLAY test. A TestMu AI test run is not the agent under test assessing itself, and the results from that run should be something a customer can hold on to and check. The setup details are in the TestMu AI docs.

Start a 14-day free trial of Agent Assurance by TestMu AI, with 4,000 credits, to test how your AI agents behave across workflows, tools, and actions

Conclusion: Make Agent Tracing Pass Its Own Audit

Agent tracing has solved the problem of visibility. It has not yet solved the problem of trust. A default trace is just the agent's own runtime writing it up, very light on content, and it's stored on terms set by someone else.

Run the REPLAY test on one production agent this month. If the trace can't survive the agent's own credentials and an outside reviewer and an export, then it's still just a debug log. Treat it as such until it passes.

Shipping agents that other agents use? Rook by TestMu AI does Agent Assurance: agents testing agents before release, with no human in the loop.

To run your first test, install Agent Assurance with npm install -g @testmuai/rook@latest command, or
for a full walkthrough of the product.

Was this helpful?

Authors

Mayank Bhola

Mayank Bhola

Author · 14 posts

Mayank Bhola is Co-Founder and Head of Products at TestMu AI, where he leads the entire product portfolio across KaneAI, Kane CLI, HyperExecute, SmartUI, the Real Device Cloud, Accessibility, and other software testing product lines. As an early Lead Architect he designed and built the company's flagship Tunnel technology from scratch, created the React-based automation platform, and architected the data-intensive pipelines and FAAS services that scale it. He brings more than 10 years of experience in software development and product engineering, with earlier roles as Head of Technology at Juggernaut Books and Senior Software Engineer at PressPlay TV and Zomato. Mayank holds a B.Tech in Computer Engineering from JIIT Noida.

Maneesh Sharma

Maneesh Sharma

Reviewer

Maneesh Sharma is Chief Operating Officer at TestMu AI, where he leads the company's revenue functions across go-to-market, sales, RevOps, customer success, and the partner ecosystem, driving its global expansion. He brings over 28 years of experience across product, go-to-market, and business operations. Before TestMu AI he was Managing Director and General Manager for GitHub across India and APAC, Head of Partner Sales and Ecosystem at Adobe, Chief Revenue Officer at WizIQ, and Head of Products and Solutions at SAP India. Maneesh holds an MBA from IIM Bangalore and a B.E. in Electronics and Communications from NIT Surat.

Agent Tracing FAQs

TestMu AI forEnterprise

Get access to solutions built on Enterprise
grade security, privacy, & compliance

  • Advanced access controls
  • Advanced data retention rules
  • Advanced Local Testing
  • Premium Support options
  • Early access to beta features
  • Private Slack Channel
  • Unlimited Manual Accessibility DevTools Tests