Observing Agents and Their Tools
This lesson covers the metrics and traces needed to operate agents and their tools, which request metrics cannot see: which tools agents call, in what order, how often they fail and how agents hand work to each other.
Learning outcomes
After completing this lesson, you will be able to:
- Track tool performance metrics.
- Baseline call patterns and detect changes.
- Trace agents and multi-agent coordination.
Tool performance metrics
Every tool an agent calls is a dependency with its own performance metrics: call count, latency percentiles, error rate, timeouts and the size of the results it returns. Tools implemented as Lambda functions already publish invocation, duration, error and throttle metrics to CloudWatch. The agent layer adds context that those metrics lack, such as the tool name, the agent that called it and whether the agent used the result.
These metrics matter because tool problems spread. A slow tool lengthens every agent session that uses it, and a failing tool makes the agent retry or work around it, which increases token usage and cost and can lead to worse answers. Alarms on tool latency and error rates therefore detect problems that would otherwise appear only as vaguely worse agent behaviour.
Tool metrics to watch
Call pattern tracking and baselines
Call pattern tracking records the sequence of tool calls in each agent session: which tools are chosen for which kinds of request, how many calls a task takes, and whether the same tool is called repeatedly with the same arguments, which signals that the agent is stuck in a loop. Patterns also reveal design problems. A tool that is never called may have a poor description, and a tool called far more often than expected may be compensating for information that should be in the prompt.
Usage baselines record normal patterns for each tool and agent, such as calls per session and the mix of tools used. Monitoring these with CloudWatch anomaly detection flags sudden changes after a prompt, model or tool update, which often indicate an unintended change in agent behaviour that tests did not catch.
The following diagram shows the tool metrics behind a rise in an agent's steps and cost, and the diagnosis.

Reading tool call patterns
Tracing agents and multi-agent coordination
Tool calling observability comes from traces. Amazon Bedrock agent traces show each orchestration step with rationale, tool invocation and observation. Agents built with Strands Agents or hosted on AgentCore Runtime emit OpenTelemetry spans through AgentCore Observability, viewable in CloudWatch, where a session trace shows model calls, tool calls and their timing. Multi-agent coordination tracking follows hand-offs between supervisor and specialist agents, revealing where tasks stall, bounce between agents or are routed to the wrong agent. X-Ray covers the AWS service calls underneath. The following table summarises what to track.
| What to track | Why | Source |
|---|---|---|
| Calls, latency and errors per tool | Find slow or failing dependencies | Lambda metrics; custom tool metrics |
| Tool call sequences per session | Detect loops and poor tool selection | Agent traces; spans |
| Steps and tokens per task | Efficiency and cost | Traces; token metrics |
| Hand-offs between agents | Find routing errors and stalls | Multi-agent traces |
| Deviation from usage baselines | Detect behaviour changes | CloudWatch anomaly detection |
A tool that is never used
After a release, the average number of steps per support task rises from 4 to 9 and token costs double. Tool metrics show that a new lookup_warranty tool is never called while the general search tool is called repeatedly.
Call pattern tracking points to tool selection: the new tool's description does not say when to use it. Rewriting the description and adding an example restores the baseline, which an anomaly detection alarm on steps per task now guards.
What reveals that an agent is looping?
Show answer
Tracking tool call sequences, which show the same calls repeating.
Exam Tips
Remember for the exam
- Measure calls, latency and errors for every tool.
- Track tool call sequences to detect loops and poor tool selection.
- Agent traces and AgentCore Observability spans show each step.
- Baselines plus anomaly detection catch behaviour changes after releases.