Preface¶
When developing memory-related plugins in DSH (DeepSeek Harness), a common problem is the discontinuity of cross-session information: environment facts, project conventions, tool quirks, as well as user preferences, communication styles, and work habits. If these cannot be persisted, they must be re-explained in the next session.
dsh-hermes-memory divides the agent’s memory into two independent libraries: MEMORY.md records facts about the world, and USER.md records the user’s profile. Both libraries have their own independent budgets and eviction policies. Below is an introduction to its core capabilities, installation methods, and usage notes.
What is this¶
dsh-hermes-memory is a dual-library memory plugin for DeepSeek Harness (DSH), maintained by isheng-eqi, licensed under MIT.
It separates “environment facts / project conventions / tool quirks” from “user preferences / communication styles / work habits” for storage and provides the memory tool, auxiliary tools, and a built-in Web memory panel for viewing, editing, deleting, and adding entries to both memory libraries.
Core Features¶
Two Memory Libraries¶
MEMORY.md: Records environment facts, project conventions, and tool quirks, with a character limit of2200characters.USER.md: Records user preferences, communication styles, and work habits, with a character limit of1375characters.- The character limits for both libraries are hardcoded; there is no configuration channel for dynamic Cordis forms. If adjustment is needed, please use bundle installation.
memory tool¶
The memory tool supports:
addreplaceremovebatch(all-or-nothing)
Parameters are used as follows:
actionisadd/replace/remove/batchtargetismemory/userreplace/removeuseoldTextfor matchingbatchuses anoperationsarray
The matching strategy is exact match first; UI always uniquely hits with complete text, while model substring matching serves as a fallback. Multiple hits will report a conflict. When exceeding the limit, it does not silently discard but returns the current entry list; the model retries after merging in the current round; the limit for per-round failure is 3.
Session Injection and Reminders¶
- Injects a frozen snapshot at the start of the session.
- Writes during the session do not change the injected snapshot.
- Reminds for persistence after 10 consecutive rounds without a write.
Auxiliary Tools¶
memory_searchmemory_listmemory_statsmemory_debug
Storage and Panel¶
- Stored in
~/.dsh/storages/hermes_memory.json. - Writes are atomic, persisting across sessions and restarts.
- Built-in Web memory panel to view, edit, delete, and add entries to both memory libraries.
- Environments without
webServer(TUI/headless) automatically skip the panel layer; tools and injection are unaffected. - Zero external dependencies; the tools have no internal LLM, meaning zero LLM cost.
Installation and Enablement¶
First, ensure the plugin runs with the permissions of the current dsh process; check the source code and license before installing. Below are two ways to enable it.
Bundle installation¶
Use the installation command:
dsh plugin --profile web add github:isheng-eqi/dsh-hermes-memory
If using a local directory, you can use:
dsh plugin --profile web add /path/to/dsh-hermes-memory
Dynamic Cordis forms¶
In any DSH session, instruct the model to execute cordis_define and cordis_run. Dynamic plugins disappear with the process exit and need to be re-run after restart; data is not lost.
Typical Usage¶
- Let the model remember: simply say “Remember XXX” to the model; memory snapshots are automatically injected when a new session starts.
- View / Modify yourself: Click the “Memory” button in the sidebar to view, edit, delete, and add entries in the panel.
- When using the
memorytool, selecttargetasmemoryoruserbased on the target library, and then fill inaction,oldText, oroperationsaccording to the operation type.
Applicable Scenarios and Notes¶
Suitable for scenarios where you wish to persist DSH’s environment facts and user profiles separately. It is suitable for use cases where the model needs to autonomously maintain memory, while also requiring manual viewing and correction of both memory libraries.
Note the following:
- Character limits are hardcoded:
MEMORYis 2200 characters,USERis 1375 characters. - Dynamic Cordis forms have no configuration channel; if adjustment is needed, please use bundle installation.
- Environments without
webServer(TUI/headless) automatically skip the panel layer; tools and injection are unaffected. - Not implemented:
write_approvalapproval gate, prompt injection security scan,session_search. - Node engines is
^22.19 || >=24. - Optional peerDependencies include:
@deepseek-ai/cordis >=4.0.0 <5.0.0@deepseek-ai/dsh-tools >=0.1.0-rc.6 <0.2.0@deepseek-ai/schemastery >=3.0.0 <4.0.0
Links¶
- Directory page: https://www.skillhub.cn/plugins/isheng-eqi/dsh-hermes-memory
- GitHub: https://github.com/isheng-eqi/dsh-hermes-memory