# openinference-instrumentation-autogen

**Python · Instrumentation**

Deprecated compatibility package for OpenInference AG2 instrumentation

- **Module**: `openinference.instrumentation.autogen`
- **Version**: 0.1.16
- **Python**: >=3.10, <3.16
- **Instruments**: `autogen>=0.5.0,<1.0.0`

[PyPI](https://pypi.org/project/openinference-instrumentation-autogen/) · [README](https://github.com/Arize-ai/openinference/blob/main/python/instrumentation/openinference-instrumentation-autogen/README.md) · [Source](https://github.com/Arize-ai/openinference/tree/main/python/instrumentation/openinference-instrumentation-autogen)

## Install

```sh
pip install openinference-instrumentation-autogen
```

## `openinference.instrumentation.autogen`

Deprecated compatibility layer over the AG2 instrumentation.

### `AutogenInstrumentor`

_class_ · [Source](https://github.com/Arize-ai/openinference/blob/main/python/instrumentation/openinference-instrumentation-autogen/src/openinference/instrumentation/autogen/__init__.py#L26-L49)

```python
class AutogenInstrumentor()
```

Compatibility facade for the legacy `autogen` distribution.

**Attributes**

| Name | Type and value |
| - | - |
| [`is_instrumented_by_opentelemetry`](https://openinf.dev/python/openinference-instrumentation-autogen.html.md#openinference.instrumentation.autogen.AutogenInstrumentor.is_instrumented_by_opentelemetry) | `bool` |

#### `instrument`

_method_ · [Source](https://github.com/Arize-ai/openinference/blob/main/python/instrumentation/openinference-instrumentation-autogen/src/openinference/instrumentation/autogen/__init__.py#L37-L40)

```python
def instrument(**kwargs: Any = {}) -> AutogenInstrumentor
```

#### `uninstrument`

_method_ · [Source](https://github.com/Arize-ai/openinference/blob/main/python/instrumentation/openinference-instrumentation-autogen/src/openinference/instrumentation/autogen/__init__.py#L42-L49)

```python
def uninstrument(**kwargs: Any = {}) -> AutogenInstrumentor
```

### `SpanAttributes`

_class_ · [Source](https://github.com/Arize-ai/openinference/blob/main/python/instrumentation/openinference-instrumentation-autogen/src/openinference/instrumentation/autogen/__init__.py#L10-L23)

```python
class SpanAttributes
```

Deprecated: legacy attribute keys kept for backward compatibility.

**Attributes**

| Name | Type and value |
| - | - |
| [`OPENINFERENCE_SPAN_KIND`](https://openinf.dev/python/openinference-instrumentation-autogen.html.md#openinference.instrumentation.autogen.SpanAttributes.OPENINFERENCE_SPAN_KIND) | `str = 'openinference.span.kind'` |
| [`INPUT_VALUE`](https://openinf.dev/python/openinference-instrumentation-autogen.html.md#openinference.instrumentation.autogen.SpanAttributes.INPUT_VALUE) | `str = 'input.value'` |
| [`INPUT_MIME_TYPE`](https://openinf.dev/python/openinference-instrumentation-autogen.html.md#openinference.instrumentation.autogen.SpanAttributes.INPUT_MIME_TYPE) | `str = 'input.mime_type'` |
| [`OUTPUT_VALUE`](https://openinf.dev/python/openinference-instrumentation-autogen.html.md#openinference.instrumentation.autogen.SpanAttributes.OUTPUT_VALUE) | `str = 'output.value'` |
| [`OUTPUT_MIME_TYPE`](https://openinf.dev/python/openinference-instrumentation-autogen.html.md#openinference.instrumentation.autogen.SpanAttributes.OUTPUT_MIME_TYPE) | `str = 'output.mime_type'` |
| [`TOOL_NAME`](https://openinf.dev/python/openinference-instrumentation-autogen.html.md#openinference.instrumentation.autogen.SpanAttributes.TOOL_NAME) | `str = 'tool.name'` |
| [`TOOL_ARGS`](https://openinf.dev/python/openinference-instrumentation-autogen.html.md#openinference.instrumentation.autogen.SpanAttributes.TOOL_ARGS) | `str = 'tool.args'` |
| [`TOOL_KWARGS`](https://openinf.dev/python/openinference-instrumentation-autogen.html.md#openinference.instrumentation.autogen.SpanAttributes.TOOL_KWARGS) | `str = 'tool.kwargs'` |
| [`TOOL_PARAMETERS`](https://openinf.dev/python/openinference-instrumentation-autogen.html.md#openinference.instrumentation.autogen.SpanAttributes.TOOL_PARAMETERS) | `str = 'tool.parameters'` |
| [`TOOL_CALL_FUNCTION_ARGUMENTS`](https://openinf.dev/python/openinference-instrumentation-autogen.html.md#openinference.instrumentation.autogen.SpanAttributes.TOOL_CALL_FUNCTION_ARGUMENTS) | `str = 'tool_call.function.arguments'` |
| [`TOOL_CALL_FUNCTION_NAME`](https://openinf.dev/python/openinference-instrumentation-autogen.html.md#openinference.instrumentation.autogen.SpanAttributes.TOOL_CALL_FUNCTION_NAME) | `str = 'tool_call.function.name'` |
