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

# LlamaIndex

> Auto-instrument LlamaIndex query engines, retrievers, and synthesizers.

The LlamaIndex integration installs a span handler on LlamaIndex's instrumentation dispatcher (v0.10.20+). Every query engine call, every retriever hop, every LLM synthesis step is captured.

## Install

```bash theme={null}
pip install decimalai[llamaindex]
```

Requires `llama-index-core>=0.10.20`.

## Use

```python theme={null}
import decimalai
decimalai.init(api_key="dai_sk_...", llamaindex=True)

# Query engines, retrievers, and synthesizers are traced
response = query_engine.query("What is DecimalAI?")
```

## What gets captured

* Query engine, retriever, and synthesizer spans
* Embedding calls with token counts
* LLM calls with the full resolved prompt
* Auto-detected manifest from the query engine config

## Caveats

* Auto-detected manifest captures tool **names** only — not full schemas. If you need schema-aware manifests, register them explicitly with [`register_manifest()`](/sdk/python/manifests).
* The instrumentation dispatcher this integration registers against was introduced in v0.10.20 — older versions are not supported.

## What's next

<CardGroup cols={2}>
  <Card title="Tracing guide" icon="route" href="/guides/tracing">
    Conceptual model: what a span is and how trees are built.
  </Card>

  <Card title="Manifests" icon="layer-group" href="/sdk/python/manifests">
    Register a manifest explicitly to capture tool schemas.
  </Card>
</CardGroup>
