> ## Documentation Index
> Fetch the complete documentation index at: https://docs.impact.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Upgrade Python instrumentation

> Migrate from earlier Impact releases or the OpenAI Assistants API.

## Migrate from the earlier `impact` package

The distribution and import name remain `impact`. Update the application startup and request boundaries as
part of the upgrade.

| Earlier surface | Current replacement |
| - | - |
| Python 3.10 | Python 3.11 or newer is required. |
| old endpoint configuration | Direct OTLP uses the explicit OTLP endpoint and ingest key. On deployments that offer Product discovery, use the application API origin and discovery key. |
| `with_context`, `tags` | Use `with impact.context(...)` with validated Product context fields. |
| `with_trace_context`, `with_impact_trace_context` | Use `impact.inject_context(carrier)`, then `with impact.context(propagated=impact.extract_context(carrier))` on receipt. Carrier values never grant Product tenancy. |
| `trace`, `start_interaction`, interaction controllers | Use `impact.interaction(...)` for a logical request. Use `with impact.span(...) as operation` and set its output for manual inner operations. |
| `score` | Use `impact.feedback(...)` for native user or application feedback. It does not turn an old score into an Eval conclusion. |
| `mark` | Use explicit `runtime.activate_protect(...)` for the selected learned-policy runtime. It does not restore the generic `mark` API. |
| `instrument_asgi_app` | Call `impact.init()` during application startup and use a normal application boundary or maintained framework integration. |
| old heartbeat and chat registration | Optional presence reports bounded process metadata. Verify traffic and Simulation or Protect readiness separately. The legacy chat registration has no direct replacement. |
| module-level `shutdown` | Use the returned runtime's `shutdown()`. Await it for an `AsyncRuntime`. |

The current package does not claim Python 3.10, unselected LlamaIndex operations or the historical Google
client. Product instructions and downloadable artifacts must use APIs available in the selected artifact.

## Migrate from the Assistants API

Move the application to `client.responses.create`, carry forward its instructions and tool definitions, and
choose how to manage conversation state. Check the tool calls, output items and stream events your application
actually consumes. For Microsoft Foundry, use the standard OpenAI client with the resource's `/openai/v1/`
base URL and the deployment name. The [integration catalogue](https://docs.impact.ai/sdk/python/integrations.md) lists each SDK
operation boundary and support state.
[OpenAI migration guide](https://developers.openai.com/api/docs/assistants/migration) ·
[Microsoft Foundry v1 API](https://learn.microsoft.com/en-us/azure/foundry/openai/api-version-lifecycle)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.