Glostarep

Datadog AI Agent Monitoring Now Supports LangGraph Agents

Datadog AI Agent Monitoring Now Supports LangGraph Agents

Datadog has published a practical guide showing how teams can instrument LangGraph agents using its AI Agent Monitoring feature, part of the broader LLM Observability platform. The guide walks through tracing tool calls, analyzing latency and cost, evaluating output quality, and correlating agent data with APM and infrastructure telemetry. LangGraph agent monitoring, it turns out, requires surprisingly little setup to get right.

AI agents tend to function as black boxes. Without proper instrumentation, it is difficult to trace which tools were called, how long each step took, or why a response came back wrong. Datadog’s AI Agent Monitoring addresses this by enabling full-run traces visualized as flame graphs. Teams can see exact inputs and outputs at each step, including the user’s original prompt, intermediate tool calls, and the final model response.

The sample agent used in the guide integrates Tavily for web search and Amazon SNS for routing output. It runs on a ReAct-style loop with three nodes: an agent node powered by Claude Sonnet 4.6 via Amazon Bedrock, a routing node, and a tools node. The source code is available on GitHub. Enabling monitoring requires only a few lines of Python and two environment variables.

Once traces flow into Datadog, the LLM Observability overview page breaks down errors, latency percentiles, token usage, and cost across all agent runs. Notably, the guide shows that agent spans can run roughly twice as slow as tool spans, meaning latency bottlenecks often live inside the LLM call itself, not in tool execution. This kind of data makes it easier to decide whether to switch models, shorten prompts, or adjust inference parameters like reasoning effort.

Cost tracking works in the same view. Beyond average cost per run, the overview surfaces the most expensive individual LLM calls. This helps catch outliers, requests that trigger excessive retries or context bloat, before they inflate the monthly bill.

LangGraph agent monitoring also includes automated LLM-as-a-judge evaluations. Teams can enable evaluators for tool selection accuracy, argument correctness, output sentiment, topic relevancy, prompt injection, and input toxicity. The guide demonstrates a simple injection test: changing the prompt to request content outside the agent’s guardrails, then watching the evaluators flag the attempt automatically. Teams can set up a Datadog Monitor to alert on high-risk detections with a single click.

Beyond the agent workflow itself, Datadog correlates agent traces with APM, logs, and infrastructure metrics. The trace map in the guide shows the LangGraph application connected to calls to api.tavily.com, Amazon Bedrock, and Amazon SNS. If a run feels slow or incomplete, teams can follow the execution across the full stack, from the model inference step, to the external API call, to the host’s CPU and memory at the time. This makes it far easier to determine whether a problem is a model issue, a tool failure, or a downstream infrastructure event.

The full documentation for AI Agent Monitoring covers additional configuration options, including running traces through APM and enabling agentless mode. For teams moving LangGraph applications toward production, Datadog’s approach offers a complete observability layer, from individual trace spans all the way to fleet-wide cost trends.

Leave a Comment

Your email address will not be published. Required fields are marked *