AI Agent Hub
Back to plugins
🖥️

dsh-token-usage

Client Updated 2026.08.14

Run the following command in DeepSeek Harness:

dsh plugin install samecorner/dsh-token-usage

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

Run dsh plugin install samecorner/dsh-token-usage in DeepSeek Harness to install this plugin automatically; the source repository is at https://github.com/samecorner/dsh-token-usage

About this plugin

After a long, multi-turn conversation, it is hard to see at a glance where tokens actually went, how much of the context window remains, or what the cache hit rate really looks like. dsh-token-usage solves this by adding a Token Usage tab to the DSH Web GUI session header, pulling together the host-side tokenUsage, contextPressure, contextBreakdown, and sessionStats projections into a single readable dashboard.

The dashboard spans four layers: a KPI panel with animated counters for total, billed, output, and cache-read tokens; a context-pressure progress bar that shifts to a warning colour at 80 percent, flanked by cache-hit-rate, reasoning-share, and average / peak per-call figures; a composition section that breaks system prompt, tool schemas, and chat content into a stacked bar chart, a ring chart, and a detail table for input, cache read/write, output, and reasoning tokens; and a per-turn section with hover-tooltip stacked column charts, per-turn detail rows including latency, a cumulative billing curve, per-model breakdown (tokens, call count, cache hit rate), and a one-click Markdown report export.

It is well suited for anyone who runs long conversations, multi-agent workflows, or needs to explain token spend to a team. The plugin has zero runtime dependencies and is implemented entirely against the DSH plugin contract, so it works out of the box without config edits or build steps.

Use Cases

  • Inspecting token distribution, cache hit rates, and context occupancy after long multi-turn sessions
  • Checking context-window pressure and deciding when to rotate the conversation
  • Exporting a per-model Markdown usage report for team review
  • Comparing per-turn latency and token cost to pinpoint anomalous calls

Best For

  • Developers running long multi-turn or multi-agent workflows
  • Engineers or leads who need to account for token spend to a team
  • DSH Web GUI users who want to cut down on manual log inspection