A CLI that shows which sub-agent burned your tokens in one run (github.com)

🤖 AI Summary
A new command-line interface (CLI) tool, token-trace-viewer, has been launched to help users analyze token usage and costs in multi-agent AI runs. This tool reads OpenInference-style JSONL traces from a single agent run, providing detailed insights into token consumption. Users can quickly see which sub-agent used the most tokens at each step, identify the step with the highest costs, and assess which parts of the log file were understood by the tool. It operates without requiring servers or dashboards, making it user-friendly; simply point it at a log file, and it produces clear tables outlining these metrics. This tool is significant for the AI/ML community because it addresses a gap in existing trace analysis tools, which often aggregate costs across multiple runs rather than offering insights into individual executions. With contributions to cost tracking and token management critical for optimizing AI deployments, token-trace-viewer focuses on delivering precise answers about specific runs. Key features include functionality to view token totals by agent and step, rank costs of each step, and identify duplicate context blocks across steps. This level of granularity aids engineers in diagnosing inefficiencies and understanding expenditure patterns, fostering more effective resource management in AI applications.
Loading comments...
loading comments...