Python API
Reference for the 39 OpenInference packages on PyPI, generated from their source.
Packages
Each instrumentation package traces one library: install it, call its instrumentor's instrument() once at startup, and the library's calls make spans that follow the specification. They are built on two core packages:openinference-instrumentation, for configuring what spans record (TraceConfig), adding context such as session and user IDs, and tracing your own code; andopeninference-semantic-conventions, the attribute names as constants.
# The instrumentor for your library, e.g. OpenAI. It brings in the core packages.
pip install openinference-instrumentation-openaiSearch
Core
| Package | Description | Version |
|---|---|---|
openinference-instrumentation | OpenInference instrumentation utilities | 0.1.79 |
openinference-semantic-conventions | OpenInference Semantic Conventions | 0.1.46 |
Instrumentation
| Package | Instruments | Version |
|---|---|---|
ag2 | ag2>=0.14.0,<1.0.0 | 0.1.19 |
agent-framework | agent-framework-core >= 1.0.0, agent-framework-openai >= 1.0.0 | 0.1.17 |
agentspec | opentelemetry-sdk, pyagentspec >= 26.1.0 | 0.1.22 |
agno | agno>=2.7.2 | 1.2.1 |
anthropic | anthropic >= 1.8.0 | 3.3.6 |
autogen | autogen>=0.5.0,<1.0.0 | 0.1.16 |
autogen-agentchat | autogen-agentchat >= 0.5.1 | 0.1.29 |
bedrock | boto3 >= 1.40.46 | 0.1.67 |
beeai | beeai-framework >= 0.1.51 | 0.1.36 |
claude-agent-sdk | claude-agent-sdk>=0.1.45 | 0.1.29 |
cohere | cohere >= 5.13.0 | 0.1.22 |
crewai | crewai >= 1.10.1 | 1.1.27 |
dspy | dspy >= 2.6.22 | 0.1.55 |
google-adk | google-adk >= 2.10.0 | 1.1.6 |
google-genai | google-genai >= 2.0.0 | 1.6.4 |
groq | groq >= 0.9.0 | 0.1.40 |
guardrails | guardrails-ai>=0.4.5,<0.5.1 | 0.1.33 |
haystack | haystack-ai >= 2.18.0 | 0.1.53 |
instructor | instructor >= 1.3.7 | 0.1.35 |
langchain | langchain_core >= 0.3.9 | 0.1.87 |
litellm | OpenInference liteLLM Instrumentation | 0.1.58 |
llama-index | llama-index-core >= 0.14.19, llama-index-multi-modal-llms-openai >= 0.1.7 | 4.7.7 |
mcp | mcp >= 1.24.0 | 2.1.5 |
mistralai | mistralai >= 2.0.0 | 2.3.6 |
ollama | ollama >= 0.4.0 | 0.1.20 |
openai | openai >= 2.8.0 | 0.1.74 |
openai-agents | openai-agents >= 0.11.0 | 2.8.4 |
openlit | OpenInference OpenLIT Instrumentation | 0.1.25 |
openllmetry | OpenInference OpenLLMetry Instrumentation | 0.1.31 |
pipecat | pipecat-ai>=1.3 | 2.0.13 |
portkey | portkey_ai >= 0.1.0 | 0.1.30 |
pydantic-ai | pydantic-ai>=2.24.0 | 0.1.37 |
smolagents | smolagents>=1.24.0 | 0.1.50 |
strands-agents | strands-agents >= 1.19.0 | 0.1.20 |
together | together >= 2.0.0 | 0.1.21 |
typesafe | typesafe-sdk >= 0.6.0 | 0.1.13 |
vertexai | google-cloud-aiplatform >= 1.63.0 | 0.1.37 |