Skip to main content
When Tracevell traces a LangGraph run, it records the graph’s structure along with the run: every node and every edge, with conditional edges marked. Open the trace and click Show LangGraph in the trace view to see the graph next to the spans of the run.
Example trace with LangGraph visualization and arrow indicating the location of the button to enable trace visualization

Set up

Graph visualization comes with the LangChain and LangGraph integration. There’s nothing to add to your graph code.
Pass the @langchain/langgraph module as langgraphModule, next to the other LangChain modules in instrumentModules:
instrumentation.ts
Without langgraphModule, the graph’s runs are still traced, but the trace has no graph to show.
Then invoke or stream any compiled graph as usual. For a complete agent with a tool node, see the LangChain and LangGraph getting started.

What the trace contains

  • The graph is recorded on the run’s root span, so a trace has one graph view. A subgraph run inside a node doesn’t replace the outer graph.
  • Every node that runs is an execute_task <node> span under the graph’s root, with its input and output state, so the graph view and the span list describe the same run.
  • Tool calls and LLM calls made inside a node nest under that node’s span. See What Tracevell records for the full span list.