Skip to main content
To trace LangGraph with HoneyHive, install honeyhive[openinference-langchain], call HoneyHiveTracer.init(), run LangChainInstrumentor().instrument(tracer_provider=tracer.provider), and use your existing LangGraph code unchanged. See the tracing quickstart and tracer initialization guides for setup details. LangGraph is a framework for building stateful, multi-step agent workflows as graphs. It provides StateGraph for custom control flow, conditional routing, subgraph composition, and checkpointing. HoneyHive integrates with LangGraph via the OpenInference LangChain instrumentor (LangGraph builds on LangChain under the hood), automatically capturing graph execution, node transitions, and LLM calls.
Same instrumentor as LangChain. If you’ve already set up LangChain instrumentation, LangGraph graphs are automatically traced too. For the simpler create_agent pattern without custom graphs, see the LangChain integration.

How do I trace LangGraph with HoneyHive?

Add HoneyHive tracing in just 4 lines of code. All graph nodes, edges, and LLM calls are automatically traced.
Last tested with langgraph 1.1.6 (April 2026).

Tested Versions

LangGraph uses the same instrumentor as LangChain; versions are kept in sync across both pages. As of April 2026: Requires Python 3.11+. See the LangChain integration for the Traceloop alternative - the same opentelemetry-instrumentation-langchain package also traces LangGraph.

What Gets Traced

The instrumentor automatically captures:
  • Graph execution - Each graph.invoke() with inputs and outputs
  • Node transitions - Individual node execution and state changes
  • Subgraph spans - Nested agent invocations within coordinator graphs
  • LLM calls - Model requests, responses, and token usage within nodes
  • Conditional routing - Which branches the graph takes
  • Tool calls - Arguments and results for each tool execution
No manual instrumentation required.

Example: Multi-Agent Delegation via Subgraphs

This example builds a coordinator StateGraph that classifies customer questions and delegates to specialist agents built with create_agent. This is the core LangGraph pattern: combining the graph API with agent subgraphs.
In HoneyHive, you’ll see the full execution hierarchy: coordinator graph, classify node, routing decision, specialist subgraph agent with tool calls, and LLM spans within each node.

Example: Multi-Turn Conversation with Checkpointing

LangGraph’s MemorySaver persists conversation state across turns with the same thread_id. The agent remembers context from previous turns without you managing history manually.
Each turn produces a separate trace in HoneyHive, but the agent maintains conversation history across turns via the shared thread_id.

Troubleshooting

Traces not appearing

  1. Pass the tracer provider - The instrumentor must receive tracer_provider=tracer.provider:
  1. Check environment variables - Ensure HH_API_KEY is set
  2. Initialize before building graphs - Call instrument() before creating StateGraph instances or create_agent calls

LangChain Integration

Simple create_agent patterns without custom graphs

Enrich Your Traces

Add user IDs and custom metadata to LangGraph traces

Custom Spans

Create spans for business logic around graph calls

Distributed Tracing

Trace graphs across service boundaries

Resources