TL;DR — AI agent observability in 2026: trace every LLM call, tool call, and reasoning step. Only 5% of agents reach production — observability is why. Spans → traces → threads hierarchy. OpenTelemetry GenAI semantic conventions. Tools: LangSmith, Langfuse, Arize Phoenix, Braintrust, Datadog. 4 pillars: trajectory/tool use, quality/hallucinations, security/policy, cost/latency. Online evaluations on live traffic. Insights agents for pattern discovery. Observability without evaluation is just expensive logging.
AI Agent Observability in 2026: Tracing, Evaluation, and Production Monitoring
You can't monitor agents like traditional software. Inputs are infinite, behavior is non-deterministic, and quality lives in the conversations themselves. Agent observability emerged as a distinct category when production teams realized classic APM wasn't surfacing the failure modes that LLM-driven workflows actually hit.
Key Statistics
| Metric | Value | Source |
|---|---|---|
| Enterprise agents reaching production | 5% | lyzr 2026 |
| Human review capacity | 50-100 traces/hour | langchain 2026 |
| Full manual review at 1K req/day | 10-20 hours daily | langchain 2026 |
| Typical sampling rate for online evals | 10-20% of traces | langchain 2026 |
| OpenTelemetry adoption | Standard for most platforms | confident-ai 2026 |
| LangSmith free tier | 5K traces/month | langchain 2026 |
| LangSmith Plus | $39/seat/month | langchain 2026 |
| Morph Reflex real-time classification | <90ms per turn | morphllm 2026 |
The Observability Hierarchy
| Level | What It Contains | What It Tells You |
|---|---|---|
| Span | One LLM call, tool call, retrieval, or action | Model, tool, duration, cost, status, input, output |
| Trace | Group of spans forming one agent interaction | Full path from request to response, every intermediate step |
| Thread | Group of traces forming one conversation | Multi-turn context, conversation history |
Source: confident-ai (2026).
The Four Pillars of Agent Monitoring
| Pillar | What It Measures | Key Metrics | Why It Matters |
|---|---|---|---|
| Trajectory & tool use | Did the agent pick the right tool? Stay on task? | Reasoning depth, backtracks, tool error rate per tool, loop count, tool selection accuracy | Agent can run every step correctly and still fail at task level |
| Quality & hallucinations | Did the response satisfy the request? Is it grounded? | Task completion, groundedness, answer relevancy, correctness, faithfulness, coherence, hallucination rate | "Returned a message" ≠ "finished the goal" |
| Security & policy | Did the agent stay inside policy? Get jailbroken? | Jailbreak attempts, data exfiltration, policy violations, prompt injection, unauthorized access | Jailbreak traces identically to benign turn |
| Cost & latency | How much did each step cost? How long did it take? | Tokens/step, cost/step, cost/conversation, p50/p95 latency, throughput | Per-span billing can balloon on multi-step agents |
Source: morphllm (2026), confident-ai (2026), codenotary (2026).
Observability Architecture
Source: confident-ai (2026), langchain (2026), codenotary (2026).
Tool Comparison
| Tool | Best For | Pricing | Open Source |
|---|---|---|---|
| LangSmith | LangChain/LangGraph agents | Free 5K traces, Plus $39/seat | No |
| Langfuse | Self-hosted trace store | Free (OSS) + cloud tiers | Yes |
| Arize Phoenix | OTel tracing + custom evals | Free (OSS) + Enterprise | Yes |
| Braintrust | Evaluation-first observability | Free tier + paid | No |
| Datadog Agent Obs | Enterprises with Datadog | Per-use (Datadog pricing) | No |
| AgentOps | Agent-specific debugging | Free tier + paid | No |
| Langtrace | OTel-native tracing | Free tier + paid | Yes |
| Helicone | Cost tracking proxy | Free tier + paid | Yes |
| Morph Reflex | Real-time per-turn monitoring | Custom | No |
| AgentMon | OTel agent monitoring | Custom | No |
Sources: confident-ai (2026), aimultiple (2026), mlflow (2026), digitalapplied (2026), morphllm (2026).
Agent-Specific Metrics
| Metric | What It Measures | Why It Matters |
|---|---|---|
| Reasoning depth | Number of steps before stopping | 156 steps = task too complex or agent thrashing |
| Backtracks | Times agent abandoned a sub-goal | 3 per session = fine; 3 across every session = broken plan |
| Tool error rate (per tool) | Error rate for each specific tool | 32% on a frequently-called tool is critical |
| Loop count | Times agent repeated same action | High loops = agent stuck |
| Failed subgoals | Agent stated it couldn't complete a goal | Cleanest signal of agent limitation |
| Cost per span | Dollars per LLM call, tool call, retrieval | Identifies expensive steps |
| Cost per conversation | Total cost for one interaction | Budget planning |
| Groundedness | Output grounded in tool results? | Detects hallucinations |
| Task completion | Did the agent actually complete the task? | "Returned a message" ≠ "finished the goal" |
| Jailbreak attempts | Adversarial inputs detected | Security monitoring |
Sources: codenotary (2026), morphllm (2026), confident-ai (2026).
Traditional Monitoring vs Agent Observability
| Aspect | Traditional APM | Agent Observability |
|---|---|---|
| Failure type | Mechanical (500 errors, timeouts) | Semantic (wrong answer, hallucination) |
| Failure location | Single call | Multi-step causal chain |
| Behavior | Deterministic | Non-deterministic |
| Input space | Fixed API endpoints | Infinite natural language |
| Quality measurement | System metrics | Conversation quality |
| Cost tracking | Per request | Per span (variable) |
| Reasoning depth | N/A | Critical metric |
| Backtracks | N/A | Critical metric |
| Jailbreak detection | N/A | Required |
| Pattern discovery | Manual search | Automatic clustering |
Source: morphllm (2026), confident-ai (2026), digitalapplied (2026).
Implementation Guide
| Phase | What to Do | Timeline |
|---|---|---|
| 1. Choose platform | LangSmith, Langfuse, Arize, or other based on stack | Week 1 |
| 2. Instrument with OTel | Add tracing to every LLM call, tool call, retrieval | Weeks 1-3 |
| 3. Capture full trajectories | Spans → traces → threads hierarchy | Weeks 2-3 |
| 4. Set up online evals | Auto-evaluate 10-20% of production traces | Weeks 3-5 |
| 5. Add component evals | Score individual spans (tool correctness, groundedness) | Weeks 4-6 |
| 6. Configure monitoring | Cost, latency, error rate, reasoning depth, backtracks | Weeks 4-6 |
| 7. Set up alerts | Cost spikes, latency increases, eval score drops | Weeks 5-6 |
| 8. Create annotation queues | Human review of sampled traces with rubric | Weeks 6-8 |
| 9. Enable pattern discovery | Insights Agent or Patterns for automatic clustering | Weeks 8-10 |
| 10. Build improvement loop | Review → update prompts/tools → re-deploy → monitor | Ongoing |
Best Practices
-
Observability without evaluation is just expensive logging — tracing tells you what happened. Evaluation tells you whether it was good. Both are required. Don't deploy tracing without evaluators (confident-ai 2026).
-
Use OpenTelemetry with GenAI semantic conventions — instrument with OTel and your traces aren't locked to a single vendor. Most platforms now interoperate with OTel (confident-ai 2026).
-
Sample for online evals — evaluating 100% of traces is expensive. Sample 10-20% of production traffic for online evaluation. Use LLM-as-judge for scale, human annotation for quality (langchain 2026).
-
Track agent-specific metrics — reasoning depth, backtracks, tool error rate per tool, and loop count are metrics traditional APM doesn't provide. These are the signals that tell you why an agent is failing (codenotary 2026).
-
Use pattern discovery — don't wait for users to report problems. Insights Agent and Patterns automatically cluster production interactions to find usage patterns, error modes, and edge cases you didn't anticipate (langchain 2026, datadog 2026).
-
Attribute cost per span — cost travels with the span that incurred it. The parent reasoning that orchestrated tool calls inherits cost in roll-ups. This shows you exactly which steps are expensive (codenotary 2026).
-
Build annotation queues — human reviewers can assess 50-100 traces per hour. At 1,000 requests per day, full manual review requires 10-20 hours daily. Use annotation queues to make human review efficient (langchain 2026).
-
Connect observability to improvement — the value of observability is in the improvement loop. Review traces → identify failures → update prompts/tools/evals → re-deploy → monitor impact. Repeat continuously (confident-ai 2026).
For related topics, see our autonomous AI agents, AI agent orchestration, AI agent testing, AI agent cost at scale, and AI agent security in production guides.
FAQ
What is the difference between tracing, evaluation, and monitoring for AI agents?
Tracing, evaluation, and monitoring are three distinct layers of AI agent observability that work together. Tracing: (1) What it does — captures every action the agent takes: every LLM call, tool call, retrieval, and reasoning step. (2) What it tells you — what happened. The exact sequence of actions the agent took, from user request to final response. (3) Unit — the span. Spans make up traces, traces make up threads. (4) What it doesn't tell you — whether the actions were correct. A trace records a wrong answer as calmly as a right one. (5) Analogy — a flight data recorder. It captures everything that happened but doesn't judge whether it was good. Evaluation: (1) What it does — scores traces and spans against quality metrics you define. (2) What it tells you — whether the agent's actions were good. Was the response relevant? Was the tool selection correct? Was the output grounded? (3) Types — online evals (run automatically on production traffic), offline evals (run on test datasets), component-level evals (score individual spans), end-to-end evals (score final output). (4) What it doesn't tell you — operational metrics like cost and latency. (5) Analogy — a quality inspector. It judges whether the work was done correctly. Monitoring: (1) What it does — tracks operational metrics across thousands of runs: cost, latency, throughput, error rate, reasoning depth, backtracks. (2) What it tells you — what the agent costs and how it performs operationally. Are costs creeping up? Is latency increasing? Are errors ticking up? (3) What it doesn't tell you — why a specific trace failed (that's tracing) or whether the output was good (that's evaluation). (4) Analogy — a dashboard. It shows you the overall health and performance at a glance. How they connect: (1) Tracing provides the raw data — every action captured as a span. (2) Evaluation runs on top of tracing — scoring spans and traces against quality metrics. (3) Monitoring aggregates across traces — showing operational metrics over time. (4) Observability connects all three — and then helps you fix it. The improvement loop: trace → evaluate → monitor → identify issues → update prompts/tools/evals → re-deploy → monitor impact → repeat. The key insight: 'Tracing is what lets you open a single interaction and find the exact step that failed. Monitoring is what tells you errors are ticking up across thousands of runs. Observability is the system that connects the two — and then helps you fix it.' Without tracing, you can't debug individual failures. Without evaluation, you don't know if outputs are good. Without monitoring, you don't know if things are getting worse. All three are required for production agents (confident-ai 2026, langchain 2026, morphllm 2026).
How does LangSmith work for agent observability?
LangSmith is LangChain's agent observability platform, designed specifically for LangChain and LangGraph agents. Here's how it works: Core capabilities: (1) Production tracing — captures every LLM call, tool call, retrieval, and reasoning step as spans. Traces group into threads for multi-turn conversations. You see the full trajectory from user request to final response. (2) Online evaluations — set up evaluators that run automatically on production traces. Configure which traces to evaluate (all, sampled 10-20%, or filtered subsets) and what metrics to check (coherence, tone, safety, compliance, format validation, topic classification). (3) Annotation queues — present specific runs in a structured format with a predefined rubric for human review. Makes human review efficient: reviewers assess 50-100 traces per hour instead of hunting through logs. (4) Insights Agent — automated clustering system that groups similar traces to identify: usage patterns (most common request types), error modes (common failure patterns like incorrect tool selection, retrieval failures, misunderstanding intent), edge cases (unexpected queries users are sending). Prioritizes improvements by frequency and impact. (5) Polly AI Assistant — natural-language trace debugging. Ask questions about your traces in plain English: 'Why did this agent fail?' or 'What are the most common errors?' (6) Topic clustering — automatic behavior categorization. Groups traces by topic without manual labeling. Advanced features: (1) Prompt versioning — track prompt changes and their impact on quality. (2) A/B testing — compare different prompts, models, or configurations. (3) Datasets — create test datasets from production traces for offline evaluation. (4) Custom evaluators — write your own evaluation logic for domain-specific quality metrics. (5) Integration with LangGraph — native support for LangGraph's graph-based workflows, including state transitions and HITL checkpoints. Pricing: free tier (5K traces/month), Plus ($39/seat/month), Enterprise (custom). Some advanced features (Polly, Insights Agent, topic clustering) are gated behind Plus or Enterprise plans. When to use LangSmith: (1) You're using LangChain or LangGraph — native integration, best experience. (2) You need production tracing with online evaluation — LangSmith's eval pipeline is mature. (3) You want pattern discovery — Insights Agent automatically finds issues you didn't know about. (4) You need annotation queues — efficient human review of production traces. When not to use LangSmith: (1) You're not using LangChain — while LangSmith works with other frameworks, the integration isn't as seamless. (2) You need open-source — LangSmith is proprietary. Use Langfuse instead. (3) You need OpenTelemetry-native — use Arize Phoenix or Langtrace. (4) You're already on Datadog — use Datadog Agent Observability for integration with existing dashboards. The key: LangSmith is the most mature agent observability platform for LangChain/LangGraph users. If you're in that ecosystem, it's the natural choice (langchain 2026, mlflow 2026, digitalapplied 2026).
What is OpenTelemetry for AI agents and why does it matter?
OpenTelemetry (OTel) is the open standard for traces, metrics, and logs. For AI agents, OTel has been extended with GenAI semantic conventions — a community standard that covers model calls, agent spans, and tool calls. It matters because it provides vendor-neutral portability for agent observability. What OTel does for agents: (1) Standardized spans — OTel's GenAI semantic conventions define standard attributes for AI agent spans: model name, token count (input/output), cost, tool name, tool arguments, tool result, retrieval query, retrieved documents. Every platform that supports OTel uses the same attribute names, making traces portable. (2) Vendor neutrality — instrument with OTel and your traces aren't locked to a single vendor's backend. You can send traces to LangSmith, Langfuse, Arize, Datadog, or any OTel-compatible backend. Switch backends without re-instrumenting. (3) Interoperability — most agent observability platforms now build on or interoperate with OTel. Langfuse, Arize Phoenix, Langtrace, AgentMon, and Datadog all support OTel. This means you can use multiple tools with the same instrumentation. (4) Integration with existing infrastructure — if your organization already uses OTel for service observability, agent traces integrate with your existing trace backend, dashboards, and alerting. (5) Community standard — OTel is governed by the Cloud Native Computing Foundation (CNCF), not by any single vendor. The GenAI semantic conventions are a community standard that evolves based on industry needs. How to use OTel for agents: (1) Instrument your agent — add OTel spans to every LLM call, tool call, retrieval, and action. Use the GenAI semantic conventions for attribute names. (2) Send traces to an OTel-compatible backend — Langfuse, Arize Phoenix, Datadog, Jaeger, or any OTLP-compatible backend. (3) Use an LLM-native SDK for semantic richness — many teams use OTel as the transport layer and an LLM-native SDK (like LangSmith's or Langfuse's) for the semantic richness on top. You don't have to choose just one. (4) Query and analyze — use your backend's query tools to search, filter, and analyze traces. OTel benefits for agents: (1) Portability — switch observability platforms without re-instrumenting. (2. No vendor lock-in — your traces are in a standard format, not a proprietary one. (3) Integration — agent traces integrate with existing service observability. (4. Community-driven — the standard evolves based on industry needs, not vendor priorities. (5) Future-proof — as new tools and platforms emerge, they'll support OTel. OTel limitations: (1) Semantic richness — OTel provides the transport layer but doesn't provide agent-specific evaluation. You need an LLM-native SDK or platform for evaluation. (2) Setup complexity — OTel requires an OTLP collector, trace store, and indexing. Some platforms (AgentMon) handle this for you. (3) GenAI conventions are evolving — the GenAI semantic conventions are relatively new and may change as the community refines them. The key: 'Most platforms now build on or interoperate with OpenTelemetry. Instrument with OTel's GenAI semantic conventions and your traces aren't locked to a single vendor's backend.' If you're building agents, use OTel for instrumentation. It gives you portability, interoperability, and future-proofing (confident-ai 2026, codenotary 2026, digitalapplied 2026).
How do I evaluate AI agent quality in production?
Evaluating AI agent quality in production requires multiple approaches because human review doesn't scale and mechanical metrics don't capture quality. Here's the complete approach: (1) Online evaluations — set up evaluators that run automatically on production traces. Configure: which traces to evaluate (all, sampled 10-20%, or filtered subsets), what metrics to check. Types of online evals: (a) Reference-free quality metrics — coherence, tone, helpfulness. Don't require a ground truth answer. (b) Safety and compliance — does the response contain sensitive information, violate policies, or exhibit harmful behavior? (c) Format validation — does the output follow expected structures or contain required elements? (d) Topic classification — what categories of requests are users making? (2) LLM-as-judge — use LLMs to assess quality at scale. LLMs aren't perfect evaluators, but they can assess many quality dimensions at a scale that humans cannot. Use a strong model (GPT-4o, Claude Opus) to evaluate outputs from your production agent. Configure the judge with a rubric: 'Score this response on a 1-5 scale for relevance, correctness, and helpfulness.' (3) Component-level evaluations — score individual spans, not just the final output: (a) Tool correctness — did the agent call the right tool with the right arguments? (b) Context relevancy — did the retrieval return relevant documents? (c) Answer faithfulness — is the response faithful to the retrieved context? (d) Step correctness — was each reasoning step correct? (4) End-to-end evaluations — judge the agent's final answer against the user's request: (a) Was it relevant? (b) Was it correct? (c) Was it faithful? (d) Did it complete the task? (5) Human annotation queues — for quality that LLMs can't reliably assess: (a) Present specific runs in a structured format with a predefined rubric. (b) Reviewers assess 50-100 traces per hour. (c) Use for: complex reasoning quality, brand voice, domain expertise, edge cases. (d) Sample 1-5% of production traces for human review. (6) Offline evaluations on datasets — create test datasets from production traces: (a) Export interesting traces (failures, edge cases, common patterns). (b) Create a test dataset with known-good answers. (c) Run the agent against the dataset after each change. (d) Track quality over time. (7) Insights Agent / pattern discovery — automatically cluster production interactions to find: (a) Usage patterns — what are the most common request types? (b) Error modes — where is the agent making mistakes? (c) Edge cases — what unexpected queries are users sending? (8) Eval-gated deployment — don't deploy changes that reduce quality: (a) Run offline evals on test dataset before deploying. (b) If eval scores drop, block deployment. (c) Deploy only when eval scores improve or stay the same. The evaluation challenge: 'In production, you might be handling thousands or millions of interactions. Human reviewers can meaningfully assess 50-100 traces per hour, but at 1,000 requests per day, full manual review would require 10-20 hours of dedicated human time, daily.' The solution: combine LLM-as-judge (scale) with human annotation (quality) with online evals (automation) with pattern discovery (insights). The key: 'Observability without evaluation is just expensive logging.' Evaluation is the layer that turns raw traces into a quality signal. Without it, you're collecting data but not gaining insight (langchain 2026, confident-ai 2026, morphllm 2026).
What is the Reasoning Explorer and why do I need it?
The Reasoning Explorer is an agent-specific observability feature that surfaces reasoning patterns traditional APM tools completely miss. It is available in platforms like AgentMon and similar agent-native monitoring tools. What the Reasoning Explorer shows: (1) Longest reasoning chains — answers 'which agents are thinking too hard about what they're doing?' A chain of 154 reasoning steps for a specific agent is not a bug per se, but it is a strong signal that either (a) the task was actually too complex for one session and should have been decomposed into subtasks, or (b) the agent didn't have the tools it needed and was thrashing — trying different approaches without making progress. (2) Most backtracks — the canary for stuck agents. A backtrack is when the model abandons a sub-goal and starts over on something else. Three backtracks in one session is fine. Three backtracks across every session for a given agent suggests the agent's plan-of-record is broken — it consistently starts down a path that doesn't work. (3) Failed subgoals — the cleanest possible signal. The agent set out to do something, and it told us, in its own intermediate reasoning, that it could not. This is the agent explicitly stating failure, not just taking too long or making errors. (4) First thought duration — how long the agent's first reasoning step took. A first thought that took 19 minutes and 38 seconds is a signal that the agent is overthinking the initial step, possibly because the task is ambiguous or the system prompt is too complex. (5) Tool call timing — when the first tool call happened and how long it took. A WebSearch that ran in 164ms after a 19-minute first thought shows the agent spent most of its time reasoning before acting. Why you need it: (1) Traditional APM gives you rate, errors, duration, and saturation. For a stateless HTTP service, that's most of what you need. For an agent, you need those plus reasoning depth, backtracks, and tool error rate per tool. (2) Agent failures are often in the reasoning path, not in mechanical errors. An agent that takes 156 steps and still fails is a different problem from an agent that fails in 4 steps. The Reasoning Explorer shows you which agents are thinking too hard, which are stuck, and which are explicitly failing. (3) Cost correlation — reasoning depth correlates with cost. An agent that takes 156 steps costs more than one that takes 4 steps. The Reasoning Explorer shows you which agents are burning tokens on excessive reasoning. (4) Task decomposition signals — if an agent consistently needs 100+ steps, the task should be decomposed into subtasks handled by specialist agents. The Reasoning Explorer identifies this pattern. (5) Plan-of-record debugging — if an agent consistently backtracks, its plan is broken. The Reasoning Explorer identifies which agents have broken plans, so you can fix the system prompt or tool descriptions. How to use it: (1) Monitor reasoning depth across all agents — identify outliers (agents with significantly more steps than average). (2) Track backtracks per agent per session — identify agents with consistently high backtrack rates. (3) Watch for failed subgoals — these are explicit failure signals that need immediate attention. (4) Correlate reasoning depth with cost and quality — are longer reasoning chains producing better results? If not, the agent is thrashing. (5) Set alerts — alert when any single run exceeds 20 reasoning steps or 5 backtracks. The key: 'This is the part of AI agent performance monitoring you have not seen in any APM tool you've used before.' The Reasoning Explorer provides visibility into agent reasoning patterns that traditional monitoring completely misses. For production agents, this visibility is essential for debugging failures, optimizing costs, and improving quality (codenotary 2026, morphllm 2026).
Want a self-hosted AI company brain that does all of this out of the box?
Book a demo →