Show HN: Cost-Xray – per-token cost attribution, by tool, skill, prompt and more (github.com)

🤖 AI Summary
Tigerless Labs has introduced Cost-Xray, a groundbreaking tool that offers in-depth per-token cost attribution for AI coding agents like Claude Code and Codex. This tool enhances previous analytics by capturing real-time local API traffic and breaking down costs associated with the different components of each request, such as system prompts and tool schemas. Unlike existing tools that provide aggregate session costs, Cost-Xray drills down to reveal the specific source of each token's expense, enabling developers to optimize their interactions with AI models effectively. This innovation is significant for the AI/ML community as it provides granular insight into the operational costs of utilizing AI coding agents, which can lead to more efficient coding practices and cost management. Technical details include its installation simplicity—requiring no API keys or configuration changes—and its capability to provide live, detailed analytics through a terminal user interface (TUI). Cost-Xray's architecture allows for dedicated cost tracking down to individual function calls, cache reads/writes, and more, making it a vital addition for developers aiming to optimize their AI tool usage and understand underlying cost structures better.
Loading comments...
loading comments...