# 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](https://openinf.dev/spec/index.html.md). They are built on two **core** packages: [`openinference-instrumentation`](https://openinf.dev/python/openinference-instrumentation.html.md), for configuring what spans record (`TraceConfig`), adding context such as session and user IDs, and tracing your own code; and [`openinference-semantic-conventions`](https://openinf.dev/python/openinference-semantic-conventions.html.md), the attribute names as constants.

```sh
# The instrumentor for your library, e.g. OpenAI. It brings in the core packages.
pip install openinference-instrumentation-openai
```

## Core

| Package | Description | Version |
| - | - | - |
| [`openinference-instrumentation`](https://openinf.dev/python/openinference-instrumentation.html.md) | OpenInference instrumentation utilities | 0.1.80 |
| [`openinference-semantic-conventions`](https://openinf.dev/python/openinference-semantic-conventions.html.md) | OpenInference Semantic Conventions | 0.1.46 |

## Instrumentation

| Package | Instruments | Version |
| - | - | - |
| [`ag2`](https://openinf.dev/python/openinference-instrumentation-ag2.html.md) | `ag2>=0.14.0,<1.0.0` | 0.1.20 |
| [`agent-framework`](https://openinf.dev/python/openinference-instrumentation-agent-framework.html.md) | `agent-framework-core >= 1.0.0, agent-framework-openai >= 1.0.0` | 0.1.18 |
| [`agentspec`](https://openinf.dev/python/openinference-instrumentation-agentspec.html.md) | `opentelemetry-sdk, pyagentspec >= 26.1.0` | 0.1.23 |
| [`agno`](https://openinf.dev/python/openinference-instrumentation-agno.html.md) | `agno>=2.7.2` | 1.2.2 |
| [`anthropic`](https://openinf.dev/python/openinference-instrumentation-anthropic.html.md) | `anthropic >= 1.8.0` | 3.3.7 |
| [`autogen`](https://openinf.dev/python/openinference-instrumentation-autogen.html.md) | `autogen>=0.5.0,<1.0.0` | 0.1.16 |
| [`autogen-agentchat`](https://openinf.dev/python/openinference-instrumentation-autogen-agentchat.html.md) | `autogen-agentchat >= 0.5.1` | 0.1.30 |
| [`bedrock`](https://openinf.dev/python/openinference-instrumentation-bedrock.html.md) | `boto3 >= 1.40.46` | 0.1.68 |
| [`beeai`](https://openinf.dev/python/openinference-instrumentation-beeai.html.md) | `beeai-framework >= 0.1.51` | 0.1.37 |
| [`claude-agent-sdk`](https://openinf.dev/python/openinference-instrumentation-claude-agent-sdk.html.md) | `claude-agent-sdk>=0.1.45` | 0.1.30 |
| [`cohere`](https://openinf.dev/python/openinference-instrumentation-cohere.html.md) | `cohere >= 5.13.0` | 0.1.23 |
| [`crewai`](https://openinf.dev/python/openinference-instrumentation-crewai.html.md) | `crewai >= 1.10.1` | 1.1.28 |
| [`dspy`](https://openinf.dev/python/openinference-instrumentation-dspy.html.md) | `dspy >= 2.6.22` | 0.1.56 |
| [`google-adk`](https://openinf.dev/python/openinference-instrumentation-google-adk.html.md) | `google-adk >= 2.10.0` | 1.1.7 |
| [`google-genai`](https://openinf.dev/python/openinference-instrumentation-google-genai.html.md) | `google-genai >= 2.0.0` | 1.6.5 |
| [`groq`](https://openinf.dev/python/openinference-instrumentation-groq.html.md) | `groq >= 0.9.0` | 0.1.41 |
| [`guardrails`](https://openinf.dev/python/openinference-instrumentation-guardrails.html.md) | `guardrails-ai>=0.4.5,<0.5.1` | 0.1.34 |
| [`haystack`](https://openinf.dev/python/openinference-instrumentation-haystack.html.md) | `haystack-ai >= 2.18.0` | 0.1.54 |
| [`instructor`](https://openinf.dev/python/openinference-instrumentation-instructor.html.md) | `instructor >= 1.3.7` | 0.1.36 |
| [`langchain`](https://openinf.dev/python/openinference-instrumentation-langchain.html.md) | `langchain_core >= 0.3.9` | 0.1.88 |
| [`litellm`](https://openinf.dev/python/openinference-instrumentation-litellm.html.md) | OpenInference liteLLM Instrumentation | 0.1.59 |
| [`llama-index`](https://openinf.dev/python/openinference-instrumentation-llama-index.html.md) | `llama-index-core >= 0.14.19, llama-index-multi-modal-llms-openai >= 0.1.7` | 4.7.8 |
| [`mcp`](https://openinf.dev/python/openinference-instrumentation-mcp.html.md) | `mcp >= 1.24.0` | 2.1.6 |
| [`mistralai`](https://openinf.dev/python/openinference-instrumentation-mistralai.html.md) | `mistralai >= 2.0.0` | 2.3.7 |
| [`ollama`](https://openinf.dev/python/openinference-instrumentation-ollama.html.md) | `ollama >= 0.4.0` | 0.1.21 |
| [`openai`](https://openinf.dev/python/openinference-instrumentation-openai.html.md) | `openai >= 2.8.0` | 0.1.75 |
| [`openai-agents`](https://openinf.dev/python/openinference-instrumentation-openai-agents.html.md) | `openai-agents >= 0.11.0` | 2.8.5 |
| [`openlit`](https://openinf.dev/python/openinference-instrumentation-openlit.html.md) | OpenInference OpenLIT Instrumentation | 0.1.26 |
| [`openllmetry`](https://openinf.dev/python/openinference-instrumentation-openllmetry.html.md) | OpenInference OpenLLMetry Instrumentation | 0.1.32 |
| [`pipecat`](https://openinf.dev/python/openinference-instrumentation-pipecat.html.md) | `pipecat-ai>=1.3` | 2.0.14 |
| [`portkey`](https://openinf.dev/python/openinference-instrumentation-portkey.html.md) | `portkey_ai >= 0.1.0` | 0.1.31 |
| [`pydantic-ai`](https://openinf.dev/python/openinference-instrumentation-pydantic-ai.html.md) | `pydantic-ai>=2.24.0` | 0.1.38 |
| [`smolagents`](https://openinf.dev/python/openinference-instrumentation-smolagents.html.md) | `smolagents>=1.24.0` | 0.1.51 |
| [`strands-agents`](https://openinf.dev/python/openinference-instrumentation-strands-agents.html.md) | `strands-agents >= 1.19.0` | 0.1.21 |
| [`together`](https://openinf.dev/python/openinference-instrumentation-together.html.md) | `together >= 2.0.0` | 0.1.22 |
| [`typesafe`](https://openinf.dev/python/openinference-instrumentation-typesafe.html.md) | `typesafe-sdk >= 0.6.0` | 0.1.14 |
| [`vertexai`](https://openinf.dev/python/openinference-instrumentation-vertexai.html.md) | `google-cloud-aiplatform >= 1.63.0` | 0.1.38 |
