Preface¶
DeepSeek Harness (DSH) plugin ecosystem capability extension. In agent development, maintaining long-term coherence is often constrained by the context window. dsh-memory aims to solve this problem. It is not merely a simple memory list, but an advanced plugin supporting hierarchical memory, vector retrieval, and knowledge graphs. Through local SQLite storage, it enables persistent management and intelligent retrieval of user interactions.
Core Features¶
The plugin mainly provides the following capabilities:
- Hierarchical Memory: Supports three-tier classification—episodic (ep), semantic (sm), and profile—automatically layered by session working directory.
- Vector Semantic Retrieval: Implements KNN cosine retrieval based on sqlite-vec, combined with FTS5 BM25 and a reranker for multi-channel fusion ranking.
- Knowledge Graph: Supports visual display, neighborhood diffusion, community clustering, and force-directed layout parameter adjustment.
- Worldline Version Management: Supports append-only versioning for memory updates, history retention, and rollback operations.
- Auto Injection and Consolidation: User messages trigger retrieval injection; new memories are automatically consolidated at the end of a turn, with decision-gate filtering included.
- Memory Housekeeping: Provides global deduplication, archiving, and LLM-based merging with periodic inspection.
- LLM Distillation: Uses a refiner model to extract high-noise turns into self-contained conclusions.
Installation and Activation¶
To install this plugin in the DSH environment, use the official plugin command:
dsh plugin --profile web add ./dsh-memory
After installation, the plugin automatically takes over related injection and consolidation logic.
Tool Interface¶
The plugin exposes a series of memory_* commands for model or developer invocation:
- memory_search: Retrieve relevant memories.
- memory_graph_neighbors: View the neighborhood of the memory graph.
- memory_housekeeping: Housekeeping inspection and governance.
- memory_profile_distill: Profile distillation.
- memory_add: Proactively record.
- memory_list: Browse memories.
- memory_versions: View the worldline version chain.
- memory_rollback: Roll back to a historical version.
Notes¶
- Runtime Environment: Requires Node.js >= 22.19 and must run within the DeepSeek Harness (DSH) environment.
- Storage: Data is stored in local SQLite.
- Version Note: The npm package name
dsh-memoryrefers only to version 0.1.0. - License: Released under the MIT License.
Related Links¶
- GitHub: https://github.com/34262315716/dsh-memory
- Catalog Page: https://www.skillhub.cn/plugins/34262315716/dsh-memory