Introduction

The core philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” When building agents, LLM sessions are stateless, which means agents cannot benefit from historical experience or long-term context. OpenViking handles persistent storage, while the dsh-ov-memory plugin injects memory into conversations or mirrors conversation streams back to OpenViking, removing the barrier between dialogue and memory.

What It Is

dsh-ov-memory is a plugin that connects OpenViking persistent memory to DeepSeek Harness (DSH). It is maintained by developer xiaono1 and follows the MIT license. By reusing peer packages already installed by DSH, the plugin provides capabilities such as automatic memory recall, session mirroring, threshold-based commits, offline replay, and MCP tool bridging.

Core Features

  1. Automatic Recall: Before each step begins, the plugin retrieves content related to the current input from OpenViking and injects it into the conversation. Deduplication and token budget control are handled on the server side.
  2. Session Mirroring: Writes user / assistant messages in real time to the dsh-<session-id> session stream in OpenViking, allowing background extraction into long-term memory.
  3. Threshold Commit: Automatically commits when pending_tokens reaches the threshold (keeping the most recent N messages as active messages); performs a fallback commit when the session closes.
  4. Offline Outbox Queue: When OpenViking is unreachable, write operations are persisted to disk and automatically replayed idempotently after the connection is restored.
  5. /memlearn Manual Consolidation: Directly writes an experience into long-term memory via a slash command. Supports secret masking, semantic deduplication and merging; when offline, it automatically goes to the outbox.
  6. Custom MCP Tool Bridge: Provides a stdio server plus streamable-HTTP upstream, exposing server tools as mcp__openviking__*.
  7. viking:// URI Guard: Intercepts local tools and treats viking:// virtual paths as local files.
  8. Zero Runtime Dependencies: Reuses the @deepseek-ai/* peer packages already installed by DSH, with no additional npm dependencies.

Installation and Enabling

Before installing, please ensure your environment meets the following requirements:
* DeepSeek Harness 0.1.x (≥0.1.0-rc.6) release line
* Node.js ^22.19.0 or >=24
* An accessible OpenViking server (local or remote)

The installation command is as follows:

dsh plugin --profile <profile> add github:xiaono1/dsh-ov-memory

Note: If another plugin in the profile already occupies the mcp__openviking__* namespace, the two cannot coexist. Remove it first before enabling this plugin.

Typical Usage

Configure Connection

The default connection target is http://127.0.0.1:1933. Credentials follow the unified resolution order of the OpenViking ecosystem (environment variables, ~/.openviking/ovcli.conf, ~/.openviking/ov.conf). To explicitly override this, write the following in the profile’s cordis.patch.yml:

- insert:
    - id: ov-memory
      config:
        - id: ov-memory-runtime
          config:
            endpoint: 'http://127.0.0.1:1933'
            apiKey: 'your-user-key'
            recall:
              enabled: true
              budgetTokens: 2000
              scoreFloor: 0.35
            capture:
              toolResults: false
              skipSubagentSessions: false
            commit:
              thresholdTokens: 20000
              keepRecentCount: 10
            learn:
              minScore: 0.5

Use Slash Commands

In the conversation, use the /memlearn command to directly write an experience into long-term memory. This does not start a model turn, and the original content is not written to the session log.

Environment Variables

Connection information can be configured via environment variables:
* OPENVIKING_URL / OPENVIKING_BASE_URL: server address
* OPENVIKING_API_KEY / OPENVIKING_BEARER_TOKEN: authentication credentials
* OPENVIKING_ACCOUNT / OPENVIKING_USER: tenant/user
* OPENVIKING_PEER_ID: fixed actor peer
* OPENVIKING_PENDING_DIR: outbox directory (default ~/.openviking/pending)

Applicable Scenarios and Notes

This plugin is suitable for agent development scenarios that require long-term memory, context reuse, and offline fault tolerance. Because the plugin runs with the current DSH process permissions, it is recommended to inspect the source code and license before installation.

Conclusion

dsh-ov-memory brings OpenViking’s memory capabilities into the DSH ecosystem through standardized interfaces, helping developers build agents with persistent memory. For more details and documentation, refer to the catalog page or the GitHub repository.