A CLI that shows which sub-agent burned your tokens in one run A new command-line tool called token-trace-viewer lets developers trace token and dollar costs across sub-agents in a single multi-agent run by reading OpenInference-style JSONL trace files. The Python 3.10+ tool, which requires no server, dashboard, account, or pip install, outputs plain tables showing which sub-agent burned the most tokens, which step cost the most money, and where the tool failed. It includes sample traces and supports flags for JSON output, agent/model filtering, top-N rows, and custom pricing files. Explain where the tokens and dollars went in a single agent run. token-trace-viewer reads an OpenInference https://arize-ai.github.io/openinference/spec/semantic conventions.html -style JSONL trace produced by one multi-agent run and answers, from the command line, in plain tables: - Which sub-agent burned the most tokens, and on which step? - Which single step cost the most money? - How much of the file did the tool actually understand, and where did it fail? No server, no dashboard, no account. Point it at a log file, get a table back. bash $ python3 cost.py sample.jsonl AGENT STEP IN OUT COST % OF TOTAL 1 planner verify output 15,240 430 $0.0869 63.0% 2 planner decompose goal 2,610 388 $0.0227 16.5% 3 planner plan task 1,840 512 $0.0220 15.9% 4 planner route to researcher 940 64 $0.0063 4.6% 5 researcher search web 4,200 310 n/a n/a 6 researcher web search api 0 0 n/a n/a ... note: 8 step s have no price for their model or no llm.model name at all and are shown with cost "n/a"; they are excluded from % of run total. covered 12 of 12 lines; 0 unreadable, 0 with no agent name, 0 duplicate span s dropped - Python 3.10+ uses X | None union type syntax in dataclass fields - Standard library only — no pip install needed python3 report.py