Docs/Observability/Trace Graphs

Agent Graphs

For LangGraph agents, a flat observation tree does not always show how the agent moved between steps. The graph view draws the trace as a directed graph: nodes are the agent's graph nodes and edges follow the order in which they ran.

ℹ

The graph appears inside a trace, below the observation tree or timeline, when the trace has graph data. Turn it on or off with Show Graph in the trace view settings menu. It is not a separate page or tab.

What you see

  • Nodes: one per distinct LangGraph node in the trace, plus a start node (__start__, green) and an end node (__end__, red).
  • Edges: the order of execution, by LangGraph step.
  • Selection: click a node to select its observation in the tree. Select an observation to highlight its node. You can zoom in and out.

What the graph needs

The graph is built from two metadata keys on observations:

Metadata keyType
langgraph_nodeNon-empty string, the node name
langgraph_stepNumber, the step index

Observations without both keys are ignored. If no observation in a trace has them, the graph is not shown.

LangGraph adds these keys to the metadata of every run, and the LangChain callback handler in the Python and JS/TS SDKs copies run metadata onto each observation. If you trace LangGraph another way, set the two keys yourself. See LangChain & LangGraph.

⚠

The graph view only understands LangGraph metadata. Agents built with other frameworks, or traced with plain OpenTelemetry, show the observation tree and timeline but no graph.

When to use it

  • Understand control flow: see loops, branches and retries the agent took.
  • Find where it went wrong: spot the node where the agent went off course, then click it to inspect that step.

Next steps

© 2026 ANTS Platform, Inc.Docs v1.0 · Last updated June 2026