Skip to content

Observe your agent

Once an agent leaves your laptop, the loop you watched in the terminal runs where you cannot see it. Observability is how you get that view back: the SDK emits traces of every model and tool call, performance metrics for each run, and logs from its own operation, all through OpenTelemetry so the data lands in the tools you already run. You reach for it to debug why a run went wrong, measure how fast and how expensive it is, and watch for regressions as you ship changes.

The smallest step is to export traces. Configure an exporter before you create the agent, and every model and tool call it makes is captured as a span. Sending spans to the console needs no collector, so it is the fastest way to confirm tracing works before you point it at a production backend.

from strands import Agent
from strands.telemetry import StrandsTelemetry
# Print every span to the console; add setup_otlp_exporter() to ship to a collector
StrandsTelemetry().setup_console_exporter()
agent = Agent()
agent("What is agent observability?")

Swap the console exporter for an OTLP exporter to send the same spans to Jaeger, Grafana Tempo, AWS X-Ray, Datadog, or any OpenTelemetry backend.

New to agent observability? Start with Observability foundations for the primitives and the framework, then turn on tracing to see a real run end to end. From there, add metrics for performance and cost and logs for SDK-level detail.

Watching an agent tells you what it did; measuring quality tells you whether it did the right thing. When you are ready to score behavior against a dataset, move on to evaluation.