AI Agent Hub
Back to plugins
🤖

dsh-token-optimizer

Model Inference Updated 2026.09.03

Run the following command in DeepSeek Harness:

dsh plugin install Snow-ea/dsh-token-optimizer

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

Run dsh plugin install Snow-ea/dsh-token-optimizer in your DeepSeek Harness 0.1.2-rc.1 Web profile to install this plugin; the source is available at https://github.com/Snow-ea/dsh-token-optimizer. Restart the running dsh web process after installation to activate it.

About this plugin

When you run multi-step Agent tasks on DeepSeek Harness, large tool-result texts keep re-entering the model context, burning tokens and slowing inference. dsh-token-optimizer performs a deterministic, lossy compression on successful tool results before they accumulate in context, and archives every replacement so you can retrieve the exact original text later through the session-authorized retrieve_spill interface.

At the root level it mounts a cache-aware BasicCompactionEngine adapter that fires automatically at 62.5% context pressure, ahead of DSH's built-in 80% fallback, so across Standard, PTC, Creator, and Minimal modes the stock engine has no second reduction pass to run. It also ships a Web conversation dashboard built on the Conversation, Renderer, and Session client contracts, letting you monitor session state and compaction effects from a browser.

If you are running Agents under a DSH 0.1.2-rc.1 Web profile and want to lower context pressure without altering the structured values that run_code programs receive, while gaining an auditable compression log and a visual panel, this plugin is built for that job.

Use Cases

  • Multi-step Agent tasks where verbose tool results bloat the model context
  • Retrieving exact original tool text after lossy compression
  • Monitoring session state and compaction effects from a browser panel

Best For

  • Developers running multi-Agent workloads on DSH 0.1.2-rc.1 Web profiles
  • Teams that want to reduce token spend without altering structured run_code inputs
  • Production users who need an auditable compression log and a visual management panel