AWS Builder Center
Your Agent Is Live. Do You Know What It's Doing? (observability for production agents)

Your Agent Is Live. Do You Know What It's Doing? (observability for production agents)

Your agent passed every eval and it is running in production, but when it breaks at 2 AM, can you see what it did? A practical guide to observability for agentic systems on AWS, covering trajectory tracing, the CloudWatch and Bedrock AgentCore stack, and the four failure modes that never throw an error.

Senior Manager - Industrial AI - Accenture Solutions Pvt Ltd
You proved it works. You know what it costs. Then you shipped it, and now real users are hitting it in ways your eval harness never imagined. At 2 AM a request hangs, the bill ticks up, and a user says the answer was "kind of wrong." Can you actually see what your agent did?
This is the piece most teams skip, and it is the one that decides whether an agent survives contact with production. A practical guide to observability for agentic systems on AWS: what to instrument, how Amazon Bedrock AgentCore and CloudWatch make it tractable, and the four failure modes you will only ever catch once you are watching.

Why agents break your existing monitoring

Traditional APM answers one question well: how long did this request take, and did it error? For an agent, that is almost useless. A response can come back in four seconds with a 200 status and still be a disaster. The agent may have looped six times, called the wrong tool twice, silently dropped half its context, and produced a confident answer built on stale data. Your dashboard shows green.
The unit of observation for an agent is not the request. It is the trajectory: the full sequence of reasoning steps, tool calls, and model invocations that led to the output. If you cannot replay that trajectory after the fact, you cannot debug it. You are guessing.
So the goal of agent observability is simple to state and easy to underinvest in. For any session, you should be able to reconstruct exactly what the agent did, why, what it cost, and where it went wrong.

The three layers you have to instrument

The trajectory (traces). Every step as a span: which tool was called, with what inputs, what came back, how long it took, how many tokens it burned. This is the layer that lets you answer "what actually happened in session X." Without it you are reading tea leaves.
The signals (metrics). The aggregate view. Latency and token usage per step, tool error rates, loop counts, session duration, and cost per resolved task. Metrics tell you something is wrong across many sessions. Traces tell you why in one.
The evidence (structured logs). Prompts, tool responses, and decisions, all threaded with a correlation ID so a single session is reconstructable end to end. When a user reports a bad answer, the correlation ID is what turns a vague complaint into a specific span you can look at.
Miss any one layer and you get a predictable failure. Traces without metrics means you never notice the slow drift. Metrics without traces means you see the spike but cannot explain it. Both without structured logs means you can see the shape of the problem but never the actual prompt that caused it.

How this maps onto AWS

The good news is that most of this is now built in rather than something you hand roll.
Amazon Bedrock AgentCore Observability gives you trace-level visibility into every agent invocation. It emits distributed traces, span-level logs, and metrics in OpenTelemetry format, all routed to Amazon CloudWatch by default under the  bedrock-agentcore  namespace. Out of the box you get session count, latency, duration, token usage, and error rates, plus step-by-step visualization of the execution path so you can inspect intermediate outputs and find the bottleneck.
One prerequisite people trip on: you have to enable CloudWatch Transaction Search for the account before any of this data starts flowing. Turn it on first, or your dashboards will sit empty and you will assume the feature is broken.
CloudWatch GenAI Observability sits on top and gives you an out-of-the-box dashboard across the whole application, not just the runtime. It covers AgentCore's Built-in Tools, Gateway, Memory, and Identity components, and it works with the common frameworks, so if you are on Strands Agents, LangGraph, or LangChain the telemetry lands in the same place. For deep debugging, CloudWatch Logs Insights queries let you slice the trace data, and each query usually returns in a couple of minutes.
Because everything is OTEL native, you are not locked in. The same telemetry exports cleanly to Datadog, Grafana, Dynatrace, Arize Phoenix, Langfuse, or LangSmith if your org already lives in one of those. Instrument once, route anywhere.

The four failure modes you only catch in production

These are the ones that never show up in your eval suite because they need real traffic, real time, and real data drift to appear.
1. The silent loop. The agent retries or re-plans a few extra times, eventually returns a correct answer, and fires no error. Nothing looks wrong except latency crept up and the token count doubled. You catch this by trending step count and duration per intent, not by watching for exceptions. The loops that hurt you are the ones that succeed.
2. Tool degradation. A downstream tool starts returning empty results, stale data, or slow responses. The agent does not crash. It quietly reasons over bad input and hands back a confident, wrong answer. Watch tool-level latency and error spans, and log the actual tool responses, so you can see the moment a tool went soft rather than the moment it fully failed.
3. Trajectory drift. The same task that took four steps at launch takes nine steps a month later, because the prompts, the data, or the underlying model behavior shifted. No single request looks broken. The step-count-per-intent trend is what exposes it, and it is usually the earliest warning that quality is sliding.
4. Context erosion. In long or multi-turn sessions, context gets truncated, and answer quality drops late in the session while looking fine early. Token usage and memory spans are your tell here. If the token curve flattens at a ceiling and quality dips after it, you are losing context, not reasoning worse.
Notice the pattern. Three of the four never raise an error. That is the whole point. Agent failures are mostly quiet, and observability is how you make them loud.

Closing the loop

Observability is not a separate discipline bolted onto the end. It is what makes the earlier stages compound.
Every production trace that turned out badly is a free eval case. Pull it back into your regression suite and the harness you built for "does my agent work" gets sharper with every real failure. Every token-usage metric feeds straight into your cost-per-resolved-task view, so the spend story and the behavior story sit in the same dashboard. Secure it, prove it works, know what it costs, and now watch it. That is the loop.
You cannot fix what you cannot see. And with agents, most of what breaks is invisible by default until you decide to look.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article