Integrating with LangGraph
We make it easy to integrate Judgeval with LangGraph.
By simply adding the JudgevalCallbackHandler
to your LangGraph workflow, you can trace your LangGraph workflow with Judgeval and also see insights from the execution.
We expect you to already be familiar with Judgment and its tools. If you are not, please refer to the Getting Started guide.
Judgeval Callback Handler
The Judgeval Callback Handler is a callback handler that can be used to trace your LangGraph workflow with Judgeval. We automatically trace all node visits, tool calls, and anything else you do in your workflow. We also store some additional fields on the handler that you can use to get more information about the execution:
executed_nodes
: list of node names that have been executedexecuted_tools
: list of tool names that have been executedexecuted_node_tools
: combined list of executions formatted as[node_name, node_name, node_name:tool_name]
When using the JudgevalCallbackHandler, you do not have to add @observe
decorators to your nodes/tools.
Example Workflow
View some of our demo code for more detailed examples.