Skip to content

Arize-ai/client_python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


Overview

A helper package to interact with Arize AI APIs.

Arize is an AI engineering platform. It helps engineers develop, evaluate, and observe AI applications and agents.

Arize has both Enterprise and OSS products to support this goal:

  • Arize AX β€” an enterprise AI engineering platform from development to production, with an embedded AI Copilot
  • Phoenix β€” a lightweight, open-source project for tracing, prompt engineering, and evaluation
  • OpenInference β€” an open-source instrumentation package to trace LLM applications across models and frameworks

We log over 1 trillion inferences and spans, 10 million evaluation runs, and 2 million OSS downloads every month.

Key Features

  • Tracing - Trace your LLM application's runtime using OpenTelemetry-based instrumentation.
  • Evaluation - Leverage LLMs to benchmark your application's performance using response and retrieval evals.
  • Datasets - Create versioned datasets of examples for experimentation, evaluation, and fine-tuning.
  • Experiments - Track and evaluate changes to prompts, LLMs, and retrieval.
  • Playground- Optimize prompts, compare models, adjust parameters, and replay traced LLM calls.
  • Prompt Management- Manage and test prompt changes systematically using version control, tagging, and experimentation.

Installation

Install Arize via pip or conda:

pip install arize

Install the arize-otel package for auto-instrumentation of your LLM library:

pip install arize-otel

Usage

Instrumentation

See https://pypi.org/project/arize-otel/

from arize.otel import register
from openinference.instrumentation.openai import OpenAIInstrumentor

# Setup OpenTelemetry via our convenience function
tracer_provider = register(
    space_id=SPACE_ID,
    api_key=API_KEY,
    project_name="agents-cookbook",
)

# Start instrumentation
OpenAIInstrumentor().instrument(tracer_provider=tracer_provider)

Logging Spans, Evaluations, and Annotations

Use arize.pandas.logger to log spans, evaluations, and annotations in bulk. See https://arize-client-python.readthedocs.io/en/latest/llm-api/logger.html

from arize.pandas.logger import Client

arize_client = Client(
    space_key=os.environ["ARIZE_SPACE_KEY"],
    api_key=os.environ["ARIZE_API_KEY"],
)

arize_client.log_spans(
    dataframe=spans_df,
    project_name="your-llm-project",
)

arize_client.log_evaluations_sync(
    dataframe=evals_df,
    project_name="your-llm-project",
)

arize_client.log_annotations(
    dataframe=annotations_df,
    project_name="your-llm-project",
)

Datasets & Experiments

Use arize.experimental.datasets to create datasets and run experiments. See https://arize-client-python.readthedocs.io/en/latest/llm-api/datasets.html

from arize.experimental.datasets import ArizeDatasetsClient

datasets_client = ArizeDatasetsClient(api_key=os.environ["ARIZE_API_KEY"])

dataset_id = datasets_client.create_dataset(
    space_id=os.environ["ARIZE_SPACE_KEY"],
    dataset_name="llm-span-dataset",
    data=spans_df,
)

Tracing Integrations

Arize is built on top of OpenTelemetry and is vendor, language, and framework agnostic. For details about tracing integrations and example applications, see the OpenInference project.

Python Integrations

Integration Package Version Badge
OpenAI openinference-instrumentation-openai PyPI Version
OpenAI Agents openinference-instrumentation-openai-agents PyPI Version
LlamaIndex openinference-instrumentation-llama-index PyPI Version
DSPy openinference-instrumentation-dspy PyPI Version
AWS Bedrock openinference-instrumentation-bedrock PyPI Version
LangChain openinference-instrumentation-langchain PyPI Version
MistralAI openinference-instrumentation-mistralai PyPI Version
Google GenAI openinference-instrumentation-google-genai PyPI Version
Guardrails openinference-instrumentation-guardrails PyPI Version
VertexAI openinference-instrumentation-vertexai PyPI Version
CrewAI openinference-instrumentation-crewai PyPI Version
Haystack openinference-instrumentation-haystack PyPI Version
LiteLLM openinference-instrumentation-litellm PyPI Version
Groq openinference-instrumentation-groq PyPI Version
Instructor openinference-instrumentation-instructor PyPI Version
Anthropic openinference-instrumentation-anthropic PyPI Version
Smolagents openinference-instrumentation-smolagents PyPI Version

JavaScript Integrations

Integration Package Version Badge
OpenAI @arizeai/openinference-instrumentation-openai NPM Version
LangChain.js @arizeai/openinference-instrumentation-langchain NPM Version
Vercel AI SDK @arizeai/openinference-vercel NPM Version
BeeAI @arizeai/openinference-instrumentation-beeai NPM Version

Community

Join our community to connect with thousands of AI builders.

Copyright 2025 Arize AI, Inc. All Rights Reserved.