LiteLLM Integration

Updated on Aug 14, 2026

Use this integration when your LiteLLM application is implemented in Python.

Setup

  1. Install SDK
bash
pip install progress-observability
  1. Instrument your app
python
Observability.instrument(
    app_name=os.getenv("OBSERVABILITY_APP_NAME"),
    api_key=os.getenv("OBSERVABILITY_API_KEY")
)
  1. Complete example
python
import os

from dotenv import load_dotenv
from litellm import completion

from progress.observability import Observability

load_dotenv()

# LLM INSTRUMENTATION
Observability.instrument(
    app_name=os.getenv("OBSERVABILITY_APP_NAME"),
    api_key=os.getenv("OBSERVABILITY_API_KEY"),
)

model = os.getenv("OPENAI_MODEL", "gpt-4o-mini")

response = completion(
    model=model,
    api_key=os.getenv("OPENAI_API_KEY"),
    messages=[
        {"role": "system", "content": "You are a helpful AI assistant."},
        {"role": "user", "content": "What is the capital of France?"},
    ],
)


Observability.shutdown()

To get a richer trace tree when building agents on top of this provider, use the @agent, @tool, @workflow, or @task decorators. See the Python SDK for details.

In this article
Setup
Not finding the help you need?
Contact Support