Agent Observability Is Not Logging: The Evidence Layer Production Agents Need
From the publisher’s feed, collected in the ZeroLabs newsroom.
Dashboards can tell you whether an agent was fast. They cannot tell you whether it used the right context, made a responsible decision, or actually completed the work.Agent observability should reconstruct what the agent saw, did, changed, and proved.An agent says it fixed the issue. The API returned 200. No exception was thrown. Latency looks normal. The model's final answer is confident.But did it fix the issue?Which source did it trust? Which tool did it call? Did it repeat a failed action three times? Did it change a record, run the test it claimed to run, or merely produce a convincing sentence about the work?Those are observability questions. And they are different from the questions most service dashboards were built to answer.Agent observability is the discipline of producing enough evidence to reconstruct and assess autonomous work: the task an agent received, the state it saw, the decisions and tool calls it made, the results it observed, the side effects it caused, and the proof required to accept the outcome.The original insight is simple: for agents, the unit worth observing is not the request. It is the claim of completion. Observability should help an operator decide whether that claim deserves to become an accepted state.Healthy Infrastructure Can Still Produce a Bad Agent OutcomeConventional observability asks whether a service is available, slow, or failing. Those signals still matter. Agent systems need request rate, latency, error rate, queue depth, CPU, database health, and dependency status.They are not sufficient.An agent can fail while every infrastructure indicator is green. It may retrieve an obsolete policy, choose the wrong tool, burn its budget in a retry loop, skip verification, or report work as complete without authority to do so. The request may be fast. The tool call may be valid. The final answer may be fluent. The outcome can still be wrong.This is the gap between service health and task responsibility.OpenTelemetry’s GenAI work makes this gap more visible by standardizing telemetry for GenAI operations such as model calls, token usage, tool calls, and tool results. Its GenAI observability guide makes a practical point: without traces, a slow or incorrect agent response could be caused by the model, a tool call, a retry loop, or another step in the chain.That is the floor. A production agent also needs a record of whether those steps formed a responsible path toward an accepted outcome.The Mental Model: Run, Trace, Thread, OutcomeAgent work needs more than one level of explanation. A single span does not explain a trajectory. A full transcript does not explain whether work was accepted. A user conversation does not necessarily map to one task.Use four units:Run: one model call, retrieval, tool invocation, policy check, evaluation, or approval.Trace: the related runs for one attempt to complete a task.Thread: a longer-lived user or workflow context spanning multiple traces.Outcome: the accepted terminal state, evidence, verifier, and authority.A slow model response is a run-level issue. A coding agent that makes a valid sequence of calls but edits the wrong files is a trace-level issue. A support agent that gradually loses customer context across several interactions is a thread-level issue. A deployment that looks complete but lacks an approval record is an outcome-level issue.LangChain’s writing on agent observability makes a similar distinction between runs, traces, and threads, and argues that production traces become the basis for evaluation. I would add one more unit for production systems: outcome. Without outcome, teams can debug steps but still fail to decide whether the work was acceptable.Build an Evidence-First TraceThe most useful trace is not the longest trace. It is the smallest durable record that can explain a consequential transition.An evidence-first trace follows the path from task contract to selected context, proposed action, policy decision, tool result, verification evidence, and accepted outcome.A good agent trace preserves seven layers of evidence:Identity: trace ID, thread ID, task ID, agent version, model version, tool version, and policy version.Intent: normalized task contract, acceptance criteria, owner, and risk tier.Context: source IDs, retrieval results, memory reads, memory writes, and freshness signals.Control: route, budget, retry reason, permission decision, escalation condition, and stop rule.Action: validated tool arguments, scope, idempotency key, start/end time, and result.Proof: tests, API responses, citations, evaluator output, policy checks, or reviewer decision.Outcome: completed, blocked, needs review, rejected, timed out, or escalated.Compare these two records:Agent: "The CI issue is fixed."task: CI-1842change: src/auth/token.tstest: pnpm test auth/token -- 14 passedintegration_suite: not_runreason: missing database credentialpolicy: merge not permitted without integration suiteterminal_state: needs_reviewauthority: repo maintainerThe first record is a claim. The second record is operational evidence. It tells a human operator what was done, what was proven, what remains uncertain, and who owns the next decision.This is the standard production agents should meet. Do not ask observability to record everything. Ask it to preserve enough evidence that an operator can accept, reject, retry, or escalate the work without reconstructing the story from memory.Observe Decisions, Not Private ReasoningAgent observability should not depend on recording private chain-of-thought or storing every conversation forever. That is unnecessary for operations and risky for systems that handle sensitive material.The useful operational path is:task contract -> selected context -> proposed action -> policy decision -> tool result -> verification evidence -> accepted outcomeThis explains behavior through observable artifacts. An operator can see that a retrieval source was stale, a schema check rejected the proposed action, a tool returned a partial result, or a test was never run. None of that requires treating an internal rationale as ground truth.Content capture deserves special care. OpenTelemetry’s GenAI semantic-convention registry explicitly treats prompt, completion, tool-call, and tool-result content as potentially sensitive. In practice, this means teams should prefer structured metadata and access-controlled evidence references unless full content capture has a clear operational purpose, retention policy, redaction path, and access model.A useful rule: capture the evidence needed to explain the transition, not the most private text available at the time.Measure the Shape of WorkToken counts and latency matter. They do not tell you whether the system is useful.The metrics should match the property being operated:Outcome quality: verified-task success, human acceptance, policy-violation rate, unsupported-claim rate.Path efficiency: tool calls per verified task, retry rate, repeated-observation rate, dead-end rate.Reliability: terminal-state coverage, timeouts, tool-failure rate, recovery success, escalation rate.Evidence quality: consequential actions independently verified, citation validity, stale-context incidence.Control: approval-gate coverage, denied-action rate, permission-boundary violations, audit completeness.Economics: cost per verified outcome, tokens per completed task, human-review minutes per accepted result.Drift: outcome and trajectory changes by model, prompt, tool, policy, retrieval, or agent version.Cost per verified outcome is the metric I would put in front of engineering leaders. A workflow is not efficient because one model call is cheap. If it takes four retries, two evaluator calls, and thirty minutes of human repair to produce an accepted result, that full cost belongs to the outcome.Traces Become the Input to EvaluationObservability is not evaluation. A trace says what happened. An evaluation judges whether that behavior was good enough. In production agent systems, the two should form one operating loop.Production traces should become failure patterns, regression cases, evaluations, and measured releases.Production matters because natural-language inputs, retrieved context, tool environments, and user state create failure modes that pre-launch datasets rarely cover. The right response is not to accept production failures as unavoidable. It is to convert representative, privacy-safe traces into evaluation cases.Anthropic’s evaluation guidance describes the danger of operating without systematic evals: teams fall into a reactive cycle of waiting for complaints, manually reproducing issues, patching behavior, and hoping nothing regressed. Their multi-agent research-system writeup also describes how production tracing helped distinguish search issues, tool failures, and dynamic agent behavior.The improvement loop is practical:Capture a trace for a sampled or consequential production task.Identify a failure pattern or exemplary success path.Curate the minimum safe case: task, context references, constraints, and observed evidence.Add a deterministic check, human rubric, or calibrated evaluator.Make one targeted change to the prompt, tool, context policy, routing rule, or harness.Evaluate offline, then monitor in a bounded release.This is how a production trace becomes a regression test rather than a recurring anecdote.A Concrete Failure: Everything Passed Except the TaskImagine a support agent asked to answer a customer’s question about an account migration.The service layer is healthy. The model call succeeds. The search endpoint returns a document. The agent produces a clear answer in two seconds. Every infrastructure alert is green.The trace reveals the actual failure:The task was classified as migration-policy.Retrieval returned a document from an older policy version.The agent selected it because the document had high lexical overlap with the customer wording.The response cited no policy version and ran no freshness check.A later human review rejected the answer.This is not an availability incident. It is a context and verification failure.The fix may be a metadata filter, a policy-version gate, a retrieval contract, or an evaluator that checks whether an answer cites the active policy. It is unlikely to be solved reliably by adding “be accurate” to the prompt.Best PracticesStart with one consequential workflow instead of trying to observe every token from every model call. Good candidates include preparing a code change, updating a support ticket, classifying a security finding, or generating a customer-facing recommendation.For that workflow:assign stable task, trace, and thread identifiers;store acceptance criteria outside the model narrative;capture tool results and policy decisions as structured events;distinguish facts, proposals, and accepted state;require independent proof for consequential completion;sample content cautiously with redaction, access control, and retention rules;turn one important production trace into an evaluation case.OpenTelemetry semantic conventions help because common names make telemetry easier to correlate across services, languages, and tools. But the agent-specific contract still belongs to the application: task intent, evidence references, authority, terminal states, and acceptance criteria.Common MistakesThe first mistake is treating the transcript as the trace. A transcript is useful context, but it does not automatically encode state ownership, tool scope, proof, or terminal decision.The second mistake is measuring only model cost. Model cost is a component. The operating unit is the verified outcome, which includes retries, tools, evaluators, human review, and failed attempts.The third mistake is capturing too much sensitive content because it feels easier than designing evidence references. This creates a second high-risk data store and often makes observability harder to share with operators.The fourth mistake is trusting the agent’s completion claim. Treat completion as a proposed transition. Tests, citations, tool responses, policy checks, evaluators, or human review decide whether the system accepts it.Actionable TakeawaysIf you are shipping an agent into a real workflow, ask these questions before calling it observable:Can an operator reconstruct the task contract, selected context, actions, side effects, proof, and terminal state?Can the trace explain why each transition was allowed?Can the system distinguish an agent proposal from verified fact?Can you calculate cost per verified outcome, not just tokens per request?Can production traces become privacy-safe regression cases?Can you explain what remains uncertain when the agent stops?Can a named authority accept, reject, retry, or escalate the work?If not, the agent may still be useful. It is just not observable enough for consequential autonomy.ConclusionAutonomy without an evidence trail turns every incident into a story someone has to reconstruct by hand. A dashboard may show that the model was fast. It cannot tell you whether the agent acted safely, used the correct context, or achieved a verifiable result.Agent observability changes the standard. It asks systems to preserve the artifacts that matter: intent, state, decisions, actions, proof, and ownership.That is not bureaucracy around the agent. It is the feedback channel that lets a harness recover, a loop converge, a graph coordinate, and an operator trust the result.ReferencesOpenTelemetry: Inside the LLM Call, GenAI Observability with OpenTelemetryLangChain: Agent observability powers agent evaluationAnthropic: Demystifying evals for AI agentsAnthropic: How we built our multi-agent research systemAgent Observability Is Not Logging: The Evidence Layer Production Agents Need was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.