> ## 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.

# TrueFoundry

> Integrate TrueFoundry observability with PraisonAI agents

# TrueFoundry Integration

TrueFoundry provides LLM deployment and observability.

## Setup

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
export TRUEFOUNDRY_API_KEY=xxx
```

## 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="truefoundry")

# Everything is auto-traced!
agent = Agent(name="Assistant", instructions="You are helpful.", model="gpt-4o-mini")
response = agent.chat("Hello!")
```

### Explicit Tracing

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

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

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