Overview
Quraite provides a built-in adapter for OpenAI Agents. This adapter allows you to integrate OpenAI Agents with Quraite and run evaluations on them. This adapter uses OpenInference instrumentation to capture the trajectory of the agent.Prerequisites
- Agent dependencies:
openai-agentspackage, OpenAI API key, and any tools you want to use. - Quraite dependencies:
quraite[openai-agents-oi]package.
Define Your OpenAI Agent
You create a normal OpenAIAgent first, exactly as you would in any OpenAI Agents project.
Set up Tracing
Quraite provides a tracing setup helper. For OpenAI Agents, pass theFramework.OPENAI_AGENTS enum:
Wrap the OpenAI Agent
Inject thetracer_provider into the OpenaiAgentsAdapter so Quraite can capture spans and metrics from the agent.
Run the Agent
Once wrapped, you expose the adapter using Quraite’srun_agent helper.

