Skip to main content
You use a specific framework — LangChain, OpenAI Agents, CrewAI — or connect to platforms like GitHub and PagerDuty. Ratri provides thin wrappers that map framework events to Ratri telemetry and guardrails. Pick your framework below. Every integration page shows TypeScript and Python examples with minimal and production metadata variants.

Decision matrix

Your runtimeIntegrationEffort
MCP host (Cursor, Claude Desktop)MCP proxyConfig only
LangChain / LangGraphLangChain~5 lines
OpenAI Agents SDKOpenAI Agents~5 lines
OpenAI / Anthropic tool callsLLM tool callsPer tool call
CrewAI / AutoGen / LlamaIndexCrewAI, AutoGen, LlamaIndexPer step
Vercel AI SDKVercel AIPer generation
GitHub, PagerDuty, Linear, etc.Platform connectorsPer action
Custom agentChoose how to instrumentVaries

Common pattern

All framework integrations follow the same pattern:
  1. Create an Ratri client and call ready()
  2. Open a run with withRun / with_run
  3. Pass the Ratri handler or hooks to your framework inside the run
  4. Framework events are tracked automatically
import ratri from "./ratri.config";
import { RatriCallbackHandler } from "@ratri-sh/sdk/integrations";

await ratri.ready();

const handler = new RatriCallbackHandler(ratri, {
  defaultEnvironment: "production",
});

await ratri.withRun({ inputSummary: "Process request" }, async () => {
  // Pass handler to your framework
  await agent.invoke(input, { callbacks: [handler] });
});

Import paths

import { RatriCallbackHandler, createRatriRunHooks } from "@ratri-sh/sdk/integrations";
// or from main package:
import { withOpenAIToolCall } from "@ratri-sh/sdk";

Framework guides

LangChain / LangGraph

Callback handler and graph node wrappers.

OpenAI Agents

Run hooks for agent lifecycle.

LLM tool calls

OpenAI and Anthropic native tools.

CrewAI, AutoGen, LlamaIndex

Task and step wrappers.

Platform connectors

GitHub, PagerDuty, Linear, observability.

Vercel AI

Generation tracking.