AI Agent Hub
Back to plugins
🧠

dsh-token-usage

Memory Updated 2026.08.15

Run the following command in DeepSeek Harness:

dsh plugin install joyiok/dsh-token-usage

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

Run dsh plugin install joyiok/dsh-token-usage in DeepSeek Harness to install this plugin; source code is available at https://github.com/joyiok/dsh-token-usage .

About this plugin

After a long day of DSH sessions, figuring out exactly how many tokens you have burned is surprisingly hard. dsh-token-usage puts the numbers right in front of you: a Tokens button appears in the bottom-left of the web sidebar, and one click reveals cumulative, today, and per-session input, output, and cache-read counts. No log files to scroll through.

It goes beyond a dashboard. The plugin registers a token_usage agent tool, so in headless or web sessions you can simply ask "how many tokens have I used in total" and get an authoritative answer. Scope switches between all, today, and current, and per-session detail is available on demand. Under the hood it reads session.jsonl (including .zstd) straight from $DSH_HOME, counts each turn-step exactly once, prefers assistant/message data.usage, and performs no character-level estimation. A built-in multi-frame zstd decoder means zero external binaries required.

If you run multi-turn DSH workloads, track API spend, or are simply curious about token output per session, this lightweight, non-intrusive, MIT-licensed plugin is a drop-in that pays off the moment you restart dsh web.

Use Cases

  • One-click cumulative and daily token breakdown from the web sidebar
  • Ask the agent directly in a headless session for an authoritative token total
  • Inspect per-session token consumption across multi-turn DSH workloads

Best For

  • Developers who need visibility into DSH session token spend
  • Individuals or teams tracking API cost budgets
  • Users running long multi-turn DSH workloads who need cost transparency