Add your OpenAI API key as an environment variable:
export OPENAI_API_KEY=[your_key_here]
Connect your application to Phoenix with the register function:
Run OpenAI Agents
Run your agents code.
from agents import Agent, Runneragent = Agent(name="Assistant", instructions="You are a helpful assistant")result = Runner.run_sync(agent, "Write a haiku about recursion in programming.")print(result.final_output)tracer_provider.force_flush(timeout_millis=10000)