Integrations / LlamaIndex
To trace LlamaIndex with Tracify, wrap each query or agent run in the Python SDK's trace_agent decorator and record retrieval as its own step. Model calls made through a wrapped provider client join the same trace.
Your code
LlamaIndex
Tracify
One run.
Setup
import tracify
@tracify.trace_agent(name="docs-rag")
def answer(question: str):
with tracify.span("retrieve", type="retrieval", input=question):
nodes = retriever.retrieve(question)
with tracify.span("synthesize", type="llm"):
return query_engine.query(question)Full details in the documentation. All integrations are listed on the integrations page.
