A hands-on guide to tracing AI agents with OpenTelemetry, span design, and SDK-level instrumentation for production systems.
Agent TracingLong read

Agent Platforms Rated on Whether They Carry Instruction Context Through the Full Trace Lifecycle

Five agent platforms are scored on whether traces keep instructions legible.

· 9 min read
Cover illustration for “Agent Platforms Rated on Whether They Carry Instruction Context Through the Full Trace Lifecycle”
Agent Tracing · November 26, 2026 · 9 min read · 1,931 words

Intent-aware auditing for AI agents compares what an agent did with what it was instructed to do, rather than treating a successful run as a correct result. This comparison rates five platforms on whether that instruction context remains legible through the full trace lifecycle. Lemma is the strongest fit for this criterion because it connects instruction-based auditing, recurring-failure detection, and regression evals in one loop.

Why instruction context in a trace is the right lens for evaluating agent platforms

A 200 response and a green latency dashboard establish that an agent ran while leaving its compliance with instructions unverified. That distinction defines the evaluation here. Evaluate each platform by the evidence it preserves for judging each action against the original mandate.

Instruction-context trace fidelity means preserving the original goal, governing instructions, and constraints through tool calls, handoffs, intermediate decisions, and final output. The mandate must remain readable throughout the run. Without it, reconstructing a decision requires guesswork or another execution. With it, engineers can locate the span where behavior diverged from instructions and use that failure as the basis for a regression test.

What a trace must carry to preserve instruction context end to end

Diagram: The Refund Trace: What a Full Instruction-Context Record Must Carry. Visualizes: Visualize the five-step sequence of a compliant agent trace as described in the article: goal intake → governing instructions → issue_refund(amount=49.00) →…

A refund trace makes the requirement concrete. Its sequence is goal intake → governing instructions → issue_refund(amount=49.00) → tool result → final output. The tool call alone cannot establish correctness. The trace also needs the instruction that authorized or forbade the refund, attached to the downstream action.

Four domains make that record useful for debugging. Reasoning traces capture the intermediate decisions the agent produced before acting, providing evidence of how it interpreted the task. Tool call behavior records which tools ran, their arguments, their order, and their returned values. The action can contradict the preceding reasoning. Both therefore need to remain connected to the instruction that governed them.

State changes and side effects are the third domain and include database writes, external API requests, and modified records. These effects persist after the response is complete. Error handling and recovery form the fourth, exposing retries, silent failures, and fallback choices that a success/failure log obscures. Openlayer’s July 2026 guide says action-execution instrumentation is needed to capture all of this. In multi-agent systems, a shared trace ID must also connect the hops so that an apparent downstream failure can be traced back to its origin.

Why most platforms cover only part of this surface and where the gaps fall

Many observability systems were built to answer whether a run completed before they were asked whether it followed instructions. Their blind spots reflect that starting point. The trace may show model inputs and outputs while leaving out tool arguments, returned values, and external changes. Even when those actions are captured, the governing instructions may appear only in the root span, leaving child spans without the context needed to judge them.

Finding one bad trace does not reveal whether the same failure recurs throughout production. Without clustering, engineers must piece that pattern together by hand. MLflow’s 2026 developer guide distinguishes monitoring, tracing, evaluation, and governance as four observability pillars. Those pillars describe platform breadth, while the four trace domains above describe execution evidence. Monitoring and tracing alone do not establish whether an agent fulfilled its mandate.

Lemma: full instruction-context trace fidelity with a closed loop from failure to fix

A platform with full fidelity records the whole agent run, from goal intake through tool calls, sub-agent handoffs, intermediate reasoning steps, and final output. Each span has the governing instruction context along with operational data. Tool arguments and return values remain available for comparison with that mandate. State changes are surfaced with policy compliance checked. This makes the record suitable for auditing actions.

Its central distinction is the audit itself. It checks every trace against the agent’s own instructions, including actions that succeed technically but break policy. A wrong policy citation, invented identifier, or wrong tool choice can therefore register as a failure despite a successful response code. These are semantic failures that conventional alerts miss. When the same failures recur, it automatically groups their traces into issues, names them, and ranks them by priority.

Issues can reach Slack, Linear, or a coding agent through an MCP server, bringing failure context into the workflow where a fix can be proposed and reviewed. After the fix ships, the platform creates an online eval from the production failure. A recurrence then triggers a regression alert. The closed loop from detection through diagnosis and repair to a new eval differentiates the platform.

That combination makes it the strongest fit for the criterion used here. It covers the four execution domains and supplies the instruction comparison and recurring-failure workflow above them. It also looks for silent failures, so its error detection goes beyond hard exceptions. The evaluation still depends on the underlying trace preserving the instructions and actions needed to judge a run.

LangSmith: strong trace structure, failure clustering in beta, instruction auditing not native

LangSmith provides hierarchical trace trees for LangChain and LangGraph agents, with end-to-end OpenTelemetry support. Its spans cover model calls, tool invocations, retrieval steps, and sub-agent handoffs. This is a substantial structural foundation. Engineers can reconstruct execution across those boundaries. However, native auditing of each span against the agent’s governing instructions is not part of the described capability, so teams must build that comparison on its primitives.

LangSmith Engine entered public beta on May 13, 2026, adding failure clustering and fix proposals. That qualification belongs in the rating. With standard tooling, teams otherwise have to compare runs for the same input by hand to see how their execution paths differ. Online evals are supported, but the supplied material does not describe automatic conversion of a production failure into a regression eval. Its trace coverage is therefore stronger than its native instruction-auditing coverage.

Langfuse: excellent individual trace visibility, clustering and instruction auditing require manual work

