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

# LlamaIndex

> Installez, instrumentez et visualisez votre première trace.

Trois étapes pour obtenir votre première trace LlamaIndex. Pour les étapes de workflow, la récupération, le reaper et les options, consultez [le guide complet](/fr/start/integrations/llamaindex).

## Installation

```bash theme={null}
pip install 'failproofai-sdk[llamaindex]'
```

## Instrumentation

L'API agent de LlamaIndex est asynchrone. Chaque portée fonctionne aussi bien avec `async with` qu'avec `with`.

```python theme={null}
import asyncio

import failproofai_sdk

failproofai_sdk.configure(environment="production")
failproofai_sdk.instrument()


async def main():
    async with failproofai_sdk.session():
        await agent.run("...")


asyncio.run(main())
```

<Warning>
  Sans un argument supplémentaire sur votre LLM, chaque comptage de tokens dans votre trace sera null — `llama-index-llms-openai` ne demande pas les données d'utilisation lors du streaming. Consultez [Comptage de tokens](/fr/start/integrations/llamaindex#token-counts).
</Warning>

## Vérifier la réception

Exécutez-le une fois, puis ouvrez **Observe → Sessions** et sélectionnez votre environnement. Votre exécution apparaît sous forme de trace reconstruite.

Si rien n'arrive, vérifiez que la machine est connectée avec `failproofai config --status`.

<Card title="Guide complet LlamaIndex" icon="arrow-right" href="/fr/start/integrations/llamaindex">
  Comptage de tokens, ce qui est enregistré, étapes de workflow, récupération, options et problèmes courants.
</Card>
