LlamaIndex
Track what your LlamaIndex pipelines cost
See what each LlamaIndex pipeline costs across every model and API it touches, in two lines, with no account and no proxy. Free, and it takes about a minute.
1Install
pip install focxle llama-index-llms-openaifocxle has no dependencies, so nothing enters your environment and nothing can conflict with the versions you already pin.
2Two lines, then name your agents
focxle.init() goes as early as you can put it, before the clients are built. Naming agents is what makes the per agent number exist at all.
import focxle
focxle.init()
from llama_index.llms.openai import OpenAI
llm = OpenAI(model="gpt-5.5")
with focxle.agent("research"):
llm.complete("what changed in the filing")3What you get
Printed when the process exits, or on demand with focxle.report():
focxle spend $16.17
--------------------------------------------------------
research $16.17 (203 calls)
openai $14.02
api.firecrawl.dev $2.15Model calls and HTTP APIs in the same number, per agent. That second part is what no LLM-only tool can show you: the search, scraping and embedding calls your agent makes are real money and they appear on a different bill.
4How this was checked
Verified against llama-index-llms-openai in a clean container: the call was attributed to the named agent and priced from the vendor's own usage numbers.
The test runs against a real HTTP server speaking the OpenAI chat-completions shape, answering on the vendor’s own hostname so the same code path production uses is the one under test. Pointing it at localhost would have exercised different code and could have passed while the real thing failed.
Embedding calls are counted too, since they are ordinary HTTP requests to a priced host. Retrieval-heavy pipelines usually spend more on embeddings than anyone expects.
Query engines, chat engines and agents all route through the same client, so none of them need separate handling.
5What it does not do
It does not block anything. Out of the box it only measures, and it shows what a spending cap would have stopped so you can decide whether you want one before paying for one.
It is not a proxy. Your traffic never routes through us, so there is no new dependency on your live path and we never hold your prompts. It makes no network calls at all on the free path, which the test suite proves by deleting socket.socket and running anyway.
It fails open. If anything inside it breaks, your call still goes through and the failure is counted and printed at the end.
Other frameworks
The setup is the same everywhere, because nothing here is framework-specific.