Skip to main content
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

pip install decimalai[llamaindex]
Requires llama-index-core>=0.10.20.

Use

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().
  • The instrumentation dispatcher this integration registers against was introduced in v0.10.20 — older versions are not supported.

What’s next

Tracing guide

Conceptual model: what a span is and how trees are built.

Manifests

Register a manifest explicitly to capture tool schemas.