返回目录
模型与 MCP 插件

dsh-token-optimizer

jusspound-netizen/dsh-token-optimizer

Audit DSH agent logs to find redundant calls, retry loops, and duplicate reasoning. Quantifies wasted tokens and dollars so you can optimize your agent's cost.

Stars
0
Forks
0
Issues
0
更新
8 天前

PROJECT TOPICS

项目标签

INSTALL REFERENCE

安装参考

未验证
dsh plugin --profile web add github:jusspound-netizen/dsh-token-optimizer

该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。

PROJECT README

README

DSH Token Optimizer

Agensi

A lightweight Python CLI that audits DeepSeek Harness (DSH) agent logs to find wasted tokens.

Instead of just tracking your bill, this tool tells you why you are burning tokens, finding the redundant tool calls and retry loops that agents fall into.

What it does

  • Redundant Calls: Flags the same tool being called with identical arguments.
  • Retry Loops: Detects tools being called repeatedly after an error.
  • Cost Estimate: Quantifies the waste in both tokens and estimated dollars.

Usage

Requires Python 3.9+. No external packages needed.

python scripts/run.py path/to/your_agent_log.txt

Example Output:

=== DSH TOKEN OPTIMIZER REPORT ===

Log analyzed: test_log.txt
Estimated tokens in log: 71

Waste Patterns Detected:
  - Redundant Calls: 4
  - Retry Loops: 4

--- Savings Estimate ---
Potential Tokens Saved: 6,000
Estimated Cost Saved: $0.0180

Recommendation: Implement memoization or a retry backoff policy.

License

MIT


Ready-to-use Agent Skills

Want your AI agent to use these tools automatically? Browse my full catalog of AI agent skills for Jira, Sentry, DevOps, and agent observability on Agensi.

View my Agensi storefront

CLASSIFICATION EVIDENCE

分类依据

项目类型插件
功能分类模型与 MCP
规则置信度高

系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: llm-cost、deepseek-harness。