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

# OpenLIT

> Integrate OpenLIT observability with PraisonAI agents

# OpenLIT Integration

[OpenLIT](https://github.com/openlit/openlit) is a universal OpenTelemetry bridge for LLM observability.

## Setup

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
pip install openlit
```

## Usage

### Auto-Instrumentation (Recommended)

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonai_tools.observability import obs
from praisonaiagents import Agent

obs.init(provider="openlit")

# Everything is auto-traced - no wrappers needed!
agent = Agent(
    name="Assistant",
    instructions="You are a helpful assistant.",
    model="gpt-4o-mini",
)

response = agent.chat("Hello!")
print(response)
```

### Explicit Tracing (For Fine Control)

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonai_tools.observability import obs

obs.init(provider="openlit", auto_instrument=False)

with obs.trace("workflow"):
    # Your agent code
    pass
```

## Configuration

| Option            | Environment Variable          | Description                             |
| ----------------- | ----------------------------- | --------------------------------------- |
| `otlp_endpoint`   | `OTEL_EXPORTER_OTLP_ENDPOINT` | OTLP endpoint (default: localhost:4318) |
| `disable_batch`   | -                             | Disable batching                        |
| `disable_metrics` | -                             | Disable metrics                         |
