Skip to main content
PrismML provides the open-weight Bonsai model family, which can run locally through an OpenAI-compatible server. The default server endpoint is http://localhost:8080/v1, so Arize AX captures PrismML calls via the openinference-instrumentation-openai package — the same instrumentor that covers OpenAI’s hosted API.

Prerequisites

  • Python 3.9+
  • An Arize AX account (sign up)
  • PrismML’s OpenAI-compatible server running locally at http://localhost:8080
See PrismML’s Run the Server guide to start the server. The server loads the model selected by its configuration and does not require authentication.

Launch Arize AX

  1. Sign in to your Arize AX account.
  2. From Space Settings, copy your Space ID and API Key. You will set them as ARIZE_SPACE_ID and ARIZE_API_KEY below.

Install

Configure credentials

PrismML’s local server does not require an API key. The OpenAI client still requires a non-empty value, so the example uses not-needed.

Setup tracing

Run PrismML

Expected output

Verify in Arize AX

  1. Open your Arize AX space and select project prismml-tracing-example.
  2. You should see a new trace within ~30 seconds containing a ChatCompletion LLM span with the prompt, response, and token usage attached.
  3. If no traces appear, see Troubleshooting.

Check from the skill, CLI, or SDK

Confirm spans are actually reaching your Arize AX project. Use whichever fits your workflow — the skill and CLI work for any framework; the SDK check is shown for each language.
Install the Arize Skills plugin and let your coding agent check for you:
Then prompt your agent:
Use the arize-trace skill to export and analyze recent traces from my project. Confirm spans are arriving, and summarize any errors or latency issues.

Troubleshooting

  • No traces in Arize AX. Confirm ARIZE_SPACE_ID and ARIZE_API_KEY are set in the same shell that runs example.py. Enable OpenTelemetry debug logs with export OTEL_LOG_LEVEL=debug and re-run.
  • Connection refused or ConnectError to localhost:8080. The PrismML server is not running or is listening on a different port. Start it with PrismML’s server instructions.
  • Model not found. The server exposes the model it loaded. Use the model name returned by GET http://localhost:8080/v1/models, or use bonsai as shown in this guide.
  • PrismML spans missing but other spans present. OpenAIInstrumentor().instrument(...) must run before any import openai. Make sure instrumentation.py is the first import in your entry point.

Resources

PrismML OpenAI-Compatible Server

OpenInference OpenAI Instrumentor (used for PrismML)

PrismML