Introduction¶
For developers of agents using DeepSeek Harness (dsh), memory is not merely about “remembering”; it also encompasses startup reading costs, tracing the source of memory, and the ability to manage memory data within the workspace. dsh-memory-pyramid is an MIT-licensed dsh plugin that provides dsh with timeline-based memory: it uses fixed-width, append-only fact logs to store facts, while the agent maintains a summary pyramid, ensuring recall costs do not grow with the volume of memory under a fixed reading budget.
The following introduces its core mechanisms, installation methods, available configurations, and usage notes.
What is this¶
The repository is 33moren33/dsh-memory-pyramid with owner 33moren33. It provides memory capabilities to dsh. The core concept is:
- Facts are written chronologically, with each line not exceeding 280 bytes; it is append-only and never modified.
- The agent maintains the summary pyramid independently, without relying on background processes or timers.
- A fixed reading budget is used when reading the memory view at startup; the number of lines read at startup does not increase as memory volume grows.
Core Features¶
Fact Log and Summary Pyramid¶
The plugin divides memory into two layers: the base layer is the fact log, and the upper layer is the summary pyramid.
The fact log is used to record specific facts, with each line not exceeding 280 bytes and immutable after writing. The summary pyramid is maintained by the agent independently, without relying on background processes or timers. Currently, the plugin runs serially, with the agent autonomously deciding tool calls.
Fixed Reading Budget¶
The memory view uses a fixed reading budget. As memory volume grows, the number of lines read at startup does not increase. By default, the memory view is injected only once at the start of a session; newly written memories within the session are visible via tool receipts, while new sessions see all memories.
Data Location and Collaboration¶
By default, data is stored in the dsh_memory directory of the current workspace, not the home directory. The data is plain text, diff-friendly, and can be managed using git.
The plugin supports multiple processes writing to the same memory concurrently without locks. If multiple old memories are found, the plugin will refuse to start, and the two memories will not be merged.
Native Plugin and Requirements¶
The plugin is a native DSH plugin module, not an external command-line tool or script, and does not require shell permissions. It has zero npm dependencies, zero native modules, and no build steps.
The requirements are:
- Node.js ≥ 19
- dsh uses pnpm to manage plugins, so pnpm must be installed
- Supports Windows / Linux / macOS / ARM64
Memory Dashboard and Example Library¶
The plugin provides a memory dashboard that visualizes the summary tower, heat, timeline, and currently injected content. The dashboard allows clicking on a memory to trace the source conversation or open the imported original text.
The plugin comes with built-in example memory libraries of 50, 100, 500, and 1000 entries. The memory dashboard relies on the web interface; in headless scenarios, the dashboard is automatically unavailable, but the memory functionality itself works normally.
Tools¶
The plugin provides the following tools:
memory_note
memory_summarize
memory_zoom
memory_recall
memory_open
memory_forget
These tools are used for writing facts, maintaining summaries, recall, opening sources, and processing summaries.
Installation and Enablement¶
Installation¶
Install using an npm package:
dsh plugin --profile web add dsh-memory-pyramid
After installation, restart dsh web:
dsh web
After creating a new session, if the ### Memory view section appears at the start, it indicates that the plugin is active.
Verification¶
You can use the following command to confirm the plugin has entered the composition tree:
dsh --profile web --dump-config
Confirm that the output includes dsh-memory-pyramid.
Install from Repository¶
You can also install from the GitHub repository:
git clone https://github.com/33moren33/dsh-memory-pyramid.git
dsh plugin --profile web add "link:/absolute/path/to/dsh-memory-pyramid"
Uninstall¶
Uninstall the plugin:
dsh plugin --profile web remove dsh-memory-pyramid
Then restart dsh web:
dsh web
Typical Usage¶
Adjust Reading Budget¶
Override the wakeLines for the same plugin ID in the profile’s cordis.patch.yml, for example:
wakeLines: 192
wakeLines is used to control the line budget of the memory view at startup.
Real-time Update View¶
By default, the memory view is injected only once at the start of a session. If you want the view to update in real-time as memories change during the session, you can configure:
liveView: true
Share Same Memory Library¶
By default, each workspace uses its own dsh_memory directory. If you want multiple workspaces to read from the same memory library, you can configure dataDir to an absolute path:
dataDir: "/absolute/path/to/shared-memory"
When configured as an absolute path, all workspaces read from the same memory library.
Applicable Scenarios and Notes¶
Suitable for the following needs:
- Want to preserve facts occurring chronologically within dsh.
- Want to control the number of lines of memory injected at startup, rather than letting it grow infinitely with memory volume.
- Want memory data stored in the workspace for easy viewing, diffing, and management with
git. - Want to view the summary tower, timeline, and currently injected content in the web interface.
- Want to trace the source conversation from memory or open the imported original text.
Note the following points:
- The plugin runs with the permissions of the current dsh process; it is recommended to check the source code and the MIT license before installation.
- By default, data is stored in the current workspace, not the home directory.
- If multiple old memories are found, the plugin will refuse to start and will not merge the two memories.
- By default, the memory view is injected only once at the start of a session; newly written memories within the session are visible via tool receipts, while new sessions see all memories.
- If you see a
@deepseek-ai/cordis missingpeer warning, do not worry; information indicates that this declaration has been removed since v0.1.1.
Conclusion¶
The value of dsh-memory-pyramid lies in separating “how much to remember” from “how much to read at startup”: facts are continuously appended at the bottom, the summary is maintained by the agent at the top, and reading at startup remains within a fixed budget.
The URL for the directory page has not been confirmed in verified information; the repository address is:
https://github.com/33moren33/dsh-memory-pyramid