Preface¶
The DeepSeek Harness (DSH) plugin ecosystem emphasizes “everything is a plugin.” When building or using agents, retaining and retrieving long-term memory are common pain points. Vector databases often require extra deployment, managed services raise data ownership concerns, and session distillation plugins are usually limited to a single session or difficult to control manually.
dsh-markdown-memory attempts to solve the above problems. It reduces long-term memory to an ordinary Markdown folder, allowing every developer familiar with file operations to directly control how memory is stored and read.
Core Features¶
This plugin mounts the memory directory as part of the system prompt. Each persisted fact corresponds to a Markdown file, with metadata stored in YAML frontmatter.
- Zero infrastructure: no daemons, databases, accounts, or embedding pipelines required. Point it at a folder and it works.
- Human owned: memory is stored as plain text. You can read, edit, run
git diff, or delete it directly. Ownership of the memory belongs entirely to you. - Agent agnostic: based on file format rather than bridging protocols. Any agent that can read files can access this memory without migrating data.
- YAML frontmatter support: supports
name,description, and custommetadata. - Index file support: by default,
MEMORY.mdserves as the index file, recording all memories. - Recursive file listing: supports recursively listing files under a directory.
- Trigger retrieval: supports recalling memory on demand based on keywords (triggers) during session steps.
- Session seed memory: supports injecting key facts at the start of a session.
- Deduplication: automatically deduplicates in the session log to avoid repeated injection.
- Obsidian mounting: can directly mount an existing Obsidian vault as a memory source.
- Ignore patterns: supports filtering files using ignore patterns such as
.obsidian,.git,.trash, andnode_modules.
Installation and Enabling¶
Run the following command in the terminal to install the plugin:
dsh plugin --profile <name> add dsh-markdown-memory
After installation, you need to specify the absolute path to the memory directory in the configuration file. Configuration options include path, indexFile, maxBytes, and sectionOrder, as well as parameters controlling recursion and file count (such as maxFiles and maxDepth).
Typical Usage¶
Configuration Example¶
Add configuration in cordis.patch.yml and specify the memory directory path:
- id: markdown-memory
name: dsh-markdown-memory
config:
path: /absolute/path/to/your/memory
indexFile: MEMORY.md
maxBytes: 32768
sectionOrder: 120
recursive: true
ignore: ['.obsidian', '.git', '.trash', 'node_modules']
maxFiles: 500
maxDepth: 8
recall: true
maxRecallPerStep: 3
caseSensitiveTriggers: false
Mounting Obsidian Vault¶
If you already have an Obsidian vault, you can mount it directly as a memory source:
- id: markdown-memory
name: dsh-markdown-memory
config:
path: /absolute/path/to/YourVault
indexFile: Home.md
The model will receive the root index of the vault and relative paths for all notes, and can use [[wikilink]] to reference them.
Setting Seed Memory¶
For key facts that must be present at the start of a session, add seed: true to the file frontmatter:
---
name: deploy-ritual
description: the release steps that must not be reordered
metadata:
seed: true
---
Never reorder the migration step ahead of the backup step.
Setting Triggers¶
For memory that should be retrieved on demand, define triggers in the frontmatter:
---
name: deploy-ritual
metadata:
triggers:
- deploy
- release checklist
---
Never reorder the migration step ahead of the backup step.
Notes¶
- Absolute paths: the memory directory must be configured with an absolute path. If the path is missing or not a directory, loading fails.
- Session refresh: edits to the index file or memory files do not take effect until the next session starts. You need to restart the session to see changes.
- Large vault optimization: for vaults with many files, it is recommended to increase both
maxFilesandmaxBytesto accommodate the complete file listing. - File type restriction: only
.mdfiles are included in the index; other file types (such as attachments) are ignored. - Trigger matching: trigger matching is literal substring matching, and is case-insensitive by default.
Summary¶
dsh-markdown-memory returns memory to files in the file system. It does not introduce additional complex components; by leveraging existing file management habits, it makes memory storage, editing, and version control transparent and controllable. For developers who value data autonomy and lightweight deployment, this is a pragmatic long-term memory solution.
Plugin directory: https://www.skillhub.cn/plugins/SYMlp/dsh-markdown-memory
Source code: https://github.com/SYMlp/dsh-markdown-memory