AI Agent Hub
Back to plugins
🖥️

dsh-plugin-agent-budget

Client Updated 2026.08.29

Run the following command in DeepSeek Harness:

dsh plugin install winter-street/dsh-plugin-agent-budget

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

Run dsh plugin install winter-street/dsh-plugin-agent-budget in DeepSeek Harness to install this plugin; the complete source is available at https://github.com/winter-street/dsh-plugin-agent-budget

About this plugin

In a DeepSeek Harness multi-agent workflow, a root agent may spawn one-shot or continuable subagents and further trigger workflow descendants, scattering token spend across many calls with no single choke point. dsh-plugin-agent-budget treats the entire agent tree as one shared budget account (scope: tree) or meters each session independently (scope: session), so an admin or the model itself can see the remaining allowance before a call is dispatched, and any call that would push settled usage past the limit is rejected with TOKEN_BUDGET_EXHAUSTED in a fail-closed manner.

The ledger is stored as an append-only event stream in a plugin-owned sidecar directory (default ~/.dsh/agent-budget/), kept out of session logs so that uninstalling the plugin never breaks existing sessions. The stream is replayable and recoverable; legacy budget events that older versions wrote into session logs can be migrated out in one pass. On the model side, a read-only budget_status tool exposes the limit, used and remaining tokens, all four usage buckets, and metering completeness. The web settings panel renders a progress bar per scope and lets users adjust limits or reset usage online without touching ledger files by hand.

The plugin has no external service dependency and runs as a plain local bundle. It is well suited to developers who run DSH sub-agent, workflow, or compaction pipelines and want a single, durable, fail-closed token budget governing the whole tree.

Use Cases

  • Centralize token spend across a root agent, its subagents, and workflow descendants to prevent unbounded usage
  • Set an independent per-session token cap so one session cannot exhaust the entire allowance
  • Let the model check remaining budget via a read-only tool before dispatching, with automatic rejection once the limit is reached

Best For

  • Developers running DSH sub-agent or workflow pipelines who need a single, unified token cap
  • Teams that want centralized usage governance across sessions and agents without any external service
  • Contributors building or extending the DSH plugin ecosystem who care about fail-closed metering semantics