Guide
A LangGraph agent loops through nodes, calls tools and hits the model several times per run. AgentPing rides LangChain's callback system, so one record lands per graph run with the cost, status and output behind it, no graph rewrites.
Install the SDK and point it at your LangGraph agent. One record lands per run with the cost, status, latency and output behind it.
pip install agentping
import agentping
from agentping import AgentPingCallbackHandler
agentping.init(api_key="apk_…", agent="research-graph")
# LangGraph runs on LangChain's callback system, so pass the handler
# in config and every node, tool call and model call is captured.
result = graph.invoke(
{"messages": [("user", "…")]},
config={"callbacks": [AgentPingCallbackHandler()]},
)
The handler captures token usage and cost from the underlying model calls and ties them to one run per graph invocation. Full reference is in the docs.
See the pillars behind these: Spend, Pulse and Verify. For why teams monitor LangGraph with AgentPing, see the LangGraph integration.
Add the SDK, send one run, and watch cost, status and quality land in the dashboard.