Preface¶
DeepSeek Harness (DSH) works by default on a per-session basis: when you close the current conversation, the next one will not automatically carry over your preferences, project agreements, or previous decisions. The official repository frames its core philosophy as Everything is a Plugin; long-term memory is not built into the core, but instead handled by memory-specific plugins.
The community directory DeepSeek Harness Plugin Repository groups these plugins under the “Memory” category. Note that this is an independent website with no official affiliation with DeepSeek / Horizons AI, and should not be treated as an official app store. The dsh-mneme in the directory takes a different approach: instead of only storing memory in a database, it also saves memory as editable Markdown files that you can open and modify. This article is compiled after cross-referencing the directory’s detail page, the GitHub repository’s README and package.json, and the official DeepSeek Harness repository.
What is This¶
dsh-mneme is a cross-session memory plugin for DeepSeek Harness, maintained by modusensus under the MIT license, primarily written in JavaScript. Its npm package name is @modusensus/dsh-mneme. The current version in the repository’s plugin directory dsh-mneme/package.json is 0.4.0. As of the GitHub API query on 2026-08-17, the repository had 22 stars; the community directory page still shows 8 stars, likely a snapshot from when it was added to the directory.
The name comes from Mnemosyne (Μνήμη), the Greek goddess of memory. The directory page positions it as: dual writing to SQLite and editable Markdown, autoDream memory consolidation, and local offline semantic retrieval. The repository README summarizes its goals in three sentences:
- Readable: SQLite primary database + human-editable Markdown mirror, with two-way synchronization
- Structurable: Three tables for entities, attributes, and timelines to extract text snippets into structured knowledge (v0.3.0, extraction disabled by default)
- Evolvable: Background consolidation via autoDream, plus an optional Sleep Mode for deep maintenance (v0.4.0, disabled by default)
The problem it aims to solve is very specific: let the Agent remember your preferences in the next conversation, let you open files to check “what exactly it remembered”, and perform retrieval locally as much as possible instead of sending your memory data externally.
Core Features¶
SQLite Primary Database + Markdown Mirror¶
The plugin stores memory in the local directory ~/.dsh/memory/:
- The primary storage is SQLite: ~/.dsh/memory/memory.db, using Node’s built-in node:sqlite without additional native modules
- The Markdown mirror is split into separate files by type: preferences.md, projects.md, decisions.md, history.md, summary.md
- There are 4+1 memory types: preference, project, decision, history, plus summary (overview)
Manual edits to the Markdown files take priority over machine writes. The repository uses a last-rendered digest as a baseline for three-way merging, preventing automatic overwrites while you are actively editing files. The mirror will be re-rendered after machine writes. After v0.3.6, the mirror synchronization uses generation / applied_generation to track “unrendered pending changes”: if a crash occurs after commit but before rendering, the system can resume convergence after restart instead of silently skipping the work.
Seven Model Tools¶
After installation, the Agent gains access to these 7 tools (from the plugin README):
| Tool | Function |
|---|---|
memory_save |
Save a memory entry, deduplicate and merge by title |
memory_search |
Full-text search (friendly with Chinese substrings, supports vector semantic search) |
memory_list |
List entries by type with pagination; use include_archived=true to view archived items |
memory_update |
Modify an existing memory entry |
memory_delete |
Delete a memory entry |
memory_forget |
Suppress injection (downgrade weight, do not delete, recoverable) |
memory_archive |
Archive or restore an entry; archived items will not appear in lists, searches, injections, or consolidation |
A memory summary is automatically injected at the start of a new session: preferentially the summary entry, supplemented by a small number of high-priority items. At the end of a session (turn/end), the LLM will refine the session’s preferences, decisions, and lessons learned and add them to the database; the plugin will filter previously injected context to avoid re-distilling old summaries.
In the web interface, you can open the official settings panel → Memory Store Settings → Memory tab to browse entries by type and perform full-text searches. The same settings page also lets you write user personas and behavior rules, which are injected as system prompts for each conversation and take priority over memory store content. You can also register slash commands (/name), which are stored in SQLite and registered to the DSH command list on startup.
autoDream: Background Consolidation¶
When the number of memory entries exceeds 10 or the total character count exceeds 5000, autoDream will trigger asynchronously (without blocking writes). The LLM outputs a decision list, which the server validates before applying each entry:
- keep: Retain the entry
- merge: Merge similar-themed entries, keeping the one with more complete information
- archive: Archive outdated or redundant entries, which can be restored and are not physically deleted
- conflict: Resolve conflicting information; you can also enable conflictFreezeEnabled to freeze conflicts and wait for your confirmation instead of automatic resolution (disabled by default)
- update: Directly correct outdated or incorrect single entries (with constraints like a 24-hour protection period, maximum 2 entries per run, etc.)
Invalid outputs (unknown IDs, illegal actions, cross-type merging, out-of-bounds importance scores) will result in the entire batch being rejected to avoid corrupting the memory store. Each run writes to the dream_runs audit table, including a digest of the input snapshot, the decision list, and a receipt, allowing offline replay.
v0.4.0 adds Sleep Mode (sleepModeEnabled defaults to false): after idle time reaches sleepIdleMinutes, it performs four-phase maintenance — conflict resolution, archiving and downgrading by access time, using LLM to refine type=pattern rules, and supplementing relationships for isolated entities. Any user activity will abort the current cycle, and tasks are queued in series with autoDream to avoid overlapping consolidation runs.
Offline Semantic Search and Memory Genes¶
Starting from v0.2, optional semantic retrieval is available, with the default embedProvider still set to openai (compatible with early behavior). Switching to local uses the ONNX offline model Xenova/bge-small-zh-v1.5; you can also use Ollama. If a request fails, it will fall back step-by-step, finally reverting to keyword search. Reranking is disabled by default (rerankEnabled: false), and Xenova/bge-reranker-base will only be loaded when enabled.
Searches can use hybrid recall (vector + keyword). After enabling vector search in the settings page, a “Semantic” toggle will appear in the memory panel; API keys are only stored in the user_settings table of the local memory.db.
v0.3.0’s “Memory Genes” extracts text into three tables: entities, entity_attrs (with a valid_until timeline, so modifying attributes does not overwrite history), and entity_relations. entityExtractionEnabled defaults to false, and when disabled, the behavior matches v0.2.x. When enabled, you can use prefix searches such as:
- entity:React: Recall by entity
- attr:programming_language=Rust: Filter by attribute value
- attr:deadline: Filter by attribute name
Installation and Activation¶
The installation command given on the directory detail page is:
dsh plugin add github:modusensus/dsh-mneme
For reproducible installations, pin the commit per the directory page’s instructions. As of 2026-08-17, the latest commit on the repository’s main branch is 49b54dfa06b38f475f2984b6cb4b423dcfa821a1, which can be used as:
dsh plugin add github:modusensus/dsh-mneme#49b54dfa06b38f475f2984b6cb4b423dcfa821a1
The GitHub plugin README recommends installing via the npm package + web profile (which declares dsh.bundle and activates automatically after installation). The requiresRestart field in package.json is set to true, so a restart is required after installation:
dsh plugin --profile web add @modusensus/dsh-mneme
dsh web
To install from source:
git clone https://github.com/modusensus/dsh-mneme.git
cd dsh-mneme
dsh plugin --profile web add .
dsh web
The prerequisites from the plugin README are: DeepSeek Harness is already installed, and Node 24+ (required for node:sqlite).
Both the directory page and GitHub warn that the plugin runs with the permissions of the current DSH process, and may execute code during installation. Please review the source code repository and license before installing.
Typical Usage¶
Let the Agent Remember Automatically, Retrieve in Next Session¶
After installation and restart, you do not need to write configuration manually. By default, autoInject and autoSummarize are both true: when you state stable preferences or project agreements during a conversation, the Agent can call memory_save; at the end of the session, it will run another refinement pass and add the results to the database. The next session will start with a summary instead of a blank slate.
When you need to look up or modify entries manually, use memory_search / memory_list / memory_update. If you do not want an entry to be injected again but do not want to delete it, use memory_forget; archive it once you confirm it is outdated with memory_archive.
Edit Markdown Directly¶
Memory files are stored in ~/.dsh/memory/. Open the corresponding .md file, edit and save it, and the plugin will merge the changes back into SQLite with manual edits taking priority. This is the most obvious difference from memory plugins that only store data in a black-box vector database: the directory page summarizes this as “returning memory sovereignty to you”.
Adjust Thresholds (Optional)¶
The default configuration works out of the box. To adjust consolidation thresholds or the number of injected items, override the plugin’s settings by plugin ID in ~/.dsh/profiles/web/cordis.patch.yml. The following example is from the plugin README:
- id: dsh-mneme
name: '@modusensus/dsh-mneme'
config:
memoryDir: ~/.dsh/memory
autoInject: true
autoSummarize: true
maxInjectedItems: 5
importanceThreshold: 3
autoDream: true
dreamThresholdCount: 10
dreamThresholdChars: 5000
dreamDelayMs: 2000
For fully offline semantic retrieval, set embedProvider to local. Entity extraction, Sleep Mode, and Reranking are all explicit opt-in switches, and they are conservative by default and will not alter existing behavior unless you enable them.
Use Cases and Notes¶
It is suitable for these scenarios:
- You need to use the same DSH Agent across multiple days and want it to remember preferences, project background, and previous decisions
- You want your memory stored in local files that you can open and review or modify as Markdown, instead of only existing in an unreadable vector database
- You want retrieval to happen locally as much as possible (via local ONNX / Ollama) or at least keep API keys only in the local SQLite database
- You want background deduplication, merging, and archiving instead of unlimited accumulation of raw text snippets
Before using, please note the following points, all from the directory page or repository documentation:
1. Permissions and Supply Chain. The plugin runs with the permissions of the current DSH process and may execute code during installation. Review the GitHub source code and MIT license before installing; use pinned commits for production environments.
2. Runtime Requirements. Node 24+ is required; the README installation path targets the web profile, and you need to restart with dsh web after installation.
3. New Features Disabled by Default. Entity extraction, Sleep Mode, and Reranking are all opt-in. autoDream is enabled by default, and as your memory store grows, it will call the LLM for consolidation, which will consume model tokens and time.
4. No Default Authentication for Local API. The documentation states that DSH listens only on 127.0.0.1 by default, and the plugin API is open by default for immediate use with the web panel. If you expose the service to a local area network, you should configure an apiToken, and write operations and key interfaces will use the Authorization: Bearer header.
5. Memory Content Resides on Your Disk. The path is ~/.dsh/memory/. Vector API keys are also stored in the same SQLite database. Treat backups, permissions, and whether to include the directory in sync drives as sensitive data handling.
6. Many Similar Plugins Exist. The “Memory” category in the directory also includes plugins like graph-memory, mnemon, and dsh-memory-evolve. Community posts mark dsh-mneme as the “inspectable, editable memory” option, but it is not the only official recommendation. Choose based on whether you need to manually edit Markdown files.
Summary¶
dsh-mneme adds a local, accessible long-term memory layer to DeepSeek Harness: SQLite handles machine read/write operations, Markdown enables human review and manual edits, and autoDream performs background consolidation. Semantic retrieval and entity extraction are optional enhancements and will not change default behavior when enabled.
Directory page: https://deepseek-harness-plugin.com/zh-CN/plugins/dsh-mneme/
GitHub: https://github.com/modusensus/dsh-mneme