Analysis updated 2026-05-18
Trace an AI agent's OpenAI or Anthropic API calls to see where money is being wasted.
Get a literal code patch for missed prompt caching or model overkill issues.
Gate a CI pipeline on cost regressions using the check command.
Replay recorded LLM calls for testing without spending new tokens.
| tommytranx/traceburn | 0-bingwu-0/live-interpreter | 0cm-labs/tokenizer-benchmark | |
|---|---|---|---|
| Stars | 2 | 2 | 2 |
| Language | Python | Python | Python |
| Setup difficulty | easy | moderate | moderate |
| Complexity | 3/5 | 2/5 | 2/5 |
| Audience | developer | general | researcher |
Figures from each repo's GitHub metadata at analysis time.
The optional web viewer binds to localhost only and has no authentication by design.
traceburn is a Python tool for tracking down wasted spending when you build AI agents on top of the OpenAI or Anthropic APIs. The README opens with a concrete story: a small support ticket triage agent sent the same roughly 4,700 token prompt fresh on every call. traceburn's waste report looked at the recorded run, spotted that repeated prompt prefix, and estimated that about 82 percent of the spend was avoidable. Adding the single caching fix the tool suggested cut the real cost from about 5 cents to about 1.7 cents, a 69 percent measured saving, with the tool's original estimate landing within 18 percent of what actually happened. You use it by adding one line, traceburn.install(), near the top of your existing agent code, or by running your script with an environment variable set instead of touching the source at all. From then on, every call your agent makes to the OpenAI or Anthropic SDKs, including streaming responses, tool calls, and cache hits, gets recorded as a trace in a single SQLite file on your own machine. There's no account to create and no server to run for basic tracing, and nothing is sent off your computer. Once you have a trace, a set of commands let you inspect it: list recorded traces, view one in detail, run the waste report, and for a couple of common problems, ask the tool to print the exact code patch that would fix it. A check command meant for continuous integration can fail a build if a traced run costs too much or looks too wasteful, and a diff command compares two traces to see whether a prompt change actually helped. An optional local web viewer shows the same information visually: a trace tree, a cost or time based flamegraph, a timeline, and the waste report, all served from your own machine with no outside connection and no login, since it's built to only be reachable locally. Today the automatic instrumentation covers the raw OpenAI and Anthropic Python SDKs plus litellm, other frameworks like LangChain aren't wired in yet, though a manual API works with any framework in the meantime. The waste checks look for five patterns: duplicate calls, missed prompt caching, bloated prompts, using an expensive model for trivial work, and retry loops.
A local-first Python tracer that watches your OpenAI or Anthropic agent calls, flags wasted spend with dollar figures, and suggests fixes.
Mainly Python. The stack also includes Python, SQLite, Starlette.
The README doesn't mention a license, so terms of use are unclear.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.