dshbase

Plugin directory / Knowledge / dsh-session-analyst

dsh-session-analyst

Verified · install-tested on dsh dmsobtl

✓ Actively maintained Builds on 3 official DSH packages Pure TypeScript

View on GitHub ↗ ← Back to plugin directory

1Stars
0Forks
0Open issues
TypeScriptLanguage
2026-08-14Last push
Cross-platformPlatform

What it does

DSH plugin: Agent session quality analysis — tool success rate, token efficiency, redundant call detection, cross-session regression comparison. PS: File upload has issues, I'll reorganize later.

✅
Our take
Works — verified, early-stage project

DSH plugin: Agent session quality analysis — tool success rate, token efficiency, redundant call detection, cross-session regression comparison. PS: File upload has issues, I'll reorganize later. It installs cleanly and boots without issues in our testing. It's early-stage but functional.

“Verified” means our automated CI actually ran dsh plugin add in a clean profile and it booted — nothing more. Feature descriptions and version compatibility are the author’s claims. This is not a security audit and not an endorsement of third-party code.

README

dsh-session-analyst

Session quality analysis plugin for DeepSeek Harness.

Gives the agent (and you) structured insight into session behavior: tool success rates, token efficiency, redundant calls, error patterns, and regression detection.

Install

dsh plugin add dsh-session-analyst

Or add to your cordis.patch.yml:

- id: session-analyst
  plugin: dsh-session-analyst
  config:
    redundantCallThreshold: 3
    excessiveStepThreshold: 10

Tools provided

analyze_session

Parse a session log file (.jsonl or compressed .jsonl.zstd) and return quality metrics.

Agent: I'll analyze the session from the last run.
→ analyze_session({ path: "~/.dsh/sessions/abc123/session.jsonl" })

Returns:
{
  "summary": {
    "totalTurns": 5,
    "totalSteps": 12,
    "totalToolCalls": 8,
    "totalErrors": 1,
    "successRate": 0.875,
    "avgStepsPerTurn": 2.4
  },
  "issues": [
    { "severity": "warning", "code": "REDUNDANT_TOOL_CALL", "message": "..." }
  ],
  "tokenStats": { "efficiency": 0.12, ... },
  "toolStats": { "byName": { "bash": { "count": 5, "errors": 1 }, ... } }
}

compare_sessions

Compare baseline vs current session to detect regressions.

Agent: Compare today's run against yesterday's baseline.
→ compare_sessions({ baseline: "./baseline.jsonl", current: "./today.jsonl" })

Returns:
{
  "verdict": "regressed",
  "regressions": [
    { "dimension": "Tool success rate", "baseline": "100%", "current": "75%", "changePercent": -25 }
  ],
  "delta": { "stepsDelta": +3, "errorsDelta": +2, "tokenDelta": +1500 }
}

Analysis dimensions

Dimension What it detects
Tool success rate Percentage of tool calls that return without error
Redundant calls Same tool + same arguments called multiple times
Token efficiency Ratio of output tokens to total consumed
Excessive steps Turns with >10 steps (possible loop)
Error patterns Tools with >50% error rate
Duration Wall-clock time per turn

Use cases

  • Post-run diagnostics: Agent analyzes its own session after a task to identify inefficiencies
  • Regression detection: Compare sessions before/after a prompt or skill change
  • CI integration: Headless mode runs a task, then analyze_session checks quality gates
  • Skill tuning: Identify which tools are being misused and refine system prompts

Standalone usage (without dsh)

The parser and analyzer are usable as a library:

import { parseSessionFile, analyzeSession, compareSessions } from 'dsh-session-analyst'

const session = await parseSessionFile('./session.jsonl')
const analysis = analyzeSession(session)
console.log(analysis.summary)

Development

npm install
npm test

License

MIT

Install

🧩 Let your agent install it (recommended)

Install the catalog once, then DeepSeek Harness can find and install any plugin from this site automatically:

dsh plugin add dshbase-catalog

Then say "install dsh-session-analyst for me" — your agent finds it in the directory and installs it. Docs: dshbase-catalog · verified packs.

Web profile:

dsh plugin --profile web add dsh-session-analyst

Headless (CLI) profile:

dsh plugin --profile headless add dsh-session-analyst

Package

npm: dsh-session-analyst · version 0.1.0 · tested on dsh 0.1.0-rc.6

Test report

Verified end-to-end: L1 install + L2 load + L3 runtime Q&A on dsh 0.1.0-rc.6.

When to use it

Give the agent a memory, a knowledge base, or a retrieval layer so it stops forgetting context between sessions.

Who it's for

Users running long projects who want the agent to remember decisions, docs, and preferences without re-explaining.

For developers — extending it

The memory/retrieval backend is the seam — plug a new store, tune what gets distilled, or add citation and audit trails.

Security: not yet scanned — our daily static scan will cover it shortly.

Share this badge

More in Knowledge

Browse all 7797 plugins →