DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

Agent Frugality — DSH Plugin for DeepSeek Harness
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in
← Plugins
A

dsh-agent-frugality

Agent Frugality

DSH defense plugin against three-layer failure in multi-agent systems: deduplication measurement via read ledger (read-ledger), an immune compression rules area plus mechanical completion gate (immutable-core+completion-gate), and a low-cost review lane (role-router). No external dependencies; injec

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add github:gongyijie85/dsh-agent-frugality#db998c2e7bd08262a5da13ca273e84950cab2586
READMECompatibilityVersions

Description

DSH defense plugin against three-layer failure in multi-agent systems: deduplication measurement via read ledger (read-ledger), an immune compression rules area plus mechanical completion gate (immutable-core+completion-gate), and a low-cost review lane (role-router). No external dependencies; inject and use.

Compatibility and provenance

Agent Frugality is published as dsh-agent-frugality and currently resolves to version 0.1.4. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
any
Release source
github
Registry updated
9/10/2026

Versions

0.1.4stable
9/10/2026
0.1.3stable
9/10/2026
0.1.1stable
9/7/2026
Show 1 more versionCollapse versions
0.1.0stable
9/2/2026

Related plugins

Loading related plugins…

Latest
0.1.4
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
Unavailable
Files
Unavailable
Surface
any
License
MIT
Source
github
GitHub
★ 0
Weekly downloads
0
Last push
9/10/2026
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue

Related plugins

More verified plugins in agents-orchestration.

Headless@deepseek-ai/dsh-headlessThe dsh one-shot bundle: a direct core Agent/Session runner over dsh-base with no Host, HTTP, or browser layerExperimental Agent Team Web Profile@deepseek-ai/dsh-experimental-agent-team-web-profileExperimental Web profile layer for Agent Teams Remote and UI pluginsSubagent Codex@deepseek-ai/dsh-subagent-codexOne-shot Codex subagent provider over the official app-server protocolSubagent Claude Code@deepseek-ai/dsh-subagent-claude-codeOne-shot Claude Code subagent provider over the official Agent SDK

README

dsh-agent-frugality

English | 中文

A DeepSeek Harness (DSH) plugin that defends multi-agent systems against three mechanism-level failure modes: read-ledger dedup · compaction-immune rules · mechanical completion gate · cheap-review lane. Zero external dependencies — inject and go.

📐 Spec: docs/SPEC.md · 📋 Tickets: TICKETS.md · 📝 Changelog: CHANGELOG.md · 🛒 Market status: docs/MARKETPLACE.md

What it does

CapabilityOutcome
read-ledgerEvery read-type tool call is content-hashed into a per-agent ledger. frugality_ledger shows who re-reads what — waste becomes visible instead of invisible.
immutable-coreFrugality rules live in a compaction-immune prompt section (re-rendered on every assembly) — context compression cannot erase them.
completion-gate"Done" must pass frugality_gate with a claim + exit-0 verification. Unsupported completion claims are steered back (≤2 objections, anti-loop).
review-lanefrugality_review runs independent review on the CHEAP model family — the main (expensive) model never reviews its own work.

Who it is for: teams and solo builders running long multi-agent DSH sessions, agent plugin authors, and anyone whose token spend grows with no accounting for why.

Why

Three failure modes are real and independently evidenced:

FailureEvidenceThis plugin's defense
Subagent duplicate reads (no shared memory → token waste)Claude Code #46968, #45660; Jack Maguire: subagents account for most token cost in long runs, 70–90% recoverableread-ledger content-hash ledger + "already read" sheet injection
Prompt decay (soft rules fade, compaction erases them)Anthropic Building effective agents: cost tradeoffs come from architecture, not wordingimmutable-core rules in a compaction-immune prompt section + completion-gate mechanical gate
Expensive-model fallacy (costly models are worse reviewers)Anthropic multi-agent research system: gains come from token budget; RouteLLM/FrugalGPT consensusreview-lane cheap-model independent review

This plugin does not forbid multi-agents — it makes the waste visible and the behavior mechanically bounded; measure first, intervene second (DEDUP off by default).

⚠️ Research-integrity note: this plugin does not endorse the headline numbers of the "$85K multi-agent experiment" (54.7% duplicate reads / 243→311 commits / Opus 23.9% — verified to have no primary source; they are a generated-summary hallucination; verification report: research/01-primary-source.md). It targets the mechanism problems themselves, which do have independent evidence.

Quick start

# 1. Install (published v0.1.0)
dsh plugin add github:gongyijie85/dsh-agent-frugality   # GitHub channel (primary)
npm install dsh-agent-frugality                          # npm channel

# Local dev (runtime injection, no restart)
dev_inject_plugin D:\plugins\dsh-agent-frugality
# dev_uninject_plugin dsh-agent-frugality

# 2. Measure your baseline — the ledger is ON by default, DEDUP is OFF
frugality_ledger

# 3. Intervene only when the baseline says so
#    (e.g. dupRate > 15% for a week → set DSH_FRUGALITY_DEDUP=1)

The completion gate is ON by default (DSH_FRUGALITY_GATE=1). Disable only if it fights your workflow.

How it works

tool calls ──→ tools/result ──→ [read-ledger] SHA-1 ledger → JSONL persistence
                      │                │
                      └─ 2nd+ same content ──→ [dedup-replace] summary swap (DEDUP=1)
system-prompt/assemble ──→ [immutable-core] frugality-rules (compaction-immune) + frugality-read-cache
agent/turn-stopping ──→ completion claim without gate proof ──→ steer back (≤2)
frugality_gate / frugality_review / frugality_ledger ──→ three tools

Tools

