Summarize with AI:
Getting an AI agent to work in a playground is one thing. Getting it to behave reliably in production is another.
In a controlled environment, an interaction can look deceptively simple: a user sends a prompt, the model processes it and a response comes back. If the answer looks right, everything appears healthy. But production agents rarely operate that way.
A single user request can trigger retrieval, multiple tool calls, retries, model reasoning, token consumption and other intermediate steps before an answer ever reaches the user. And many of those steps can fail without generating a conventional error.
That creates a new observability challenge for teams putting LLM-powered applications and agents into production.
In a playground, the flow often looks like this:
Prompt → LLM call → Response
One request comes in. One response goes out. Success looks like success. In production, the same request may involve:
User request → Retrieval → Tool calls → Reasoning → Token consumption → Output
Now imagine that the retrieval step returns stale context. A tool call returns HTTP 200 but silently performs the wrong action. Model reasoning takes several seconds longer than usual. A retry loop consumes far more tokens than expected. The final answer still reaches the user—but its quality has drifted.
From the outside, the request may still appear “successful.” That is the observability gap. Traditional monitoring can tell you whether a service responded. It is much less equipped to tell you whether the agent made the right decisions along the way.
Agent failures do not always look like conventional software failures. They often happen inside an otherwise successful request.
Five failure modes are especially important.
A RAG pipeline can return stale, incorrect or irrelevant information and the model may confidently generate an answer from it.
Traditional APM might record a successful vector database query. What it cannot tell you is whether the retrieved context was actually useful or correct.
An agent may choose the wrong tool, pass incorrect parameters or encounter a tool that fails semantically while still returning a successful status code.
HTTP 200 does not necessarily mean the right thing happened.
To debug these failures, teams need visibility into which tool was selected, why it was called, what inputs it received and what it returned.
Average latency can hide the experiences that matter most.
Your p50 may look healthy while p99 latency reaches 12 seconds on important workflows. In a multi-step agent, a single slow retrieval step or tool call can drag down the entire experience.
Request-level metrics alone make it difficult to identify exactly where that time was spent.
Agentic workflows can consume dramatically different amounts of compute from one run to another.
A reasoning loop might burn tens of thousands of tokens on a single request. Traditional infrastructure dashboards measure things like CPU and memory but concepts such as cost per trace, cost per user, cost per model or token spend per step require a different level of instrumentation.
Perhaps the most difficult failure is one that produces no technical error at all. A model upgrade, prompt change or retrieval adjustment can quietly alter output quality. The application remains online. Requests continue succeeding. But the behavior of the system has changed.
Detecting this kind of regression requires evaluation signals, historical comparison and the ability to replay past runs.
This does not mean traditional APM and logging are broken. They were simply designed for a different application shape. Traditional APM is excellent at understanding stateless HTTP applications. It can show request and response data, status codes, CPU consumption and memory usage.
Log aggregation can add error messages, stack traces and whatever application-specific breadcrumbs developers choose to record.
But agents are stateful, multi-step systems. The most useful information often lives in the relationships between those steps.
For an agentic workflow, teams may need to see:
That is why agent observability needs to treat span-level visibility, evaluation signals and replay as core capabilities rather than optional add-ons.
A useful observability stack for AI agents needs to cover seven areas.
Teams need the complete reasoning path and tool chain for every agent run.
Step-level tracing makes it possible to understand how a request moved through retrieval, model calls and tools—and where something began to go wrong.
Tracing tells you what happened. Evaluations help tell you whether the result was good.
LLM-as-a-judge scoring, golden datasets and regression checks provide a repeatable way to assess quality instead of relying on intuition.
Token spend should be attributable by model, application, user and individual step.
Without that granularity, teams can see total spending rise without knowing which workflow or behavior is responsible.
Teams should be able to examine p50, p95 and p99 latency across individual spans in the agent chain.
That makes it possible to identify whether the bottleneck is retrieval, a particular tool, an LLM call or something else entirely.
Agent behavior changes over time. Models get updated. Prompts change. Tools evolve. Retrieval data changes.
Drift detection helps teams identify meaningful behavioral changes before users become the monitoring system.
A failed trace should be reproducible. Teams need the ability to inspect an individual run, revisit any step and re-run it with changes. That turns an opaque production incident into something developers can investigate systematically.
Production agents also need capabilities that help organizations address risks such as prompt injection, sensitive-data leakage and policy violations.
When agents can access tools and take actions, these controls need to operate during execution rather than only after the fact.
A simple way to assess your current observability maturity is to ask five questions:
Can you trace every agent step?
Without a complete trace, debugging quickly becomes guesswork.
Can you see exactly where a failure occurred?
Retrieval, prompts and tool calls fail in different ways. Your observability system should help distinguish between them.
Can you inspect latency and cost per step?
One slow tool or runaway reasoning loop can damage both the user experience and the budget.
Can you compare runs over time?
As models and prompts evolve, teams need a way to determine whether quality has improved, stayed stable or regressed.
Can you catch drift before users do?
Silent degradation is particularly expensive because it can persist unnoticed. Drift detection turns that degradation into something measurable and actionable.
If the answer is yes to all five, you likely have mature coverage across the most important observability dimensions.
Three or four yeses suggests partial coverage: most incidents may be diagnosable, but some failure classes still depend on manual investigation. Zero to two means the foundation still needs work.
The good news is that you do not need to implement every observability capability at once. The order matters more than the exact timeline.
Start with spans. Instrument every LLM call and every tool call using OpenTelemetry-compatible spans. Capture the prompt, response, tool name, arguments and status for each one.
Then create a basic view that makes problematic traces easy to find—for example, the slowest traces from the past hour. The goal is simple: make the previously invisible execution graph visible.
Once spans exist, add useful dimensions. Tag spans by model, tenant and application. Track token cost on individual LLM spans and alert on unusual spikes rather than only looking at total spend.
Break latency down by p50, p95 and p99 at the span level. Now the team can move from “this request was expensive” to “this specific reasoning step using this model caused the cost increase.”
With tracing and attribution in place, add quality measurement. Build a small golden dataset. Calibrate automated evaluation against human-labelled examples. Run those evaluations during deployments and monitor score distributions over time.
Finally, add replay so developers can select a problematic production trace and re-run individual steps with modifications.
You cannot reliably attribute cost per step without step-level spans. And you cannot detect meaningful quality drift without first establishing a quality signal.
AI agents change the shape of production software. They introduce stateful execution paths, probabilistic behavior, tool decisions, retrieval dependencies, variable token consumption and failures that can remain invisible behind a perfectly ordinary HTTP 200 response.
That means observability must evolve too. The goal is no longer simply to answer, “Did the request succeed?” Teams shipping production agents increasingly need to answer:
The Progress Agent Engineering Platform brings traces, evaluations, cost, latency, drift and replay together to help give teams broader visibility across the lifecycle of an LLM application.
For production AI systems, that step-level visibility can be the difference between discovering a problem in a trace and discovering it from a user.
Lyubomir Atanasov is a Product Manager with a passion for software development, UI design, and design thinking. He excels in creating impactful and innovative software products by challenging the status quo, collaborating closely with customers, and embracing a spirit of experimentation. His dedication to delivering exceptional UI solutions makes him an invaluable asset, providing immense value through his expertise and innovative approach. Follow him on LinkedIn.