Docs / Add it to your code

LlamaIndex

examples/llamaindex_adapter/pipeline.py — the same nine stages as the plain-Python reference, wired onto real LlamaIndex constructs:

Stage LlamaIndex construct
document in / cleaned Plain Python — no construct exists in LlamaIndex (or LangChain, or Langflow) for either.
converted LlamaIndex's own document readers.
split LlamaIndex's own text splitting.
embedded MockEmbedding — LlamaIndex's own no-credential, no-network embedding stub.
indexed / retrieved VectorStoreIndex — pure in-memory Python, no external service, so this is genuinely native here (unlike Langflow's own knowledge-store component; see the Langflow page).
answer A real CustomLLM subclass — LlamaIndex's own extension point for a model — invoked through .complete(), with deterministic regex extraction behind it: substituted logic behind a native integration point, not a native answering model.

A worked example, not an integration. This page is a hand-written nine-stage pipeline that calls LlamaIndex classes inside onetrace stages, so a comparison with the plain-Python run is like for like. It is not an adapter you plug an existing LlamaIndex app into: decorated code gets one receipt per decorated function, so a chain or graph called inside one stage is one receipt. Each framework needs its own virtual environment (their pins conflict; examples/PIN_DISCIPLINE.md).

Get this code

The example's files are not part of the installed onetrace package. They come in its source package on PyPI, a .tar.gz file you download and unpack. In a terminal, in an empty folder, with your virtual environment active, run:

pip download onetrace==0.9.1 --no-binary :all: --no-deps
tar -xzf onetrace-0.9.1.tar.gz
cd onetrace-0.9.1

The first line downloads the source package without installing it, the second unpacks it into a folder named onetrace-0.9.1, and the third moves into that folder. Run the commands below from there. tar comes with current Windows, macOS and Linux; on Windows, use PowerShell.

Running it

Needs the exact pins in examples/llamaindex_adapter/requirements.txt (conflicts with LangChain's own numpy pin — see examples/PIN_DISCIPLINE.md for running more than one adapter's requirements in the same environment).

pip install -r examples/llamaindex_adapter/requirements.txt
python examples/llamaindex_adapter/pipeline.py OUT_DIR RUN_ID

OUT_DIR is a new folder for the run's record, for example runs/first: a folder that already holds a run is refused. RUN_ID is a name you choose for the run, for example first.

Its runs always store each chunk's text in their outputs (chunks.json, and again in vectors.json), along with the documents' converted and cleaned text, so treat its run folders like logs that may contain sensitive data.