Skip to content

feat: Optional Obsidian/Markdown vault backend for persistent memories #330

Description

@EyJunge1

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

{
  "memoryBackend": "markdown-vault",
  "markdownVaultPath": "~/Documents/Obsidian/My Vault",
  "markdownMemoryFolder": "OpenCode Memories"
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions