Skip to main content
OpenInference is a set of OpenTelemetry instrumentors for LLM frameworks and providers. Each one auto-captures model calls, tool calls, retrieval steps, and agent runs as OTLP spans. AgentMark reads the OpenInference attribute conventions directly, so any OpenInference-instrumented app sends usable traces by pointing its exporter at AgentMark, with no per-framework setup on the AgentMark side.

Supported frameworks

OpenInference maintains instrumentors for a wide range of libraries, including: See the OpenInference repository for the complete, current list and the Python and JavaScript package names.

Setup

OpenInference ships instrumentors for both Python and JavaScript/TypeScript. The example below instruments OpenAI; swap the instrumentor package and class for the framework you use. The OTLP wiring stays identical.
1

Install the instrumentor and the OTLP exporter

2

Point the exporter at AgentMark

Register a tracer provider that exports to AgentMark, then instrument your framework. Use your AgentMark API key and app id (from project settings).
Swap OpenAIInstrumentation / OpenAIInstrumentor for the instrumentor that matches your framework (for example @arizeai/openinference-instrumentation-langchain or openinference-instrumentation-langchain).
In TypeScript, this setup must run before you import the instrumented libraries, so the instrumentor can patch them. Put it in its own module and load it first, for example node -r ./instrumentation.js app.js.
3

Run your app

Run your application as usual. Each model call, tool call, and retrieval step arrives in AgentMark as a span, grouped into a trace. See Traces and logs.
Every OpenInference instrumentor exports through the same OTLP endpoint, so the only thing that changes between frameworks is the instrumentor you install and register. You can also set the endpoint and headers with the standard OTEL_EXPORTER_OTLP_TRACES_ENDPOINT and OTEL_EXPORTER_OTLP_TRACES_HEADERS environment variables instead of configuring the exporter in code. See OpenTelemetry.

What AgentMark captures

AgentMark maps OpenInference attributes onto its normalized trace fields: Token counts and the model feed AgentMark’s cost tracking automatically.

Next steps

OpenTelemetry endpoint

The endpoint, authentication, and environment-variable configuration

Traces and logs

Explore traces once they arrive

Have questions?

Reach out any time: