Skip to content

LangGraph

Trace LangGraph stateful agent graphs with full visibility into graph node transitions, LLM calls, and tool use. Extends the LangChain callback protocol with graph-specific node events.

Terminal window
npm install @axonpush/sdk @langchain/langgraph
import { AxonPush } from "@axonpush/sdk";
import { AxonPushLangGraphHandler } from "@axonpush/sdk/integrations/langgraph";
const client = new AxonPush({
apiKey: process.env.AXONPUSH_API_KEY!,
tenantId: process.env.AXONPUSH_TENANT_ID!,
});
const handler = new AxonPushLangGraphHandler({
client,
channelId: 1,
agentId: "my-agent",
});
import { StateGraph } from "@langchain/langgraph";
const graph = new StateGraph({ channels })
.addNode("agent", agentNode)
.addNode("tools", toolNode)
.compile();
const result = await graph.invoke(input, { callbacks: [handler] });
EventWhen
chain.startA chain or runnable begins execution
chain.endA chain or runnable completes
llm.startAn LLM call begins
llm.endAn LLM call completes
llm.tokenA streaming token is received
tool.*.startA tool invocation begins
tool.*.endA tool invocation completes
graph.node.startA graph node begins execution
graph.node.endA graph node completes execution