Skip to main content
OpenAI Agents SDK is a powerful framework for building AI agents that can interact with tools and APIs. Langtrace now provides native integration with OpenAI Agents SDK, offering full OpenTelemetry (OTEL) compatibility for comprehensive tracing and monitoring of your AI agents.

Setup

  1. Install Langtrace’s SDK and initialize the SDK in your code.
Note: You’ll need API key from Langtrace. Sign up for Langtrace if you haven’t done so already.
Python
  1. Setup environment variables:
Shell

Usage

Here’s a quick example of how to use Langtrace with OpenAI Agents SDK:
Python
You can now view your traces on the Langtrace dashboard, with full OTEL compatibility. traces For more information, check out the OpenAI Agents SDK documentation.