Problem
opencode-mem stores memories in its internal database and exposes them through its own UI.
Many users already maintain their knowledge base in an Obsidian vault (plain Markdown files).
Keeping a separate memory store creates duplicate content and makes memories harder to inspect,
edit, version, and reuse outside OpenCode.
Proposed solution
Add an optional Markdown-vault backend, compatible with Obsidian vaults.
This is an integration with an existing vault, not an attempt to recreate Obsidian or build a
second note-taking application.
The vault should remain the source of truth. opencode-mem should use its internal database
only as a rebuildable semantic-search index.
Expected behavior
- Configure a vault path, e.g.
obsidianVaultPath or a generic markdownVaultPath.
- Import and index existing Markdown files from the selected folder.
- Store AI-created memories as readable Markdown files with YAML frontmatter.
- Detect file additions, edits, and deletions and update the vector index accordingly.
- Allow semantic search across indexed vault notes.
- Inject the most relevant notes into OpenCode context as memories do today.
- Preserve normal Obsidian conventions, including tags, links, folders, and user edits.
- Keep the feature optional; the current internal storage remains the default.
Example configuration
Problem
opencode-memstores memories in its internal database and exposes them through its own UI.Many users already maintain their knowledge base in an Obsidian vault (plain Markdown files).
Keeping a separate memory store creates duplicate content and makes memories harder to inspect,
edit, version, and reuse outside OpenCode.
Proposed solution
Add an optional Markdown-vault backend, compatible with Obsidian vaults.
This is an integration with an existing vault, not an attempt to recreate Obsidian or build a
second note-taking application.
The vault should remain the source of truth.
opencode-memshould use its internal databaseonly as a rebuildable semantic-search index.
Expected behavior
obsidianVaultPathor a genericmarkdownVaultPath.Example configuration
{ "memoryBackend": "markdown-vault", "markdownVaultPath": "~/Documents/Obsidian/My Vault", "markdownMemoryFolder": "OpenCode Memories" }