The core design philosophy of DeepSeek Harness (DSH) is “everything is a plugin”. When building agents that require long-term contextual memory, maintaining state consistency across conversation turns is a key challenge. yushenghai1106/dsh-memory-plugin is designed to address this issue by providing a pluggable persistent memory solution for DSH.
Plugin Positioning¶
This is a persistent memory plugin for DeepSeek Harness, maintained by developer yushenghai1106 and released under the MIT License. It does not depend on external services and directly uses Harness’s storage backend to provide memory capabilities to agents.
Core Features¶
The plugin provides the following capabilities:
- Memory maintenance: Manual maintenance of project facts and user preferences.
- Automatic retention: Automatically retain completed conversations and convert them into dynamic facts.
- Inbox processing: Asynchronously prefetch the inbox to improve response speed.
- Context recall: Recall relevant memories for the current question.
- Advanced retrieval: Supports optional semantic vector ranking and a local entity co-occurrence graph.
Installation and Enablement¶
Use the following command to install it:
dsh plugin --profile default add @yushenghai/dsh-memory-plugin
After installation, use the following command to check whether the configuration is in effect:
dsh --profile default --dump-config
In the configuration file, enable provider: local to use the built-in persistent provider.
Configuration Notes¶
By default, the plugin patches the ysh-memory configuration section, overriding settings such as manual memory, dynamic fact limits, and automatic retention policies. These defaults can be overridden in the ysh-memory entry in the configuration file.
The following are some key configuration options:
| Configuration | Default | Description |
|---|---|---|
memoryCharLimit |
2200 | Maximum number of characters of project memory injected at the start of a session. |
userCharLimit |
1375 | Maximum number of characters of user preferences injected at the start of a session. |
recallLimit |
4 | Maximum number of facts returned per recall. |
recallMaxChars |
6000 | Maximum number of characters of recalled reference context included in the model request. |
maxFactCount |
1000 | Maximum number of retained dynamic facts. |
prefetchTtlMs |
30000 | Cache duration for inbox prefetch results (milliseconds). |
autoRetain |
true | Whether to automatically retain completed conversations. |
When configuring ranking weights, at least one weight should be greater than zero. It is recommended that their total sum be close to 1.
Compatibility and Notes¶
- Version requirement: This plugin targets DeepSeek Harness
0.1.2-alpha.2or later. - Required services: The selected Profile must include the general storage, Agent, LLM, and tool services provided by
@deepseek-ai/dsh-base. - Storage isolation: The local provider uses a separate
ysh_memorystorage domain and does not share records with other memory plugins. - Usage recommendation: When adjusting weights, it is recommended to keep their total close to 1 to make the relative ranking effect easier to understand.
Summary¶
By following the steps above, you can integrate persistent memory capabilities into DSH. For detailed documentation, source code, or to submit an issue, visit the plugin directory or the GitHub repository.