ToolPurpose
frugality_ledgerRead ledger (per-agent reads/dups/bytes, dup rate, gate & review counters; JSONL-restored) — baseline first, then decide on intervention
frugality_gateCompletion gate: claim required; verify command must exit 0 (host-configured only)
frugality_reviewCheap-review lane: independent review on a CHEAP-class model (quick/deep), verdict + findings

Configuration (env vars — full table in docs/SPEC.md §6)

VariableDefaultMeaning
DSH_FRUGALITY_DEDUP01 = replace 2nd+ identical read with a summary
DSH_FRUGALITY_GATE10 = disable completion gate
DSH_FRUGALITY_GATE_MAX2max gate objections (anti-loop)
DSH_FRUGALITY_VERIFYemptydefault verify command (npm test; exit 0 = pass)
DSH_FRUGALITY_ALLOW_ARG_VERIFY01 = accept tool-arg verify (default ignored — anti-RCE, SPEC §7.1)
DSH_FRUGALITY_REVIEW_MODELautoreview model id; auto = CHEAP family
DSH_FRUGALITY_RULESbuiltinrules file (≤8KB)
DSH_FRUGALITY_LEDGER_CAP30read-cache sheet max entries
DSH_FRUGALITY_WORKDIRcwdgate verify command cwd
DSH_FRUGALITY_READ_PATTERNSbuiltinextra read-tool substrings (comma-separated)

FAQ & troubleshooting

Why is DEDUP off by default? Measure-first philosophy: the ledger shows your real duplicate rate before any intervention. Enable it only when the baseline shows net gain.

Can the verify command run arbitrary code? No. frugality_gate only runs the host-configured DSH_FRUGALITY_VERIFY; tool-provided verify args are ignored unless DSH_FRUGALITY_ALLOW_ARG_VERIFY=1 (anti-RCE, SPEC §7.1).

Does it break subagents? No — read-ledger only observes and dedupes read results (opt-in); immutable-core only injects a prompt section; nothing blocks or rewrites agent output.

Is my content logged? No content is stored: the ledger records content-hashes + targets only; logs are JSONL events (apply/read/gate/review) without file contents (SPEC §7).

Where are the logs? $DSH_HOME/agent-frugality.log (JSONL events) and $DSH_HOME/agent-frugality-ledger.jsonl (ledger persistence).

Does it duplicate other plugins? It intentionally fills only the gaps: shared memory → dsh-memory-vault; model routing → dsh-model-router; task orchestration → dsh-agent-teams. This plugin adds read dedup metrics, the host completion gate, and the cheap-review lane — nothing else.

Layout

lib/index.js       host assembly (hooks / tool registration / config / persistence)
lib/core.js        pure functions & constants (18 unit tests green)
test/core.test.mjs node:test, zero-dependency
docs/SPEC.md       spec (FR / NFR / security model §7 / API contract §8 / acceptance §9)
docs/MARKETPLACE.md marketplace ingestion kit & status
TICKETS.md         productization checklist (phase 1-5)
CHANGELOG.md       release notes
LICENSE            MIT

Test & verify

node --test test/core.test.mjs   # 18/18
node --check lib/index.js && node --check lib/core.js

Design principles

  1. Measure first, intervene second — ledger on, DEDUP off until your baseline shows net gain.
  2. Mechanical bounds > prompts — rules land in tool-result errors / turn-stopping objections; prompts only echo (the rules section itself is compaction-immune).
  3. Only fill real gaps — shared memory via dsh-memory-vault, routing via dsh-model-router, task gates via dsh-agent-teams; this plugin adds read-ledger, host completion gate, cheap-review lane.
  4. Zero deps — node built-ins + lib/core.js; JS-direct like dsh-mode-boost.

Experiment data (daily-use-as-experiment)

The plugin is instrumented by design: every real session feeds the ledger, and periodic snapshots are published to the repo as evidence.

node scripts/experiment-report.mjs   # -> docs/experiments/YYYY-MM-DD-snapshot.{json,md}
  • First snapshot (2026-08-29): 34 reads, 5.9% duplicate rate, 93KB, gate 3 pass / 3 objections, review lane 1×9 findings, 0 plugin errors
  • Exp-3 done (2026-08-29): cheap lane (flash) 81.8% recall @ $0.033 with 1.65× per-dollar hits vs strong; strong (v4) 100%/0 FPs @ $0.067 → dual-lane policy validated (results)
  • Thresholds & ops loop: docs/EXPERIMENT.md ("运营模式" section)

Roadmap

  • Weekly ledger snapshots → README experiment-data section updates (T21)
  • Threshold-driven ops loop: dupRate > 15% for a week → DEDUP=1; record baseline → improvement → validation per release (T22)
  • Next feature candidates: cross-session ledger summaries; review-lane feedback loop into DEDUP heuristics

Release & ingestion status (v0.1.0, updated 2026-09-02)

  • GitHub: github.com/gongyijie85/dsh-agent-frugality (main + tag v0.1.0)
  • npm: dsh-agent-frugality@0.1.0
  • GitHub Release @ v0.1.0 with dsh-agent-frugality-0.1.0.tgz asset
  • Repo description + topics (dsh-plugin deepseek-harness multi-agent) set — topic-driven markets auto-sync
  • awesome-dsh-plugin curated registry PR #4173 — submitted 2026-09-02, pending maintainer merge (merge → one-click install inside dsh-market)
  • chnjames / 0326 directories — auto-discovery via dsh-plugin topic; entry appears on their next sync cycle (no manual submission)

Topics (2026-09-02 expanded, 12): dsh-plugin deepseek-harness dsh cordis multi-agent ai-agents agent-cost cost-optimization token-efficiency context-management subagent completion-gate — apply in repo → Settings → About → Topics.

Contributing

See CONTRIBUTING.md. Security review: SPEC §7 model (verify command is host-config only; review file whitelist; no content in logs).

License

MIT