llm-burnwatch
A watchdog for what your LLM calls actually cost.
llm-burnwatch logs every call to a plain file on your own disk, learns what "normal" looks like for your app, and tells you in plain language when something is off — a runaway agent loop, a prompt change that quietly doubled your bill, a model swap that shouldn't have happened. Nothing ever leaves your machine unless you explicitly turn on an alert (Slack, Telegram, or a webhook).
Русская версия · Full documentation
What it does
- Tracks cost. Every call, with cost, tokens, and your own label —
"summarize","chat", whatever makes sense for your app. - Learns your normal. No setup, no training data to provide. It watches your log and figures out what a typical call looks like for each part of your app.
- Flags what's off, in plain language. "This call cost 20x more than usual" — not a wall of statistics. Every alert says what happened and what to do next.
- Can stop a runaway loop. Set a budget for a single request, and it raises an error the moment it's exceeded, instead of quietly burning money.
- Stays on your machine. One file, zero required dependencies, no account, no server. Open the log yourself and read every line.
Is this for you?
Yes, if you're shipping an app or agent that calls an LLM, and you want to know what it costs and get warned when something's wrong — without standing up a full observability platform.
Probably not, if you need full prompt/response tracing and evals — try Langfuse — or a request-routing proxy in front of multiple providers — try LiteLLM. See docs/comparison.md for the honest breakdown.
Install
pip install llm-burnwatch
Five minutes to your first alert
1. Log your calls. One line after each LLM call:
from llm_burnwatch import CostTracker
tracker = CostTracker()
tracker.log_call(
label="summarize",
model="gpt-4o-mini",
input_tokens=812,
output_tokens=143,
)
Already using the OpenAI, Anthropic, Gemini, or LangChain SDK? Run
llm-burnwatch init for a ready-made snippet, or see
docs/connecting.md for every adapter.
2. Check how it's doing.
llm-burnwatch status
Plain words on what's being watched and what's still warming up — nothing to configure first.
3. See what you're spending.
llm-burnwatch report
4. Look for anomalies.
llm-burnwatch detect
No log yet? Try it on synthetic data first:
llm-burnwatch demo-data --out demo.jsonl
llm-burnwatch detect --log-file demo.jsonl
5. Want a visual view?
llm-burnwatch dashboard --out dashboard.html
One self-contained HTML file — no server, nothing to install.
Going further
| I want to... | Read this |
|---|---|
| Set a monthly budget and get warned before I go over | docs/budget-vs-guard.md |
| Stop a runaway agent loop in real time | docs/budget-vs-guard.md |
| Get alerts in Slack, Telegram, or my own webhook | docs/connecting.md |
| Understand exactly how each detector decides something is anomalous | docs/detectors/ |
| Import cost data I already have (OpenTelemetry traces) | docs/connecting.md |
| Know exactly what data ever leaves my machine, and when | docs/security.md |
| See every command and flag | docs/api.md |
| Compare this to Langfuse, LiteLLM, or Helicone | docs/comparison.md |
| Find an answer to a question not covered here | docs/faq.md |
The guarantee
The core of llm-burnwatch never makes a network call. Everything happens
on your disk. The only exceptions are things you explicitly turn on:
importing a pricing file from a URL, or sending an alert to a webhook,
Slack, Telegram, or local command in detect --follow. Full details,
including how this is tested, in docs/security.md.
Contributing
pip install -e ".[anomaly,dev]"
pytest tests/ -v
mypy src/llm_burnwatch
See CONTRIBUTING.md for what a PR needs, and CHANGELOG.md for version history.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llm_burnwatch-1.1.0.tar.gz.
File metadata
- Download URL: llm_burnwatch-1.1.0.tar.gz
- Upload date:
- Size: 176.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7e301e4b52fea5cd49568963acdad04db98fd02f960ec074c2143091523004b
|
|
| MD5 |
64497f8c5114e56032931e42dede0bf0
|
|
| BLAKE2b-256 |
6f8863f860bc177be66079e9da8316cdf3dca1ae1fdd81a0052a8f68361dac60
|
Provenance
The following attestation bundles were made for llm_burnwatch-1.1.0.tar.gz:
Publisher:
release.yml on chemodannebro-rgb/llm-burnwatch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
llm_burnwatch-1.1.0.tar.gz -
Subject digest:
d7e301e4b52fea5cd49568963acdad04db98fd02f960ec074c2143091523004b - Sigstore transparency entry: 2580035030
- Sigstore integration time:
-
Permalink:
chemodannebro-rgb/llm-burnwatch@fe1db17e74d53e0d95537c31d3285217263c3d15 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/chemodannebro-rgb
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@fe1db17e74d53e0d95537c31d3285217263c3d15 -
Trigger Event:
push
-
Statement type:
File details
Details for the file llm_burnwatch-1.1.0-py3-none-any.whl.
File metadata
- Download URL: llm_burnwatch-1.1.0-py3-none-any.whl
- Upload date:
- Size: 134.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b25ec16b479fd26158be5bc7e78d380963a0e5270cac1f1f8b243a9e2efb71ff
|
|
| MD5 |
bb73a8251dc54543af3126f851f2e401
|
|
| BLAKE2b-256 |
72c3cecd35dd6c0ac3cdaa42b90a033b7a0cfa9d97d47af9a817875015905b50
|
Provenance
The following attestation bundles were made for llm_burnwatch-1.1.0-py3-none-any.whl:
Publisher:
release.yml on chemodannebro-rgb/llm-burnwatch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
llm_burnwatch-1.1.0-py3-none-any.whl -
Subject digest:
b25ec16b479fd26158be5bc7e78d380963a0e5270cac1f1f8b243a9e2efb71ff - Sigstore transparency entry: 2580035036
- Sigstore integration time:
-
Permalink:
chemodannebro-rgb/llm-burnwatch@fe1db17e74d53e0d95537c31d3285217263c3d15 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/chemodannebro-rgb
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@fe1db17e74d53e0d95537c31d3285217263c3d15 -
Trigger Event:
push
-
Statement type: