Link Search Menu Expand Document Documentation Menu

Agent monitoring

Introduced 3.6

Agent monitoring provides observability for generative AI applications and large language model (LLM) agents. It uses agent traces, which record LLM calls, token usage, tool invocations, and agent reasoning flows following the OpenTelemetry generative AI semantic conventions.

Prerequisites

Agent monitoring requires the following components:

The agent traces workflow

The agent traces workflow consists of the following stages:

  1. Instrument: Add observability to your AI applications:
    • Use the GenAI SDK containing decorators, enrichment functions, and automatic LLM instrumentation for libraries such as OpenAI, Anthropic, Amazon Bedrock, and LangChain.
  2. Normalize: The OpenTelemetry Collector standardizes spans using generative AI semantic conventions, ensuring consistent attribute names across providers.

  3. Use local tooling (Optional): Use Agent Health for local debugging, scoring, and evaluation during development.

  4. Process: OpenSearch Data Prepper routes OpenTelemetry Protocol (OTLP) data into OpenSearch, creating service maps, correlating traces, and aggregating metrics.

  5. View: OpenSearch Dashboards displays agent traces as hierarchical trees, directed acyclic graphs (DAGs), and timelines, along with metrics for production monitoring.

Agent traces support the following frameworks and providers:

  • Frameworks: Strands Agents, LangGraph, CrewAI, and the OpenAI Agents SDK.
  • Providers: OpenAI, Anthropic, Amazon Bedrock, LangChain, LlamaIndex, and other LLM providers.

Getting started

To start using agent traces, explore the following topics:

350 characters left

Have a question? .

Want to contribute? or .