Frugal Tokens: Analyzing LLM Costs and Token Usage for Coding Agents

Frugal Tokens provides granular visibility into LLM token expenditure

Frugal Tokens is a specialized analysis tool that allows developers to explore the costs and token usage patterns of coding agents. By providing a detailed breakdown of processed tokens, cache reuse, and specific session costs, the tool enables users to identify inefficiencies in their LLM workflows and measure the return on investment (ROI) for token spend.

Detailed Session Metrics for Cost Optimization

Frugal Tokens tracks several key performance indicators (KPIs) per session to help users understand where their budget is being spent. Based on demo data, the tool monitors the following metrics:

  • Processed Tokens: The total volume of tokens handled during a session, which can range from a few thousand (e.g., 12.4K in "Quiet Narwhal Pass") to several million (e.g., 7.8M in "Granite Egret Vale").
  • Cache Reuse: The percentage of tokens reused from the cache, which significantly impacts cost. Demo sessions show reuse rates as high as 97.5% (e.g., "Dawn Marten Landing").
  • Uncached Tokens: The volume of tokens that had to be processed from scratch, directly contributing to higher costs.
  • Reasoning Tokens: A specific breakdown of tokens used for internal model reasoning versus final output.
  • Cache Misses: The tool identifies "full misses" and "partial misses," pinpointing exactly which turn in a conversation caused a cache failure.

Impact on Developer Workflow

Analyzing these metrics allows developers to uncover hidden bottlenecks in their build pipelines and interaction patterns. Users have reported that the tool helps identify how often cache misses occur during periods of inactivity, such as when a developer steps away from a session for an hour or more.

Community Insights and Alternatives

Users on Hacker News have highlighted the importance of independently verified data points for companies attempting to recover from uncontrolled token usage.

"These kind of independently-verified data points will be super important for companies (and individuals!) trying to measure RoI on token spend as they recover from letting people go wild on token usage in the past year."

While Frugal Tokens focuses on cost and token exploration, some users have suggested complementary tools like agentsview.io for those who need to visualize tool calls and local conversation files.

Comparative Session Data

The following data points from the Frugal Tokens demo illustrate the wide variance in cost and token volume across different coding agent tasks:

Session Name Turns Total Processed Cache Reuse % Total Cost
Granite Egret Vale 18 7.8M 96.9% $6.21
Dawn Marten Landing 11 6.7M 97.5% $5.08
Silver Tapir Garden 21 6.1M 94.3% $5.43
Starry Fawn Falls 7 1.1M 93.8% $1.04
Quiet Narwhal Pass 1 12.4K 20.6% $0.07

Sources

Related

  • Project
  • Project
  • Project