Introduction¶
The DSH plugin ecosystem is dedicated to providing flexible extensibility for agent development. In the memory governance of dsh-mnemon, stale memories (superseded by new facts) accumulate alongside new facts, causing the memory store to bloat. Based on the public APIs of dsh-mnemon, this plugin introduces a conflict-driven correctness correction mechanism and provides automated inspection reports with tiered governance capabilities.
Core Features¶
This plugin offers the following capabilities:
- Conflict-driven correctness correction: Detects cases where new facts supersede old facts among memories.
- Tiered governance:
immune: Never deleted (e.g., high importance or already marked).superseded: Deleted after explicit confirmation (when conflict detection matches).watch: All remaining memories, never deleted.
- Default marking and soft deletion: Memories are marked as
supersededby default, and soft deletion is performed only after explicit confirmation. - Automated inspection reports: Reports only, never deletes.
Installation and Enablement¶
Add the plugin using the DSH plugin installation command.
dsh plugin --profile web add ./dsh-mnemon-gc-<version>.tgz
After installation, restart dsh web. The settings card is then available under “Settings → Mnemon GC”.
Typical Usage¶
The plugin supports CLI commands, tool calls, and visual editing via the Web.
-
CLI Commands
*/mnemon-gc inspect: Perform a read-only inspection.
*/mnemon-gc mark: Mark memories as superseded.
*/mnemon-gc purge-superseded: Bulk delete marked memories. -
Tools
*mnemon_gc_inspect: Read-only inspection.
*mnemon_gc_mark_superseded: Mark superseded relationships.
*mnemon_gc_purge_superseded: Bulk delete marked memories. -
Configuration and Settings
* Access “Settings → Mnemon GC” via the Web UI.
* Visually edit configuration items in the Web UI.
* Configuration items include:threshold(threshold),maxAgeDays(maximum age in days),intervalMs(inspection interval),limit(candidate limit),cliPath,dataDir.
Applicable Scenarios and Notes¶
- Dependencies: Requires
dsh-mnemon >=0.2.9andschemastery ^3.18.0. - Safety boundaries:
- Automated inspection uses
--readonlyand never writes to the store. - Automated inspection only reports and never deletes (there is no
autoPurgeconfiguration option). - Deletion is determined solely by the
supersededmark.
- Automated inspection uses
- Threshold usage:
thresholdandmaxAgeDaysare used only for sorting and review, and are never used alone as a basis for deletion.
Conclusion¶
This plugin helps maintain the correctness of the Mnemon memory store through conflict detection and explicit confirmation. All operations are traceable, making it suitable for scenarios that require fine-grained control over the memory lifecycle.
GitHub: https://github.com/Zn-Dk/dsh-mnemon-gc
Catalog: https://www.skillhub.cn/plugins/Zn-Dk/dsh-mnemon-gc