Repolode
bowenliang123

bowenliang123/dsh-context

A DeepSeek Harness plugin that visualizes an agent's context window: composition, per-request trend, events, and the agent family.

Stars
2,650
Forks
89
Open issues
4
Last commit
5 hours ago

What is it?

dsh-context is a plugin for DeepSeek Harness that makes an agent's context window visible. It breaks down what the context is made of, such as system prompt, tool schemas, user messages, injected context, assistant replies and tool results, with approximate token counts and shares.

It also tracks how the context changes over time. A per-request trend chart shows growth turn by turn, with compactions and prunes marked where they happened, and an events log lists injections, compactions, prunes, model switches and plan-mode toggles. A Context Browser lets you open any request and inspect the actual content of each element, and a File Activity view summarizes which files the agent read, wrote or searched.

The plugin adds a cross-session Context Insights page in the sidebar, a Context tab and Fleet tab per session, a right-sidebar panel, and a /context slash command. Settings cover default view placement, trend display options and optional system prompt prefix and suffix text.

Key features

  • 01Breaks down context window composition by category with approximate token counts.
  • 02Shows per-request context growth with compactions and prunes marked on the trend chart.
  • 03Lets you browse the actual content of each element in any request.
  • 04Summarizes which files the agent read, wrote or searched, with line deltas.
  • 05Displays the agent family, including parents and subagents, as live cards.
  • 06Provides a cross-session insights page with usage, cost and cache-hit statistics.

Use cases

  • Diagnosing why a long conversation with an agent is degrading as its context fills up.
  • Checking which tools, skills or injected instructions take up the most context.
  • Reviewing what files an agent changed during a session.
  • Monitoring token usage and estimated cost across many sessions.

Quick start

  1. 1

    Install the plugin with the dsh CLI

    dsh plugin --profile web add dsh-context
  2. 2

    Start the web UI

    dsh web

Things to know

  • Requires the DeepSeek Harness host application to run.

Topics

FAQ

What is dsh-context?
A DeepSeek Harness plugin that visualizes an agent's context window: composition, per-request trend, events, and the agent family. dsh-context is a plugin for DeepSeek Harness that makes an agent's context window visible. It breaks down what the context is made of, such as system prompt, tool schemas, user messages, injected context, assistant replies and tool results, with approximate token counts and shares.
Is dsh-context free to use? What license does it have?
dsh-context is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is dsh-context still maintained?
Actively maintained. The last commit to dsh-context was on Oct 21, 2026.
What can I use dsh-context for?
Diagnosing why a long conversation with an agent is degrading as its context fills up. Checking which tools, skills or injected instructions take up the most context. Reviewing what files an agent changed during a session. Monitoring token usage and estimated cost across many sessions.
How do I install dsh-context?
Install the plugin with the dsh CLI: dsh plugin --profile web add dsh-context Start the web UI: dsh web
Where can I get dsh-context?
The source code and installation instructions are on GitHub: https://github.com/bowenliang123/dsh-context

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects