@braintrust/openai-agents is deprecated. This is the final release. Trace OpenAI Agents SDK runs with the braintrust package instead.
Migration
Install braintrust, then prefer auto-instrumentation: run your app with Braintrust’s import hook (node --import braintrust/hook.mjs) to trace OpenAI Agents SDK runs without changing your code. If you need direct control over trace processor registration, import OpenAIAgentsTraceProcessor from braintrust/instrumentation and register it manually. See the OpenAI Agents SDK integration guide for setup examples.
Installation
API Reference
Classes
OpenAIAgentsTraceProcessor
OpenAIAgentsTraceProcessor is a tracing processor that logs traces from the OpenAI Agents SDK to Braintrust. Args: options: Configuration options including: - logger: A Span, Experiment, or Logger to use for logging. If undefined, the current span, experiment, or logger will be selected exactly as in startSpan. - maxTraces: Maximum number of concurrent traces to keep in memory (default: 1000). When exceeded, oldest traces are evicted using LRU policy.
Source Code
For the complete source code and additional examples, visit the Braintrust JavaScript SDK repository.