AI Agent Hub
Back to plugins
🧠

token-usage-counter

Memory Updated 2026.08.26

Run the following command in DeepSeek Harness:

dsh plugin install Mu-scorpio/token-usage-counter

Paste the following prompt into your AI chat to install this plugin:

To install this plugin in DeepSeek Harness, run the command: dsh plugin install Mu-scorpio/token-usage-counter。. Source: https://github.com/Mu-scorpio/token-usage-counter

About this plugin

When using DeepSeek Harness for model development and debugging, precisely understanding token consumption is critical. However, knowing the total is often insufficient for performance assessment, especially when distinguishing between cache hits and uncached inputs, or accurately calculating output token usage. The token-usage-counter plugin is designed to address this pain point by separating Provider-reported data into four distinct buckets: uncached input, cache read, cache write, and output, offering a much finer-grained data view than default statistics.

The core capability of this plugin lies in its persistent storage and multi-dimensional analysis. It not only supports cumulative, daily, session, and per-model views but also features a built-in Web settings page and heatmap for intuitive data visualization. By monitoring the session event stream, the plugin ensures data is recorded only after a successful request completion, preventing double-counting and guaranteeing accuracy.

This plugin is ideal for developers and researchers who need to control costs precisely, analyze model efficiency, or perform long-term performance monitoring. Whether you aim to optimize DeepSeek model prompts to reduce token overhead or simply wish to quickly inspect detailed session consumption via the interactive /tokens command, it provides the robust data foundation necessary for your workflow.

Use Cases

  • Track model token consumption and analyze cache hit rates to optimize costs.
  • Monitor DeepSeek model usage trends at session and daily levels.
  • Precisely identify resource consumption bottlenecks via bucketed statistics (input, output, cache).

Best For

  • DeepSeek Harness developers needing precise token records.
  • Researchers concerned with inference costs and wanting to optimize prompt strategies.
  • End-users wanting to quickly check token stats via interactive commands.