dsh-analytics
Run the following command in DeepSeek Harness:
dsh plugin install hccccc01333/dsh-analytics
Paste the following prompt into your AI chat to install this plugin:
Install in DeepSeek Harness by running dsh plugin install hccccc01333/dsh-analytics; the source code is available at https://github.com/hccccc01333/dsh-analytics.
About this plugin
When a DeepSeek Harness-driven agent fires off model calls and tool chains in rapid succession, token spend quickly becomes an opaque black box: you cannot tell which session was the most expensive, which tool keeps re-sending stale context, how much the cache actually saved, or whether the month-end budget will be breached. dsh-analytics is a FinOps plugin built to close that gap. It aggregates scattered usage signals from session events into a local SQLite ledger, prices each row against a time-aware pricing table (peak/off-peak, cache hit vs. miss), and layers on daily/monthly budget limits with end-of-month projection so every model call becomes queryable, attributable, and optimizable.
Once data is at rest, the plugin exposes three consumption paths: agents can invoke the analytics_query tool to pull metrics for any time window; JSON API routes (/api/analytics/overview, sessions, models, tools, pricing, budget) feed external systems; and the most intuitive surface is the zero-build browser dashboard at /analytics, featuring KPI cards, per-turn session waterfalls, reasoning-efficiency comparisons, a parent/child agent cost tree, rule-generated optimization suggestions, and a Context Inflation panel that quantifies wasted tokens and avoidable cost from tool results re-sent in later requests. In-shell integration adds a sidebar Token Analytics entry, a per-session Analytics overlay in the conversation header, and a token·cost·duration line under each completed turn, so you never have to leave the workbench to check the numbers.
Everything stays local: data never leaves the machine and the plugin never calls back to the provider API. It is built for individual developers and engineering teams already running DeepSeek Harness who want to fold agent operating costs into a daily FinOps rhythm—whether that means holding a monthly budget, benchmarking the cost-effectiveness of different reasoning-effort levels, or pinpointing redundant tool-call overhead.
Use Cases
- Track daily and monthly token spend against budget limits with month-end projections
- Analyze how cache hit rate, peak/off-peak windows, and reasoning effort affect per-call cost
- Identify avoidable token waste from redundant tool calls and context inflation
Best For
- Indie developers building agent applications on DeepSeek Harness
- Engineering teams that need daily FinOps control over agent operating costs
- Developers who prefer local-first, zero-egress token usage monitoring
Related Plugins
A service-oriented sidebar framework for DSH, offering a full workbench with file explorer, embedded browser, real terminal, Git panel, and extensible plugin services.
A beautiful, practical Claude Code-style TUI plugin with pixel whale top bar, flowing glow title, real-time status line, streaming thought expansion, time rewind, context progress bar and TPS gauge — zero core changes.
The plugin market for DeepSeek Harness: browse/search/one-click install community plugins and themes, with updates, backup/restore, hot disable, diagnostics, and AI fix.
A persistent whale widget on the DSH web UI that shows DeepSeek balance, today's usage, and per-turn cost, with drag-and-snap and sound effects.