Introduction

When doing conversational development in DeepSeek Harness (DSH), common questions are: how many tokens has the current session consumed, what is the approximate cost, how many have been used by different models today, and can the agent query these numbers directly?

dsh-agent-pricing is maintained by Way2LOose4 and targets the DeepSeek Harness Web profile. It provides real-time cost preview below the composer, a today’s usage overlay, and two agent tools: price_estimate and session_cost. Prices stay synchronized with the DeepSeek official pricing page and support peak/off-peak awareness.

What is this

dsh-agent-pricing is a DSH plugin positioned as a “real-time session cost preview.” It displays the cumulative cost of the current session near the input area, organizes today’s token usage into an overlay chart, and allows the agent to query estimated prices and complete session costs during tasks.

This plugin uses the MIT license. Verified sources mark it as verified under the DeepSeek Harness Web profile and version 0.1.0-rc.6.

Core Features

Real-time Cost Display

After opening any session, a compact cost row appears below the composer, displaying the current session’s cumulative cost. It refreshes every 5 seconds and supports CNY ⇄ USD toggling.

Today’s Usage Overlay

Clicking ▸ Chart opens the today’s usage overlay. The overlay displays today’s input/output/cache tokens, hourly usage bar chart, breakdown by model, price source, last verified time, and whether peak or off-peak rates are currently applicable.

Agent Tools

The plugin registers two model tools:

  • price_estimate: For single-call estimation.
  • session_cost: For reading complete session usage.

This allows you to ask the agent “how much have we spent?” It can answer with session_cost for the current session cost or use price_estimate for pre-call estimation.

Price Synchronization and Fallback

The plugin fetches the DeepSeek official pricing page upon activation and then every 30 minutes. If fetching fails, it falls back to the repository’s prices.json, and then to the built-in table. The estimation follows this fallback chain during failures and does not depend on the success of a single fetch.

Installation and Activation

First, confirm the environment is the DeepSeek Harness Web profile and the version satisfies the verified 0.1.0-rc.6. Use the DSH CLI installation command:

dsh plugin --profile web add github:Way2LOose4/dsh-agent-pricing

After execution, restart DSH to load the plugin on startup. The plugin registers into the Web profile and loads with DSH startup, so the post-restart instance is authoritative for enabling and updating.

Typical Usage

  1. Open any session and see the current session cumulative cost row below the composer.
  2. Click CNY/USD to toggle currency; click ▸ Chart to open the today’s usage overlay.
  3. Ask the agent in the session: “how much have we spent?” It will return the current session cost using session_cost; if pre-call estimation is needed, it will call price_estimate.
  4. If you need to override with a local price table, place agent-pricing.json in the workspace root; this file is used to completely override the price table.

Use Cases and Notes

Suitable for developers using the DeepSeek Harness Web profile who want to keep session costs, today’s usage, and agent price queries in the same workspace. It does not require an API key and does not read account balance or negotiated rates; all numbers are estimates mirroring the official public price table.

Notes before use:

  • The plugin registers into the Web profile and loads with every DSH startup, effectively running in the DSH process environment. Only install plugins you trust; check source code, dependencies, and the MIT license before installing.
  • Cost history comes from local session logs; external network requests are limited to the DeepSeek official pricing page and the repository’s raw prices.json.
  • Price synchronization relies on public data from the official pricing page; if fetching fails, it falls back to the repository’s prices.json and the built-in table.
  • If agent-pricing.json is placed in the workspace root, it completely overrides the price table.

Conclusion

dsh-agent-pricing combines “how much has the current session cost,” “how much has been used today,” and “can the agent query prices itself” into the DeepSeek Harness Web profile. Verified sources do not provide a directory page URL, so the GitHub repository address can be used: Way2LOose4/dsh-agent-pricing.