Back to directory

dsh-memory-tiers

In a curated listMaintenance: Active

1129742588/dsh-memory-tiers

Keeps a persistent local memory store (L1/L2/DL1/DL3) with search/write/attend/forget/stats tools, hot-editable settings page and a memory star map view.

View on GitHub
$ dsh plugin add dsh-memory-tiers

14

stars

2

forks

JavaScript

Language

MIT

License

2026-03-23

Created

2026-11-05

Last push

MIT-licensed DSH plugin that keeps a six-tier local memory for long conversations: one cache-friendly <memory_context> block per turn, five model-facing memory tools, a hot-editable settings page and a star map.

DSH integration

Native runtime

Author-claimed

Safety audit

Unaudited

Last verified

2026-11-24

License

MIT

01What can it help you accomplish?

  • Keep the early part of a long conversation instead of losing it to the context window

    A six-tier local store: turns land in L1, a routing model decides what becomes a DL3 summary, what waits in L2, and what decays in DL1; a second pass condenses L2 into three summary grades

    People who run long, continuous dsh sessions and are tired of the model forgetting how the conversation started

  • Stop paying for the whole conversation history on every single turn

    One structured memory block per turn (always-remembered + recently settled + time-ordered history) with a cache-friendly prefix; history becomes a placeholder, so the cache miss stays at 500–800 tokens and does not grow

    Anyone watching the token bill climb with conversation length

  • See exactly what the model received and steer the memory store by hand

    `/memory context` writes the whole outgoing context to a text file, `/memory list` dumps the tiers, the settings page hot-applies most of the 57 options, and the star map renders the six tiers

    Users debugging recall quality or auditing what the plugin injects into their prompts

02How to install into DeepSeek Harness

Prerequisites

  • A dsh build that supports the `dsh.bundle` plugin protocol — all three install routes depend on it
  • A model to route and summarise with: `source` defaults to `session` (borrow the session model), and `source: api` with `model.apiKey` / `model.apiBase` lets you point it at a separate cheap model; embedding and rerank models are only needed for semantic capture and fusion prefilter
  • A writable local directory for the store (default `~/.dsh/storages/memory`) and for `<DSH_HOME>/memory-tiers/config.json`

Installation steps

  1. 01

    Install from npm: in the dsh plugin manager install the package `dsh-memory-tiers` — the README marks this as the recommended route

  2. 02

    Or install from this repository by the tag `v1.3.1`, or search `dsh-memory-tiers` in the dsh market; the README lists all three routes

  3. 03

    Reload the plugin once (switch it off and on — a dsh restart is not needed), then open `设置 → 记忆`

Verify the integration

  • The memory configuration page shows up under `设置 → 记忆` after the reload — that is the success signal the README gives
  • `/memory list` prints the store tier by tier (id / time / channel / importance / body), so newly captured turns are visible
  • If the tools never appear or no memory is injected, read `boot.errors` in `status.json` and the `BOOT_*` events in `log.txt`

Rollback

  • The README has no uninstall section; the switches that hand history back are `compaction.enabled` (history is replaced by a placeholder) and `inject.enabled` (write-only mode, compaction then refuses to run) on the settings page
  • Memory and config are plain local files — the `storage.dir` directory (default `~/.dsh/storages/memory`) and `<DSH_HOME>/memory-tiers/config.json` — so back them up or move them yourself

03DSH integration and capability boundaries

DSH integrationNative runtime

Native DSH plugin: installed from the dsh plugin manager (npm package `dsh-memory-tiers`, the GitHub tag `v1.3.1`, or a dsh market search), it relies on the `dsh.bundle` plugin protocol, registers five `memory_*` model tools plus a memory settings page, and replaces chat history with one injected `<memory_context>` block.

  • Six tiers with two-stage routing

    Conversation turns captured per turn; the default capture budget is 2000 chars for user messages, 400 for a reply and 500 for tool output→L1 hot layer, L2 consolidation buffer, DL1 decaying ledger, DL3 summary library and the L3 view used by the injection block

    Routing and consolidation call a model, so they cost tokensCapture truncates anything over the configured character budget
  • One cached memory block instead of the full history

    The six tiers plus the `inject.*` options→A single `<memory_context>` block (always-remembered / recently settled / time-ordered history) placed before the current user message; each turn the old history is replaced by a placeholder

    Switching injection off makes compaction refuse to run, so the session keeps its history`inject.maxChars` defaults to 0, meaning the block has no size cap
  • Five `memory_*` tools for the model

    Model-initiated tool calls→`memory_search` (DL3 summary → DL2 original → DL1 ledger), `memory_write`, `memory_attend`, `memory_forget`, `memory_stats`

    The model can write, flag and delete entries on its own; the injected usage rules ask it not to interrupt the user and to search only when the context lacks the answer
  • `/memory` commands and context export

    `/memory context [all]` or `/memory list` typed in the chat→A text file with the full outgoing context (system prompt, persona, memory block, every message), or the tiered store listed in chat; `all` prints it in the chat instead

    The exported file contains the complete system prompt, persona and all messages of that turn
  • Hot-editable settings page with 57 options

    The `设置 → 记忆` page→Live source of the four model stages, six-tier status, all 57 options with a 「需重载」 mark where a plugin reload is required, the session-mode exemption list, one-click 「立即整理」, the star map and the log viewer

    The model channel, storage dir, writer, global work-mode default and organiser interval need a plugin reloadChanging `storage.dir` does not move the existing memory files
  • Memory star map

    The 「✦ 记忆星图」 button in the session top bar, or the settings page entry→An in-app near-fullscreen dark panel with the external address in the header; the same link (for example `http://127.0.0.1:1796/dsh-memory/star`) opens in a browser

    Data comes from the tiers held in plugin memory and follows `storage.dir`; no extra port is openedEsc leaves immersive mode first and closes the panel on the second press
  • Per-session work mode with an exemption list

    The small toggle next to the input box→No memory block and no history compaction in that session, richer capture, and a skeleton (place / event / action / conclusion) compressed before it reaches L1

    A session that ran in work mode keeps its history permanently, even after work mode is switched offRemoving an exemption warns that history may be compacted to 0 and asks for confirmation

