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.
Metadata
Release files for llm-burnwatch 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| llm_burnwatch-1.1.0.tar.gz | 176.4 kB | With provenance | Details for llm_burnwatch-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| llm_burnwatch-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for llm_burnwatch-1.1.0-py3-none-any.whl |
Total release size: 310.9 kB
Release files / llm_burnwatch-1.1.0.tar.gz
| Download URL | llm_burnwatch-1.1.0.tar.gz |
|---|---|
| Size | 176.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d7e301e4b52fea5cd49568963acdad04db98fd02f960ec074c2143091523004b
|
|
BLAKE2b-256 checksum How to use checksums |
6f8863f860bc177be66079e9da8316cdf3dca1ae1fdd81a0052a8f68361dac60
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.
Transparency logRelease files / llm_burnwatch-1.1.0-py3-none-any.whl
| Download URL | llm_burnwatch-1.1.0-py3-none-any.whl |
|---|---|
| Size | 134.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b25ec16b479fd26158be5bc7e78d380963a0e5270cac1f1f8b243a9e2efb71ff
|
|
BLAKE2b-256 checksum How to use checksums |
72c3cecd35dd6c0ac3cdaa42b90a033b7a0cfa9d97d47af9a817875015905b50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.
Transparency logSecurity for llm-burnwatch 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for llm_burnwatch-1.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.