The DSH (DeepSeek Harness) plugin ecosystem emphasizes modularity and extensibility, but in real development, agents often face pain points such as “context loss” or “chaotic memory management.” How to achieve cross-session memory retrieval, incremental updates, and data synchronization while ensuring data security is key to building long-term agents.
What It Is¶
dsh-mnemos is a controlled, self-evolving, and extensible DSH plugin maintained by Rottenwooood, designed specifically for cross-session memory. Through an approval workflow and an open bus mechanism, it addresses the problems of traditional memory systems lacking governance, being hard to maintain, and lacking extensibility.
Core Features¶
This plugin provides a complete memory lifecycle management capability:
- Controlled Writes: All memory writes (including model tools, user instructions, and third-party plugins) go through a manual approval queue. Sensitive or duplicate writes are rejected, and high-risk writes must wait for confirmation. Written content is marked as “unverified” by default.
- Memory Retrieval and Indexing:
- Use
memory_searchfor retrieval. - Inject a “memory index” (KV-cache friendly) at the beginning of each session. Re-inject the index when a certain amount of time has passed or when keyword matches occur, greatly reducing token costs.
- Use
- Batch Distillation:
memory_distillcan batch-process buffered conversation content into memory candidates, performing incremental deduplication and conflict detection. - Memory Conversion:
memory_to_skillcan formally convert a normal memory entry into a DSH SKILL (Markdown file), soft-delete the source memory, and ensure the activity of the skill. - Open Memory Bus:
mnemosBusallows other DSH plugins to access the memory system through interfaces such asrecall(read-only retrieval),record(write and enqueue), andsubscribe(listen for changes). Third-party writes must declare their identity. - Storage and Synchronization: Based on local SQLite (WAL + FTS5) storage, it supports cross-device synchronization, rollback, recovery, and backup through the Git protocol.
Installation and Enabling¶
As a DSH plugin, this module is distributed and installed through the DSH ecosystem. Please obtain the installation package from the official plugin directory or related repositories. After installation, the plugin automatically mounts mnemosBus to the context (ctx.mnemosBus).
Typical Usage¶
User-Side Commands¶
In a DSH conversation, interact via the /memory command:
- Search and List:
/memory search <query>
/memory list
- Approval Workflow:
/memory approve <id>
/memory reject <id>
*All newly written memory entries enter the pending approval queue and take effect only after approval.*
- Batch Processing and Skill Conversion:
/memory distill [path]
/memory skill list
/memory import <source> <path>
*`import` supports automatic detection and import of ChatGPT, Claude Code, Codex, and DSH history records.*
- Git Operations:
/memory git <status|log|rollback|restore|remote|push|pull|backup>
Plugin Development Interfaces¶
Other plugins obtain the bus instance via ctx.inject(['mnemosBus']):
- Retrieval:
bus.recall({ query, limit })
- Record (Write):
bus.record(input, identity)
*Note: You must pass `identity` (including name and version), and writes automatically enter the manual approval queue.*
- Subscribe to Changes:
bus.subscribe(listener)
Use Cases and Notes¶
- Use Cases: DSH projects that require long-term memory, have high data security requirements, need cross-device memory data synchronization, or want to build third-party plugins with memory capabilities.
- Notes: The plugin runs with the permissions of the current process; please ensure the source is trustworthy. Data is stored in local SQLite; configure Git synchronization strategies as needed.
Summary¶
By introducing an approval mechanism, an open bus protocol, and local indexing technology, dsh-mnemos provides DSH agents with a secure and extensible memory layer. It not only solves the context forgetting problem but also provides standardized infrastructure for the long-term evolution of memory.