Wire it in in one or two lines
DoAIRight captures each LLM call’s prompt and response and scores it. Getting those two strings out of your app is the whole integration — and there are exactly two ways to do it.
Which path is mine?
LangChain & LangGraph
Attach one callback handler and every LLM call — across chains, agents, and graph nodes, streaming or not — is captured automatically. No per-call-site edits.
Use it when: Your app is built on LangChain or LangGraph.
Read the guideAny app — direct SDK
Call observe(prompt, response) right where you already have the prompt and the model's reply — next to your logging. Works with any provider SDK, any language over HTTP.
Use it when: You call a model/provider SDK directly, or you're not on LangChain.
Read the guideBoth paths call the same observe() under the hood, both are fire-and-forget, and neither ever throws into your app — a telemetry hook must never break the thing it observes. A single app can use both at once (see below).
A real multi-provider app
A production app we instrumented routes its LLM calls through four providers. Three of them (OpenAI, Google AI Studio, Groq) go through LangChain — so a single callback handler, attached once, captures all three. Its primary provider runs on a vendor SDK directly (no LangChain in that path), where a two-line observe() sits beside the logging it already had. Both sinks run independently, so neither can suppress the other.
The lesson that generalizes: reach for the callback handler wherever LangChain carries the call, and drop a manual observe() everywhere else. The two together cover any codebase — nothing gets missed just because one provider took a different route to the model.
LangChain paths
One DoAIRightCallbackHandler in the callback list → every chain/agent/graph call captured.
Direct-SDK path
One observe() beside the existing log line → the non-LangChain provider captured too.
Before you start
You need a free dar_… key. Sign up, leave “Organization” blank, and Create project on /app/developer mints one (shown once). New here? Start with the Quickstart.