Question-led guide · diagnostic

Why the final answer is not enough to observe an AI agent

A practical model for observing agent decisions, tool effects, evidence, cost, policy checks, and uncertainty instead of logging only the response text.

Direct answer

The final answer is only one output of an agent run. It cannot reveal which instructions were active, what evidence the agent retrieved, which tools changed external state, where retries occurred, how much the run cost, or why the agent stopped. Useful observability preserves a causal run record: stable identities, model and policy versions, decisions, tool attempts and results, evidence references, resource use, outcome, and explicit uncertainty—while keeping sensitive content out of ordinary telemetry.

Scope

Use this guide when an agent can call tools, retrieve evidence, retry work, or affect an external system. A single-turn text assistant with no tools still benefits from model, prompt, latency, token, and outcome records, but the run envelope becomes essential once several components can change the result.

Why it happens

Teams often begin with an application log containing the user request and the generated answer. That seems adequate during a demo because a person can watch the interaction. In production, the answer hides the path that produced it. Two identical answers may have used different evidence, model versions, tools, policies, or amounts of computation. A polished answer may follow a failed write, and a poor answer may come from correct reasoning over incomplete data.

The opposite reaction—logging every prompt, document, and tool payload—creates a security and privacy liability without guaranteeing useful diagnosis. Observability requires a designed record, not indiscriminate capture.

Diagnosis

Take one failed run and ask whether the current telemetry can answer these questions:

  1. Which user, tenant, workflow, agent, model, prompt, policy, and tool versions were active?
  2. What outcome was requested, and how was success determined?
  3. Which evidence items were retrieved, admitted, rejected, or unavailable?
  4. Which decisions changed the execution path?
  5. Which tool calls were attempted, authorized, retried, committed, or rolled back?
  6. What latency, token, request, and monetary costs accumulated by step?
  7. Why did the run stop, escalate, abstain, or declare success?
  8. Can an investigator reproduce the important queries without exposing hidden content?

Every unanswered question is an observability gap. Rank gaps by operational consequence rather than by how easy the field is to add.

Solution

Create a run envelope with one stable run_id and child operation identifiers. Record immutable version references for the agent, model, prompt template, policy bundle, retrieval index, tool contract, and evaluator. Represent tool attempts separately from tool effects so a timeout cannot be mistaken for a failed write or a successful retry for two independent effects.

Use structured evidence references. A reference should identify the source, version or retrieval time, query, access boundary, and relevance decision. Keep evidence lineage separate from the model’s summary of that evidence.

Record outcome at more than one level: execution completed, output passed a grader, tool effect was confirmed, and the user or business objective was achieved. These are not synonyms.

Finally, apply data minimization. Prefer classifications, hashes, counts, and pointers to protected stores. Treat prompt and completion content as potentially sensitive payloads with separate access and retention controls.

Artifact

Download the versioned Agent Run Envelope JSON Schema. Use it as a boundary object between agent runtime, telemetry pipeline, incident tooling, and offline evaluation. Extend it under a namespaced field rather than silently changing existing meanings.

Common mistakes

  • Logging only the final response and calling the product observable.
  • Treating a tool return value as proof that the intended external effect occurred.
  • Storing raw prompts everywhere because structured fields were not designed first.
  • Reusing one identifier for a user request, an agent attempt, and a tool transaction.
  • Reporting average latency and cost without outcome, model, or task cohorts.
  • Changing field meanings without a schema version or migration rule.

Evidence

  1. A trace models operations and their relationships, so it can represent more than the final response.

    The OpenTelemetry specification defines traces as a signal composed of spans and context that describe operations within a request path.

    Primary source · standard · checked Aug 25, 2026

    Limit: The standard supplies telemetry primitives; it does not decide which agent-specific decisions or evidence must be recorded.

  2. Agent telemetry needs a versioned semantic contract because generative AI conventions continue to evolve.

    The semantic-conventions registry defines generative-AI attributes that implementations can use for interoperable telemetry.

    Primary source · standard · checked Aug 25, 2026

    Limit: Registry coverage and stability vary, and an application still needs local fields for policy, outcome, and business context.

  3. An observable agent run should separate recorded facts, decisions, effects, and evaluation outcomes.

    The Signal Studio run-envelope method preserves these categories so operators can investigate behavior without treating generated prose as a complete audit trail.

    Signal Studio author framework · reviewed Aug 25, 2026

    Limit: This is an author-created operating model and must be adapted to local privacy, retention, and incident requirements.

Limitations

This guide does not prescribe a universal retention policy or make telemetry an audit system. Local privacy law, contractual obligations, model-provider logging, and security classification may require stricter controls.

FAQ

Should prompts and completions be logged in full?
Not by default. Record hashes, classifications, sizes, references, and approved redacted excerpts first; full content needs an explicit purpose, access policy, retention period, and privacy review.
Is distributed tracing alone sufficient?
No. Tracing supplies structure and timing, but useful operations also require outcome labels, policy decisions, evidence lineage, evaluation data, and business or user-impact measures.

Continue within Agent observability, or use one of these adjacent diagnostics:

English editorial review: Codex native-English editorial review, .