Guide

Monitor your LangChain agents in production.

A LangChain agent or chain runs tools and calls the model in a loop. AgentPing rides the callback system, so one record lands per run with the cost, status and output behind it, no chain rewrites.

Two lines, then every run reports in.

Install the SDK and point it at your LangChain agent. One record lands per run with the cost, status, latency and output behind it.

shellinstall
pip install agentping
pythonmonitor your agent
import agentping
from agentping import AgentPingCallbackHandler

agentping.init(api_key="apk_…", agent="qa-chain")

# Pass the handler in callbacks; every tool and model call is captured.
result = chain.invoke(
    {"question": "…"},
    config={"callbacks": [AgentPingCallbackHandler()]},
)

The handler captures token usage and cost from the model calls and ties them to one run per invocation. Full reference is in the docs.

What AgentPing tracks for LangChain.

  • Cost per chain or agent run, attributed to the customer and feature you tag.
  • A missed-run alert when a scheduled chain stops firing.
  • Output quality on the final answer, scored against your rubric.

See the pillars behind these: Spend, Pulse and Verify. For why teams monitor LangChain with AgentPing, see the LangChain integration.

Does it work with LCEL and agents?
Yes. AgentPingCallbackHandler works anywhere LangChain accepts callbacks: LCEL chains, agents and LangGraph. Pass it in the config callbacks and the run is captured.
Do I rewrite my chains?
No. You add the handler to the callbacks you already pass; nothing about the chain changes.
Will it slow things down?
No. Telemetry runs off the hot path with a hard timeout and a bounded queue.

Monitor your LangChain agents in minutes.

Add the SDK, send one run, and watch cost, status and quality land in the dashboard.