Skip to content

Frameworks

Overturn has two ways in. Pick by how much of the trajectory you need to replay.

PathRecordsReplay
SDK wrappers (ov.wrapOpenAI, ov.wrapAnthropic, ov.aiMiddleware(), ov.tool())every model call with its exact request, every tool call with arguments and result, fingerprintsstep and trajectory
OpenTelemetry (/v1/traces, OTLP/HTTP)whatever your instrumentation puts on the spansstep; trajectory where tool spans carry results
import { generateText, wrapLanguageModel } from "ai";
const model = wrapLanguageModel({ model: openai("gpt-4.1-mini"), middleware: ov.aiMiddleware() });

Tools declared with ov.tool() are recorded with fingerprints; generateText/streamText calls become model steps.

LangChain, LlamaIndex, CrewAI, AutoGen, …

Section titled “LangChain, LlamaIndex, CrewAI, AutoGen, …”

Use the framework’s OpenTelemetry instrumentation and point it at Overturn. With OpenLLMetry (Python or JS):

Terminal window
pip install traceloop-sdk
export TRACELOOP_BASE_URL=https://api.overturn.run # the SDK appends /v1/traces
export TRACELOOP_HEADERS="authorization=Bearer%20ov_live_…" # value is URL-encoded: %20 for the space
export TRACELOOP_METRICS_ENABLED=false # Overturn ingests traces only
from traceloop.sdk import Traceloop
from traceloop.sdk.decorators import workflow, tool
Traceloop.init(app_name="my-agent", disable_batch=True) # before importing the framework
@tool(name="lookup_customer") # becomes a tool recording with arguments + result
def lookup_customer(email: str) -> dict: ...
@workflow(name="triage") # becomes the run; app_name is the agent
def triage(ticket: dict) -> dict: ...

Verified with OpenLLMetry 0.62 and the OpenAI client: the run shows the tool recording with a fingerprint and the model step with the full prompt (replay-ready), and a correction on it replays with a target answer.

Spans with gen_ai.* attributes become model steps; execute_tool spans with gen_ai.tool.call.arguments and gen_ai.tool.call.result become tool recordings. Mark side-effect tools with the span attribute overturn.side_effect = true so replay refuses them. The run page tells you what the trace can prove: replay-ready, partially replayable (tool spans without results) or not replayable.

To correct from inside the framework, call the API directly (POST /v1/corrections) or use the SDK’s ov.correct() next to your framework code: the run id is the trace id.

Raw OpenAI / Anthropic clients in another language

Section titled “Raw OpenAI / Anthropic clients in another language”

POST /v1/ingest takes the same batches the SDKs send; the schema is in /openapi.json. Fingerprints are documented in the fingerprint contract so any language can produce matching ones.