--- id: openinference-instrumentation-openai-agents version: "2.0.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # openinference-instrumentation-openai-agents — OpenInference OpenAI Agents Instrumentation License: permissive · Maintenance: active · Downloads: 1.0M/mo ## What it is and what it does This package automatically instruments the OpenAI Agents SDK to capture execution traces compatible with OpenTelemetry. When you run an agent, it records spans for each agent invocation, tool call, and (if using realtime audio) conversation turn with transcripts and audio URIs. The traces can be exported to observability platforms like Arize Phoenix or Arize AX for visualization and analysis. The instrumentation wraps agent internals to intercept function calls without requiring code changes to your agent logic. It supports tool namespaces, captures LLM model names and invocation parameters, and includes optional audio redaction via environment variables for privacy-sensitive deployments. Requires Python 3.10–3.14 and openai-agents 0.11.0 or later. Use it for: - Debug agent behavior by viewing the full span tree of tool calls, LLM invocations, and intermediate outputs in Phoenix. - Monitor production agent runs in real-time to detect failures, latency spikes, or unexpected tool execution patterns. - Trace realtime audio conversations to correlate user input transcripts, LLM responses, and tool invocations in a single view. - Redact sensitive audio or input data in traces using environment variables while preserving structural observability. - Export agent telemetry to Arize AX for model performance analysis and drift detection across agent deployments. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Auto-instruments OpenAI Agents SDK to emit OpenTelemetry-compatible traces for observing agent runs, tool calls, and realtime audio sessions. Yes. The package is actively maintained, has no known vulnerabilities, and low install friction. Install it if you use OpenAI Agents and need observability into agent execution, tool calls, or realtime audio sessions. The instrumentation is automatic and non-invasive, and integrates cleanly with standard OpenTelemetry collectors. ## Install pip install openinference-instrumentation-openai-agents uv add openinference-instrumentation-openai-agents poetry add openinference-instrumentation-openai-agents ## Installing openinference-instrumentation-openai-agents Before you install: Low friction install with active maintenance—released 7 days ago with no known vulnerabilities. Depends on standard OpenTelemetry and OpenInference libraries, all widely used. License in practice: Apache-2.0 permissive license allows use in commercial and private projects with minimal restrictions. Quickstart: pip install openinference-instrumentation-openai-agents from openinference.instrumentation.openai_agents import OpenAIAgentsInstrumentor from opentelemetry.sdk import trace as trace_sdk tracer_provider = trace_sdk.TracerProvider() OpenAIAgentsInstrumentor().instrument(tracer_provider=tracer_provider) Requires openai-agents>=0.11.0 and Python >=3.10, <3.15. OPENAI_API_KEY environment variable must be set. Verify before relying: - Whether realtime audio tracing works without additional Phoenix or AX setup beyond the tracer provider - Performance overhead of instrumentation on agent execution latency - Compatibility with custom agent implementations or non-standard OpenAI Agents patterns ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 1.0M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags openai agents tracing, opentelemetry instrumentation, agent observability, llm trace collection, openai sdk monitoring, distributed tracing agents, realtime audio tracing, observability, opentelemetry, agent-tracing [View on SkillFed](https://skillfed.io/packages/openinference-instrumentation-openai-agents) · [View on PyPI](https://pypi.org/project/openinference-instrumentation-openai-agents/)