openinference-instrumentation-openai-agents
OpenInference OpenAI Agents Instrumentation
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 on this page — 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
openinference-instrumentation-openai-agents on PyPI
pip
pip install openinference-instrumentation-openai-agentsuv
uv add openinference-instrumentation-openai-agentspoetry
poetry add openinference-instrumentation-openai-agentsInstalling 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 the current Python release (<3.15,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 7 — openinference-instrumentation, openinference-semantic-conventions, opentelemetry-api, opentelemetry-instrumentation, opentelemetry-semantic-conventions, typing-extensions, wrapt |
| Maintenance | actively maintained — 7 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,024,178/month — #4,487 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: openinference_instrumentation_openai_agents-2.0.0-py3-none-any.whl
Tags
More Monitoring packages
Wraps any iterable to display a real-time…
copyleft · top 100 on PyPI
opentelemetry-semantic-conventionsProvides generated Python code for…
permissive · top 100 on PyPI
opentelemetry-sdkProvides the reference implementation of the…
permissive · top 100 on PyPI
opentelemetry-apiProvides the abstract API and interfaces for…
permissive · top 100 on PyPI
opentelemetry-exporter-otlp-proto-httpExports OpenTelemetry observability data to an…
permissive · top 1,000 on PyPI
opentelemetry-instrumentationProvides automatic instrumentation commands and…
permissive · top 1,000 on PyPI
openinference-instrumentation-openaiAuto-instruments OpenAI Python SDK calls to…
permissive · top 5,000 on PyPI
paid-pythonPaid is a Python SDK for integrating billing,…
unclear · top 15,000 on PyPI
openinference-instrumentation-crewaiAutomatically instruments CrewAI agent…
permissive · top 15,000 on PyPI
openinference-instrumentation-agnoAuto-instruments Agno Agent applications to…
permissive · top 15,000 on PyPI
openinference-semantic-conventionsDefines semantic conventions and standardized…
permissive · top 5,000 on PyPI
openinference-instrumentation-claude-agent-sdkAuto-instruments Claude Agent SDK calls to emit…
permissive · top 15,000 on PyPI
openai-agentsA framework for building multi-agent LLM…
permissive · top 1,000 on PyPI
openinference-instrumentation-google-genaiAutomatically instruments Google GenAI SDK…
permissive · top 15,000 on PyPI
openinference-instrumentation-google-adkAuto-instruments Google ADK applications to…
permissive · top 15,000 on PyPI
openinference-instrumentation-pydantic-aiAuto-instruments PydanticAI agents to emit…
permissive · top 15,000 on PyPI