Preface¶
When running agent conversations in DeepSeek Harness (DSH), model calls are scattered across different tasks and directories, making it difficult to see tokens, cache hit rates, and approximate costs at a glance from the conversation interface. Relying on online bills or manually sifting through logs also fails to align with “current local development.” dsh-monitor is a client plugin released by maintainer sayzwx: it adds a “Monitor Console” entry to the left panel, aggregating and displaying local session logs without internet access or uploads.
Below is an introduction to its positioning, capabilities, installation methods, and usage notes.
What is this¶
dsh-monitor (DeepSeek Harness Monitor) is classified as a client-side plugin. After installing and refreshing the DSH window, “Monitor Console” appears above “Plugins” in the left list.
The problem solved by the plugin can be summarized as: viewing usage, cache hit rates, token details, and local estimated costs by model and by task. The data source is local session logs; historical sessions are automatically backfilled in the background. Session logs are the single source of truth. The plugin listens to session/event for real-time accounting and performs a supplementary scan of completed history via sessionPersistence at startup, deduplicating by session + seq.
The license is MIT; package.json indicates that the DSH engine ^0.2.2-rc.5 is required. Community directory page: https://www.skillhub.cn/plugins/sayzwx/dsh-monitor; Source code and documentation: https://github.com/sayzwx/dsh-monitor.
Core Features¶
Overview Charts¶
The top right allows selection of a time range: Today / 7 Days / 30 Days / All. The charts below will follow this range.
- Ring Distribution Chart: View the share of each model by tokens, number of calls, or cost (top 4 models + “Others”).
- Line Comparison Chart: Usage trends of the top 4 models by day; indicators can be switched.
By Model¶
Each model occupies one line in the list, displaying the source (provider), number of calls, tokens, cache hit rate, and cost. Models with the same name but from different providers are counted separately, keyed by provider::model.
After clicking on a single model, you can also see: pricing explanation, daily usage bar chart (tokens / calls / cost can be switched), tokens composition ring chart, average tokens / output / cost per call, first and last call times, number of unpriced calls, and details broken down by task. Filtering for Today / 7 Days / 30 Days / All is also supported.
By Task¶
Usage is grouped by Project (working directory), and tasks (sessions) are listed within the project. Expanding a task allows viewing individual model usage and hit rates; expanding a project allows viewing the model share ring chart and model summary for that project; clicking the model name jumps to the model view.
Pricing Rules¶
- Official DeepSeek models (provider is
deepseek,deepseek-account, etc.) are automatically calculated based on official prices in the README, switching between peak and idle prices based on call time, requiring no manual entry. - Third-party or custom models enter unit prices for input, output, cache read, and cache write in “Pricing”; if not filled, it shows “Unpriced,” usage is still counted but not included in cost (won’t show as ¥0).
- Custom unit prices take priority over official prices; changes to price and usage take effect immediately.
Official price example (Unit: RMB / Million tokens; Peak is Beijing time Mon-Fri 9:00–12:00, 14:00–18:00):
| Model | Peak (Input / Output / Cache Read) | Idle (Input / Output / Cache Read) |
|---|---|---|
| deepseek-flash | ¥2 / ¥8 / ¥0.04 | ¥1 / ¥4 / ¥0.02 |
| deepseek-v4-pro | ¥9 / ¥27 / ¥0.30 | ¥4.5 / ¥13.5 / ¥0.15 |
The cost at the bottom of the panel is a local estimate; official bills still follow the DeepSeek usage page (the plugin provides a direct link).
Installation & Enabling¶
After obtaining the plugin source code directory, let the agent execute the installation in the DSH session, or call the plugin_manager tool directly. Replace target with the absolute path of the local dsh-monitor directory:
plugin_manager install_bundle target:<本目录绝对路径>
After installation, refresh the DSH window, and “Monitor Console” should appear at the top of the left panel.
Typical Usage & Data Locations¶
Daily use focuses on the interface: switch time ranges in the Monitor Console, and view shares, trends, and details between “Overview”, “By Model”, and “By Task”; fill in unit prices for non-official models in “Pricing”.
If you need to interface with local data or troubleshoot aggregation results, the README provides the following paths and routes (all local):
- Details:
$DSH_HOME/dsh-monitor/usage.jsonl(one line per model call) - Index and Pricing:
$DSH_HOME/dsh-monitor/meta.json GET /dsh-monitor/data?from=&to=&task=— Aggregated model / task / project usageGET|POST /dsh-monitor/config— Price tablePOST /dsh-monitor/rescan— Rescan historical sessions
When aligning with disk or interface data, you can POST /dsh-monitor/rescan first, then pull the data interface.
Applicable Scenarios & Notes¶
Who is it for: Developers who use DSH locally for long-term multi-model, multi-project development, hoping to compare “which models are consuming tokens”, “how cache hit rates are”, and “cost estimation by task” in the same sidebar, and do not want monitoring data to leave the local machine.
Execution method: The plugin reads local session logs with the permissions of the current DSH process; before installing, you should check the GitHub source code and MIT license yourself to confirm it fits your environment policy.
Behavioral Boundaries (from README):
- Read-only session logs, does not modify any session content.
- Does not upload or fetch usage via internet; historical records are backfilled in the background.
- Cost is estimated by the local price table and may differ from official bills.
The DSH ecosystem follows “Everything is a plugin”; community directories like SkillHub are independent sites with no official affiliation with DeepSeek / Huafan. dsh-monitor is one of the client-side monitoring plugins, consolidating usage and hit rates into a single “Monitor Console” entry.
- Directory page: https://www.skillhub.cn/plugins/sayzwx/dsh-monitor
- GitHub: https://github.com/sayzwx/dsh-monitor