Instrument your Project with OpenAI Agents Instrumentor. This step ensures that all interactions with the OpenAI are tracked and monitored.
from traceai_openai_agents import OpenAIAgentsInstrumentorOpenAIAgentsInstrumentor().instrument(tracer_provider=trace_provider)
5. Interact with OpenAI Agents
Interact with the OpenAI Agents as you normally would. Our Instrumentor will automatically trace and send the telemetry data to our platform.
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)