Introduction¶
In the DSH Web GUI scenario, Agents often need to preserve user preferences, project conventions, and interim conclusions for future sessions. Using a database, vector database, or MCP to carry memory would increase maintenance overhead. The approach of dsh-light-memory is lighter: write memory as visible, editable, and git-manageable Markdown files, and then maintain them based on two actions.
Below, we introduce its positioning, core capabilities, installation methods, typical usage, and the security and dependency boundaries to confirm during use.
What is it¶
dsh-light-memory is a DSH plugin maintained by chidaic, providing a lightweight memory system for DSH Web GUI.
It does not use databases, vector databases, MCP, or Python. The memory itself consists of four Markdown files:
USER.mdPROJECT.mdWORKLOG.mdCONVENTION.md
These files are the carriers for the plugin to save memory and can also be edited directly.
The license is MIT, requiring Node >=20.0.0.
Core Features¶
Four Files, Each with a Role¶
The plugin uses four files to carry content of different natures:
| File | Purpose |
|---|---|
USER.md |
User-level memory |
PROJECT.md |
Project-level memory |
WORKLOG.md |
Operation logs |
CONVENTION.md |
Memory conventions |
Among them, CONVENTION.md is used to customize memory conventions. You can edit it to define “what to remember and how to settle/persist.”
Two Actions: Append and Distill¶
The plugin provides two main actions:
append: Appends a segment of operation log toWORKLOG.md.distill: At task boundaries, processes new segments from the current session and settles content with conclusions intoUSER.mdorPROJECT.md.
These two actions separate the handling of “temporary logs” and “reusable conclusions.”
Injection Methods¶
The plugin injects memory into the model context in three ways:
systemPrompt.sectionsystemPrompt.context- On-demand reading
The overall goal is to make injection more friendly to work with prefix-cache.
Provided Tools¶
The plugin provides four tools:
| Tool | Action |
|---|---|
memory_append |
Appends a segment of operation log to WORKLOG.md |
memory_read |
Reads the full text of USER.md / PROJECT.md, or reads the last n segments of WORKLOG.md |
memory_convention |
Reads the full text of CONVENTION.md |
memory_distill |
At task boundaries, scans only new segments from the current session and settles content with conclusions into USER.md or PROJECT.md |
Installation and Activation¶
Use the DSH plugin command to install:
dsh plugin --profile web add dsh-light-memory
After installation, restart dsh web to apply changes.
Typical Usage¶
You can use it following this workflow:
- Use
memory_appendto append a segment of operation log toWORKLOG.md. - When you need to check memory, use
memory_readto read the full text ofUSER.md/PROJECT.md, or read the lastnsegments ofWORKLOG.md. - When you need to check current memory conventions, use
memory_conventionto read the full text ofCONVENTION.md. - At task boundaries, use
memory_distillto process new segments from the current session and settle content with conclusions intoUSER.mdorPROJECT.md. - In the settings page, adjust user-level and project-level injection switches, as well as default parameter values.
- If you want to change memory rules, directly edit
CONVENTION.md.
Default Configuration¶
Default configuration includes the following parameters:
recentSegments: 3
recentBytes: 8192
userMaxBytes: 2048
projectMaxBytes: 8192
userMaxEntries: 60
projectMaxEntries: 80
maxBytes: 25600
maxSegmentBytes: 4096
These parameters are used to control memory reading, injection, and size boundaries. The settings page allows adjusting user-level and project-level injection switches and default parameter values.
Security Boundaries¶
The plugin includes several types of built-in safeguards:
- Limit Guard: Only intercepts
write/editoperations where persistent conclusion files grow beyond limits, allowing write operations that shrink files. - Secret Scanning: Intercepts patterns like API keys, tokens, and private key blocks before
appendor writing to the conclusion library. - Path Escape Protection: Requires
realpathto fall within the allowed root, rejectingsymlink,.., or absolute path escapes.
The purpose of these restrictions is to reduce risks of accidental writes, data leaks, and path traversal.
Applicable Scenarios and Notes¶
dsh-light-memory is suitable for scenarios where Agents are working within DSH Web GUI and memory needs to be persisted to disk in plain text form. It fits the following requirements well:
- Memory needs to be visible, editable, and git-manageable.
- Do not want to introduce a database, vector database, MCP, or Python.
- Want to switch on/off based on user-level, project-level, operation logs, and memory conventions separately.
- Want more stable context injection between
systemPrompt.section,systemPrompt.context, and on-demand reading.
Before use, it is recommended to confirm:
- The runtime environment meets Node >=20.0.0.
- The plugin runs with the permissions of the current dsh process; check the source code and license before installing.
- Although the README claims zero database, zero dependencies, and zero telemetry,
package.json’sdsh.client.injectdeclares@deepseek-ai/dsh-client-runtime. Whether additional runtime dependencies are needed is unconfirmed; it is recommended to verify the source code and runtime environment before deployment.
Links¶
GitHub repository:
https://github.com/chidaic/dsh-light-memory
Plugin directory page:
https://www.skillhub.cn/plugins/chidaic/dsh-light-memory