Our docs got a refresh! Check out the new content and improved navigation. For detailed API reference see our Python SDK docs and TypeScript SDK.
Description
PercivalIntegrations

OpenAI Agents Integration

Colab Notebook

Weather Agent

This example demonstrates how to:

  1. Install openai-agents, Patronus, and OpenTelemetry instrumentations.
  2. Create a weather tool agent and a manager agent that delegates to it.
  3. Trace the entire workflow with Patronus and OpenTelemetry.
# Install required packages
pip install openai-agents \
            openinference-instrumentation-openai-agents \
            opentelemetry-instrumentation-threading \
            opentelemetry-instrumentation-asyncio \
            patronus

Make sure your OPENAI_API_KEY is set in your environment (or configure the agents with another provider) before running this example.

On this page