Frameworks
Overturn has two ways in. Pick by how much of the trajectory you need to replay.
| Path | Records | Replay |
|---|---|---|
SDK wrappers (ov.wrapOpenAI, ov.wrapAnthropic, ov.aiMiddleware(), ov.tool()) | every model call with its exact request, every tool call with arguments and result, fingerprints | step and trajectory |
OpenTelemetry (/v1/traces, OTLP/HTTP) | whatever your instrumentation puts on the spans | step; trajectory where tool spans carry results |
Vercel AI SDK
Section titled “Vercel AI SDK”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):
pip install traceloop-sdkexport TRACELOOP_BASE_URL=https://api.overturn.run # the SDK appends /v1/tracesexport TRACELOOP_HEADERS="authorization=Bearer%20ov_live_…" # value is URL-encoded: %20 for the spaceexport TRACELOOP_METRICS_ENABLED=false # Overturn ingests traces onlyfrom traceloop.sdk import Traceloopfrom 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 + resultdef lookup_customer(email: str) -> dict: ...
@workflow(name="triage") # becomes the run; app_name is the agentdef 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.