Skip to main content
Veritrix integrates seamlessly with the OpenAI Agents SDK, giving you full observability into your agent workflows the moment you call trace.init(). Whether you’re building single-agent assistants or orchestrating multi-agent pipelines with handoffs, every LLM call, tool execution, and retry is captured automatically — no bespoke wrappers or manual instrumentation required.

Prerequisites

  • Python 3.9 or higher
  • An active Veritrix account and API key
  • OpenAI Agents SDK installed (openai-agents or the openai beta agents package)

Installation & Setup

1

Install Veritrix and the OpenAI Agents SDK

2

Initialize Veritrix tracing

Call trace.init() once at the entry point of your application, before any agent or client is constructed.
Replace "support-agent" with a meaningful name that identifies this agent in the Veritrix dashboard.
3

Use the OpenAI client as normal

No further changes are needed. Veritrix patches the OpenAI client automatically after trace.init() is called.

Example Agent

The following example shows a minimal support agent built with the OpenAI Agents SDK. Veritrix traces every step without any additional instrumentation.
Veritrix records the full trace for this interaction — including the model used, prompt tokens, completion tokens, latency, and any tool calls made — and surfaces it in your dashboard in real time.

What Gets Captured Automatically

Once trace.init() is called, Veritrix automatically captures the following telemetry for every run:
Sensitive fields such as prompt content can be redacted before export. See the Audit Export guide for configuration options.

OpenTelemetry Compatibility

Veritrix is built on OpenTelemetry, which means every span it produces is a standard OTel span. If your infrastructure already runs an OTel collector (Jaeger, Honeycomb, Datadog, etc.), Veritrix traces flow into it without any additional configuration.
To route traces to your own OTel collector instead of (or in addition to) the Veritrix backend, see the OpenTelemetry integration page.