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

This guide shows how to instrument OpenAI Agents with Percival/Patronus by installing the required packages and initializing the instrumentor.

pip install patronus
pip install openai-agents
pip install openinference-instrumentation-openai-agents
pip install opentelemetry-instrumentation-threading
pip install opentelemetry-instrumentation-asyncio

Once installed, you can import the following instrumentors:

from openinference.instrumentation.openai_agents import OpenAIAgentsInstrumentor
from opentelemetry.instrumentation.threading import ThreadingInstrumentor
from opentelemetry.instrumentation.asyncio import AsyncioInstrumentor
 
import patronus
patronus.init(integrations=[OpenAIAgentsInstrumentor(), ThreadingInstrumentor(), AsyncioInstrumentor()])

On this page

No Headings