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.Quick Start
Compatibility
| Requirement | Version |
|---|---|
| Python | 3.10+ |
| langgraph | 0.2.0+ |
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
Example: Multi-Agent Delegation via Subgraphs
This example builds a coordinatorStateGraph 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.
Example: Multi-Turn Conversation with Checkpointing
LangGraph’sMemorySaver persists conversation state across turns with the same thread_id. The agent remembers context from previous turns without you managing history manually.
thread_id.
Troubleshooting
Traces not appearing
- Pass the tracer provider - The instrumentor must receive
tracer_provider=tracer.provider:
- Check environment variables - Ensure
HH_API_KEYandHH_PROJECTare set - Initialize before building graphs - Call
instrument()before creatingStateGraphinstances orcreate_agentcalls
Related
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

