Preface¶
The core philosophy of DeepSeek Harness (DSH) is that “everything is a plugin.” To enable an agent to have long-term memory in conversations and use locally accumulated knowledge assets, a local Obsidian vault needs to be connected to the DSH agent. dsh-plugin-vault-memory was created for exactly this purpose: it turns a local Obsidian vault into long-term memory storage and a workbench for the DSH agent.
Plugin Positioning¶
dsh-plugin-vault-memory is a DSH plugin maintained by zhaoxuejie and licensed under the MIT License.
It mainly solves four problems:
1. Retrieval: The agent can search notes in the vault using natural language and cite sources.
2. Memory injection: New sessions automatically inject the vault status and active projects.
3. Saving outputs: Conversation outputs are automatically organized into notes, including frontmatter and related-link suggestions.
4. Vault maintenance: Vault health inspections are provided to detect issues such as orphan notes and broken links. Writing to disk requires manual approval.
Core Features¶
The plugin provides an interactive interface through a floating card in the bottom-right corner, mainly including the following capabilities:
1. Retrieval
* Full-text search: Supports Chinese word segmentation and can handle natural-language questions.
* Structured queries: Supports filtering by dimensions such as directory, tags, and time.
* Reading with line numbers: When citing specific content, the agent can get precise line numbers.
* Semantic search: An optional feature. It uses a local model (Ollama bge-m3) for semantic vector retrieval and must be used with semantic embeddings.
2. Linking and Recommendations
* Related-note recommendations: Supports inlinks, outlinks, shared tags, and co-citation recommendation modes, with reasons included.
3. Saving Session Outputs
* Automatic saving: Saves conversation outputs as notes.
* Automatic frontmatter: Automatically generates metadata.
* Related-note suggestions: Automatically recommends which notes in the vault should be linked.
4. Vault Health Inspection
* Risk detection: Regularly scans for orphan notes, broken links, and missing overviews (missing directory pages).
* Safety mechanism: Inspection results only suggest changes and do not modify content without authorization. All write operations, including fixing broken links and creating files, require the user to manually approve them in the review interface, and automatic backup is performed before writing.
5. Floating Card Interface (GUI)
* Overview: Displays vault health, note count, broken-link count, and trends.
* Capture: Previews and saves new notes, and supports opening them in Obsidian.
* Review: Approves inspection suggestions one by one.
* Configuration: Manages the paths of connected Obsidian vaults.
Installation and Enabling¶
Install it into the web profile via the CLI:
dsh plugin --profile web add dsh-plugin-vault-memory
After installation, you must fully restart DSH (not just refresh the browser page) for the “📚 Knowledge Base” floating card to appear in the bottom-right corner.
Add the Obsidian vault path in the floating card’s Configuration section or in ~/.dsh/settings.yaml:
dsh-plugin-vault-memory:
vaults:
- path: D:\path\to\your-vault
label: main
Typical Usage¶
In DSH conversations, plugin features can be invoked directly with natural language:
- Search: “Are there any Docker-related notes in the vault?”
- Filter: “Find notes modified in the last 30 days under tools/”
- Read: “Read the ‘Git Merge’ note to me”
- Semantic search: “Search for notes related to ‘Windows command line’”
- Link analysis: “Which notes are related to this note?”
- Save: “Organize this into a note and save it to the vault”
- Inspect: “Are there any orphan notes or broken links in the vault?”
Use Cases and Considerations¶
This plugin is suitable for developers or knowledge workers who want to deeply integrate a personal knowledge base with AI conversations.
Privacy and Security:
Indexing, retrieval, and health inspections are all performed locally. Note content does not leave the local machine by default.
Dependencies:
* Semantic search: To use semantic search, Ollama must be running locally and the bge-m3 model must be pulled.
* Files with the same name: By design, the plugin does not overwrite files with the same name. If saving prompts that the same name already exists, change the title or directory and retry.
Operations Recommendations:
* After installation, be sure to fully restart the DSH process.
* It is recommended to check the health inspection regularly, but make changes cautiously. Review the proposed changes and backups first, then confirm there are no issues before writing.