Introduction¶
In the development of DeepSeek Harness (DSH), maintaining contextual consistency between agent sessions is a common requirement. dsh-mnemosyne is a plugin that integrates the local-first SQLite memory system Mnemosyne into DSH. It is adapted from the official Mnemosyne Pi coding agent extension and aims to provide cross-session memory capabilities for DSH without relying on cloud services.
Core Positioning¶
The plugin provides a complete memory management toolchain and settings panel, encapsulating Mnemosyne’s memory logic as native DSH tools. Data is stored in a local SQLite database, with the default path being ~/.dsh/mnemosyne.
Installation and Activation¶
To install the plugin, run the following command via CLI:
# 安装插件到 web profile
dsh plugin --profile web add dsh-mnemosyne
After installation, restart the profile and go to Settings > Mnemosyne, then click the Setup button, or manually install the Mnemosyne CLI:
uv tool install mnemosyne-memory
Core Features¶
The plugin provides six native tools that can be directly invoked by the agent:
mnemosyne_remember: store a memorymnemosyne_recall: retrieve memoriesmnemosyne_forget: forget a memorymnemosyne_stats: view statisticsmnemosyne_sleep: perform session consolidationmnemosyne_bind: bind a workspace
In addition to tool invocation, the plugin includes the following management features:
- Memory Dashboard: Integrated via the Settings panel or Better Sidebar, it provides memory overview, filtering, bulk editing, and triple management.
- Automatic Consolidation: Enabled by default; every 10 persisted turns, it checks the number of working memories and performs consolidation.
- Filter Management: Supports filtering by trust level, expiration time, and importance, and supports bulk modification of attributes.
- Configuration Sync: The settings panel reads and manages
config.yaml, with one-click reset to default values supported.
Automatic Memory Mechanism¶
Automatic memory is enabled by default, ensuring context continuity through the following mechanisms:
- Prompt Injection: Injects the
# Mnemosyne Memoryheader into the system prompt to inform the model that memory is available. - Automatic Sync: Automatically saves user messages (filtering out messages injected by the plugin) to make conversations persistent.
- Automatic Prefetch: Retrieves relevant memories and injects them into the context before model calls.
- Session Isolation: Memories are partitioned by DSH session_id; new sessions inherit the
sessionScopebehavior by default (unless manually migrated).
Data and Configuration¶
- Data Isolation: All data is stored in
~/.dsh/mnemosyne, fully isolated from the data of other plugins such as Hermes. - Configuration Sources: Configuration is divided into the DSH side (saved in the settings panel) and the Mnemosyne side (
config.yaml).
Notes¶
- Prerequisite Dependency: The Setup button in Settings requires the
uvtool to be available in PATH. - Behavior Compatibility: Existing installations retain the old
sessionScopebehavior by default. That is, memories in legacy sessions may not be retrievable by the new session isolation logic and need to be manually migrated through the dashboard. - Permission Execution: The plugin runs with the permissions of the current DSH process. Please review the source code and license before use.
Summary¶
dsh-mnemosyne fills the gap in cross-session memory management for DSH plugins. By using local SQLite storage and automation mechanisms, it lowers the barrier to adoption. It is suitable for agent development scenarios that require long-term memory capabilities.