dsh-wsl-vecmem: A Local Vector Memory Plugin Based on Ollama

In the development of DeepSeek Harness (DSH), giving agents long-term memory is a common requirement. Existing solutions often require setting up a separate vector database service, which comes with a relatively high configuration cost. The dsh-wsl-vecmem plugin provides a lightweight solution by using Ollama to generate embeddings locally and storing them in a JSON file to enable semantic retrieval.

What Is This

This is a DSH plugin for local semantic memory. It calls Ollama’s embedding model to vectorize short text, stores the results in ~/.dsh/vecmem/store.json, and supports retrieval by semantic similarity.

Core Features

The plugin provides three core commands:

  • vecmem_status: View the store path, embedding model, and number of currently stored items.
  • vecmem_add: Write the specified text and generate its vector.
  • vecmem_search: Retrieve relevant text by semantic similarity.

Installation and Activation

Before installation, ensure that Ollama is installed and running locally.

  1. Pull the embedding model:
    ollama pull nomic-embed-text
  1. Install the plugin in DSH:
    dsh plugin --profile web add github:173787247/dsh-wsl-vecmem

Configuration

The plugin supports adjusting parameters via a configuration file. By default, data is stored in ~/.dsh/vecmem/store.json.

config:
  enabled: true
  storePath: ""            # 留空使用默认路径
  ollamaBase: "http://127.0.0.1:11434"
  embedModel: "nomic-embed-text"
  timeoutMs: 60000
  maxItems: 5000

Use Cases and Considerations

  • Dependencies: The plugin depends on a local Ollama service (it can run on the same machine as the dsh-wsl-ollama plugin).
  • Network Access: If Ollama runs on Windows, WSL cannot directly access 127.0.0.1; you need to change ollamaBase to an address accessible from WSL.
  • Intended Use: This plugin is mainly used to complement Obsidian or a note library; it is not a vault replacement.

Summary

dsh-wsl-vecmem provides DSH with local vector memory capabilities without external dependencies. It allows you to manage text storage and retrieval with simple commands, making it suitable for scenarios that require lightweight maintenance of a local knowledge base.

For more details, see the GitHub repository.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye