AI Agent Observability with OpenTelemetry OpenTelemetry, a CNCF graduated project, provides vendor-neutral tracing, metrics and logs that engineers can use to capture each step of an AI agent's execution path, according to an explainer on AI agent observability. The piece argues that agents chain multiple non-deterministic LLM calls, so a single user request can spawn dozens of internal steps, making silent failures, unpredictable cost and latency, and run-to-run variance hard to diagnose without full tracing of tool selection, context and model outputs. AI Agent Observability with OpenTelemetry AI agents don't just call a model and return its response. Instead, they orchestrate entire workflows that involve selecting tools for LLMs to use, evaluating guardrails, routing between LLM calls, and managing context across conversation turns. This means that a single user request can spawn dozens of internal steps, each one a potential point of failure, latency, or unexpected cost. AI agent observability is the practice of capturing these execution flows so you can understand what the agent did, why it chose that path, and how it performed. In practice, this means tracing an agent run's execution path, capturing inputs and outputs at each step, and tracking cost, token usage, latency, and error rates. AI agent tracing builds the foundation for AI agent observability. Without tracing, debugging an AI agent becomes a game of trying to guess which event triggered what decision in the agent workflow, and why. Why do AI agents need observability? A request can return successfully while the agent gives an incorrect answer, takes too long on a particular step, or triggers duplicate LLM or tool calls. Agent observability gives engineers the evidence to investigate these problems and compare behavior across runs. Let's look at some of these problems in more detail. LLM non-determinism compounds across agent steps A single LLM call is already non-deterministic: the same prompt can produce different outputs across runs. Agents amplify this because they chain multiple LLM calls together, where the output of one step determines the input of the next. This means variance doesn't just exist at one point. Rather, it compounds across the workflow. A slightly different model response in step one can cause the agent to select a completely different tool in step two, which changes the context passed to step three, and so on. Reproducing a specific agent run becomes nearly impossible without capturing the full execution path. Agents can silently produce incorrect results Traditional software can also return incorrect results without throwing an error. With agents, these failures can be harder to catch because each run can take a different path: the workflow completes without any error, but the agent selected the wrong tool, retrieved stale context, or returned a response that is confidently incorrect. Without observability, these silent failures only surface when a user complains or when downstream systems consume bad output. Tracing each decision in the agentic loop, such as which tool was selected, what context was available, what the model actually returned, is the only reliable way to evaluate whether an agent's "successful" run was actually logically correct. Cost and latency are unpredictable by design Agents decide at runtime how many tools to call and how many LLM roundtrips to make. A simple user query might resolve in one LLM call, while a similar query might trigger several tool calls and model invocations depending on the agent's reasoning. This makes cost and latency inherently unpredictable. Observability lets engineers track token usage, tool call frequency, and per-step latency across runs to identify expensive patterns early. For example, if two models with different pricing tiers perform comparably for a given workload, engineers can switch to the cheaper option — but only if they have the data to make that comparison. How does OpenTelemetry enable AI agent observability? OpenTelemetry https://signoz.io/opentelemetry/ OTel is a CNCF graduated project for instrumenting applications to emit telemetry data primarily traces, metrics, and logs https://signoz.io/blog/three-pillars-of-observability/ in a vendor-neutral format. What makes it uniquely suited for agentic applications is that your visibility extends beyond the AI agent to the entire request: what endpoint did the user call, what DB queries ran, were any background jobs enqueued, did the application make any downstream API calls? Setting up AI agent observability with OpenTelemetry Prerequisites - Python 3.12 or newer. Download the latest version https://www.python.org/downloads/ . - A SigNoz Cloud account https://signoz.io/teams/ for visualizing telemetry data. - An OpenAI API key https://platform.openai.com/api-keys to run the agent. - An API client like Bruno https://www.usebruno.com/ or Postman https://www.postman.com/ to test endpoints. Setting up SigNoz Cloud SigNoz Cloud is an OpenTelemetry-native observability platform that unifies traces, metrics, and logs in a single interface. - Sign up https://signoz.io/teams/ for a free SigNoz Cloud account. - Follow the documentation https://signoz.io/docs/ingestion/signoz-cloud/keys/ to generate an ingestion key. - Keep your workspace region e.g., us , in , eu and ingestion key handy for the application configuration. Running the Demo Application Clone and navigate to the demo application: git clone --filter=blob:none --sparse https://github.com/SigNoz/examples.git git -C examples sparse-checkout set python/otel-ai-agent-observability-demo cd examples/python/otel-ai-agent-observability-demo Create and activate a Python virtual environment: python3.12 -m venv .venv source .venv/bin/activate Install the application and OpenTelemetry Python https://signoz.io/opentelemetry/python/ dependencies: pip install -r requirements.txt The requirements.txt file https://github.com/SigNoz/examples/blob/main/python/otel-ai-agent-observability-demo/requirements.txt pins the following OTel packages: - opentelemetry-distro : Provides a convenient mechanism to configure some of the more common options for Python auto-instrumentation. - opentelemetry-exporter-otlp : Installs the OTLP exporters https://signoz.io/blog/what-is-otlp/ needed to deliver telemetry data to any OpenTelemetry-compatible backend https://signoz.io/blog/opentelemetry-backend/ . - opentelemetry-instrumentation-genai-openai and opentelemetry-instrumentation-genai-openai-agents : Modern OpenAI Agents and OpenAI Python API instrumentation packages from the dedicated OpenTelemetry GenAI repository https://github.com/open-telemetry/opentelemetry-python-genai . Next, run opentelemetry-bootstrap to detect widely used Python libraries like the FastAPI web framework https://signoz.io/blog/opentelemetry-fastapi/ and HTTPX client library and install their corresponding instrumentation packages: opentelemetry-bootstrap --action=install Start the application using opentelemetry-instrument to automatically instrument our application, including the AI agent workflow: OPENAI API KEY="