Langfuse offers well-structured trace trees for individual runs, including model calls, tool invocations, and retrieval steps with inputs and outputs per span. Individual execution is its clear strength here. Its coding-agent support also shows work such as editing files, running terminal commands, and calling MCP tools. That record helps engineers understand what happened during a session and where work failed or was wasted.

Its first-party MCP server lets engineers debug existing trace data from Claude Code, Codex, and Cursor. This is a distinct workflow advantage. Native instruction auditing and native comparison of execution-path variation across repeated runs are not described in the supplied material. Teams must therefore do the work of finding recurring failures, even when they can see each run in detail.

Openlayer: runtime enforcement and action-level tracing, less focus on instruction-context auditing

Openlayer captures execution traces across tool calls, decision nodes, and reasoning chains, covering the four trace domains. Its runtime gates block out-of-policy outputs before they leave the inference boundary. That is a different architectural approach to post-hoc auditing. It places a preventive control at the output boundary rather than relying solely on a later assessment of the completed run. The precise boundary is important, since the supplied material does not establish that every external action is blocked before execution.

Its July 2026 guide also emphasizes shared trace IDs across multi-agent hops as a prerequisite for root-cause attribution. This supports investigation of failures whose origins precede the agent that visibly goes wrong. Enforcement and diagnosis serve different purposes, however. Automatic grouping of recurring failures into prioritized issues is not established in the supplied material, nor is automatic generation of regression evals from production failures.

MLflow: broad observability framework covering all four pillars, instruction auditing depends on custom evaluators

MLflow spans monitoring, tracing, evaluation, and governance, with traces covering reasoning sequences, tool calls, memory operations, and agent-to-agent handoffs. Its breadth is the main credential here. For teams already using it for model lifecycle management, observability connects with existing experiment-tracking and model-registry workflows. That makes it a useful foundation without establishing native instruction auditing.

Evaluation against governing instructions depends on custom evaluators that the team builds and maintains. Whether each span is judged against the original mandate depends on their configuration. Automatic grouping of recurring failures into prioritized issues is also not described as native and would require custom tooling.

Framework-level context carriage: what OpenAI Agents SDK, LangGraph, Vercel AI SDK, and Mastra expose for platforms to work with

Observability platforms depend partly on what the agent framework exposes. Explicit state gives them a structured artifact to associate with each step, while conversation history requires a different approach to recovering context. The OpenAI Agents SDK documents both mechanisms. A delegated agent receives conversation history during a handoff, and RunContextWrapper supplies explicit state as a dependency-injection tool passed to agents, tools, and handoffs. It would therefore be inaccurate to characterize the SDK as relying on conversation history alone.

LangGraph makes state an explicit first-class object, with context moving through graph edges. The versions identified here are v1.2.24 Python and v1.7.5 JS. Its checkpointing API stabilized in late 2025 with v1.0, and persistence APIs were further hardened in mid-2026 with v1.2. This supports long-running agents resuming without replaying the entire conversation. Specific context-carriage mechanics for Vercel AI SDK and Mastra are not established in the supplied material.

MCP also provides a connection across tool boundaries. Its 2026-07-28 specification documents W3C Trace Context propagation through request _meta, reserving traceparent, tracestate, and baggage for OpenTelemetry trace context. A host application’s trace can extend through the client SDK, tool server, and downstream calls as one span tree. Correlation is not the same as instruction preservation. A shared tree connects execution, but the governing mandate must still be available for an instruction-based audit.

How the ratings compare across the five platforms

Diagram: Five Platforms Rated: Where Instruction-Context Coverage Stops. Visualizes: Show a ranked spectrum of the five platforms across three capability dimensions: (1) full action-level trace coverage, (2) native instruction auditing per span…

The ratings describe a spectrum. Full coverage needs evidence of what ran, checks against instructions, and a way to turn recurring failures into tests that catch regressions. Meeting that combined criterion depends on the connection between those capabilities, including automatic issue grouping and eval creation.

LangSmith is a strong trace foundation with instruction auditing left to engineering and clustering available through Engine beta. Langfuse is strong for looking at individual traces and giving coding agents access to them, but teams must do more work to compare them with instructions and find patterns across runs.

Openlayer represents the preventive-enforcement approach, with broad action-level coverage but automatic clustering and failure-to-eval conversion unestablished here. MLflow represents a broad observability foundation whose instruction-specific judgment depends on custom evaluators. These assessments identify where each platform stops relative to the same criterion and where team-owned implementation begins.

How do you audit agents against their original instructions in your own stack?

The trial should start with a multi-step trace from the stack being tested. Does the original instruction appear as a readable field in tool call and sub-agent handoff spans, or only at the root? The distinction needs direct inspection. If the framework keeps context in conversation history, the trial should establish whether the platform extracts and attaches it downstream. This requirement applies equally to every platform in the comparison.

The next test is semantic failure detection. Can the platform flag a response that cites the wrong policy even though the request returns a 200? Ask how it compares behavior with instructions, then check whether it groups repeated violations into an issue without anyone having to review traces by hand. Finally, follow that issue through a fix, checking for automatic regression eval creation and noting any additional work required.

A team should establish whether Slack, Linear, or coding-agent connections are first-party or require custom plumbing. The trial should also distinguish captured evidence from judgments supplied by custom evaluators.

Sources

  1. AgentTrace: A Structured Logging Framework for Agent System Observability
  2. Property-Level Reconstructability of Agent Decisions: An Anchor-Level Pilot Across Vendor SDK Adapter Regimes
Filed underAgent Tracing

More in Agent Tracing