04Who is it for? When not to use it?

Good for

  • People who run long, continuous dsh sessions and are tired of the model forgetting how the conversation started
  • Anyone watching the token bill climb with conversation length
  • Users debugging recall quality or auditing what the plugin injects into their prompts

Not for

  • All three install routes assume dsh supports the `dsh.bundle` plugin protocol; without it the plugin cannot be loaded at all.
  • Routing, fusion, embedding and reranking all call models, so the memory layer costs tokens beyond the chat itself; `source` can borrow the session model (`session`, zero config) or use your own key (`api`), and semantic capture is off by default because it needs an embedding model.
  • Compaction replaces the history with a placeholder every turn and DL1 rows are only deleted after a ledger entry is written; a corrupt config is rebuilt automatically — but the trade-off is that once a session is taken over, its raw history is gone and only the memory archive is left.

05Compatibility, maintenance and safety notes

  • All three install routes assume dsh supports the `dsh.bundle` plugin protocol; without it the plugin cannot be loaded at all.
  • Routing, fusion, embedding and reranking all call models, so the memory layer costs tokens beyond the chat itself; `source` can borrow the session model (`session`, zero config) or use your own key (`api`), and semantic capture is off by default because it needs an embedding model.
  • With no model reachable the plugin produces no fake summaries, but routing silently degrades: the only trace is `DIGEST_NO_MODEL` / `DIGEST_FALLBACK` in `log.txt` plus the `boot.errors` entry in `status.json`.
  • Memory and settings stay on this machine: the store defaults to `~/.dsh/storages/memory` and the config file to `<DSH_HOME>/memory-tiers/config.json`; changing `storage.dir` later does not migrate the old directory.
  • Compaction replaces the history with a placeholder every turn and DL1 rows are only deleted after a ledger entry is written; a corrupt config is rebuilt automatically — but the trade-off is that once a session is taken over, its raw history is gone and only the memory archive is left.
  • Sessions created by an older version can refuse to open (`lacks an identified message`) because their placeholder has no id; the README points at `node tools/repair-sessions.mjs --apply` for that repair.
2026-03-232026-11-05Not specified by the author

MIT (stated in README) · early-stage project, last push 2026-11-05, no GitHub release — the v1.3.1 tag is an install target, not a published release

06Frequently asked questions

How do I install dsh-memory-tiers in DeepSeek Harness?

Pick one of the three routes in the dsh plugin manager: install the npm package `dsh-memory-tiers`, install from this repository at the tag `v1.3.1`, or search `dsh-memory-tiers` in the dsh market. All three need dsh to support the `dsh.bundle` plugin protocol. Then reload the plugin once — switching it off and on is enough, no dsh restart.

How can I tell that it is actually installed?

After the reload, `设置 → 记忆` should show the configuration page — that is the signal the README gives. `/memory list` then prints the store by tier (id / time / channel / importance / body). If the tools never show up, check `boot.errors` in `status.json` and the `BOOT_*` entries in `log.txt`.

What does the memory system cost in tokens?

Routing, fusion and the optional embedding/rerank stages all call models, so they consume tokens on top of the chat. Each turn injects one `<memory_context>` block and turns the old history into a placeholder; with the model-side prefix cache the miss stays at 500–800 tokens and does not grow with the turn count. `model.noThink.*` turns thinking off for those calls to save time and money.

Where does my memory live, and does anything leave the machine?

The store is a local directory (`storage.dir`, default `~/.dsh/storages/memory`) and the config sits at `<DSH_HOME>/memory-tiers/config.json`. Outbound traffic is limited to the model stages you configure with your own `model.apiKey` / `model.apiBase`, or the session model when `source` is `session`; capture, search and the star map read local data only.

How do I turn the memory layer off without losing control of my history?

Set `compaction.enabled` to false so history is no longer replaced by a placeholder, or turn `inject.enabled` off for write-only mode — compaction then refuses to run. Both are hot-editable on the settings page, and the memory directory plus the config file are ordinary files you can back up or delete yourself.

08Data and sources

  • Author-claimedgithub.com2f72a18ef069…

    给 DeepSeek Harness(dsh)装一个**真正记得住事**的本地记忆系统——聊得越久越懂你,而且不花冤枉钱。

  • Author-claimedgithub.com2f72a18ef069…

    三种方式任选(需要 dsh 支持 `dsh.bundle` 插件协议):

  • Author-claimedgithub.com2f72a18ef069…

    模型侧会拿到 5 个 `memory_*` 工具:`memory_search`(按深度检索:DL3 摘要 → DL2 原文 → DL1 流水账)、`memory_write`(主动写入记忆)、`memory_attend`(标记重点关注)…

This page is generated from the project’s public documentation, repository metadata and a structured parse of DSH Plugins; last verified on 2026-11-24. Found an error? Submit a correction.

🏆

Best DeepSeek Harness Plugins

Twelve plugins worth installing first — picked from the whole catalog, across every category.

DSH Plugins is an independent community directory of DeepSeek Harness plugins. Not affiliated with or endorsed by DeepSeek. Third-party plugins are not security-audited — review the source before installing.

New DeepSeek Harness plugins, weekly. No spam.