Where did your agent
spend its tokens?
Inspect the calls behind a run. Investigate repeated requests, growing context and missed cache opportunities. Compare what changes after a fix.
The sample is synthetic. No sign-up, API key or installation needed to view it.
From a call to a question worth investigating.
1. Record a run
Trace supported OpenAI, Anthropic and LiteLLM calls in your Python application. Keep the data in a local SQLite file.
2. Inspect the evidence
See token usage, estimated cost and latency. Heuristic findings point to possible inefficiencies for you to investigate.
3. Compare and share
Compare recorded runs. Export a standalone report with allowlisted metadata, keeping raw prompts and responses out of the export.
Try the demo on your machine.
Install from PyPI with Python 3.10 or newer. The demo makes no model API calls.
python -m pip install --upgrade traceburn
traceburn demo
Then trace an application.
Add these lines before creating your SDK client:
import traceburn
traceburn.install()
Run your application, then inspect the latest trace:
traceburn waste
traceburn report -o report.html
Your application's model calls can incur provider charges. See the supported entry points and limitations.
Know what a finding means.
A repeated call may be deliberate. A long prompt may be necessary. TraceBurn flags patterns and shows its evidence; a finding does not establish that removing the work preserves your agent's quality.
- Cost and possible savings are estimates. Usage reported by the provider is preferred when available.
- The bundled demo uses synthetic requests and token counts. It is a demonstration, not a savings benchmark.
- Recording captures prompts, responses and tool arguments locally. Protect the database. The exported report omits those raw payloads, but usage and timing can still be sensitive.
Try it on a problem you actually have.
A cost regression, an unexpected retry loop, a prompt change you want to compare. If a finding helps or gets something wrong, open an issue with a synthetic reproducer or a report you have reviewed for sharing.