Preface¶
Running agents in DeepSeek Harness (DSH) often relies on the current session and manually written prompts for context. As projects multiply and sessions grow longer, past pitfalls, organized processes, and documented knowledge become difficult to retrieve at the right moment. Local file or SQLite solutions can perform keyword searches but lack semantic recall strength; memories and resources are typically managed separately, requiring re-export when switching tools.
Below we introduce the community plugin dsh-openviking: integrating OpenViking into DSH to provide unified semantic search, resource management, automatic recall, and session memory. Maintained by Rxiain, the repository uses the MIT license and currently has about 9 stars on GitHub.
What This Is¶
dsh-openviking is an OpenViking plugin for DeepSeek Harness, providing a set of memory-related model tools and slash commands on the DSH side, with underlying read/write operations to OpenViking’s viking:// virtual file system.
Compared to “just stacking Markdown locally,” OpenViking uses vector recall plus L0/L1 summary hierarchical content loading; remote URLs and local documents can be added to the repository via memadd; the same repository can be shared by DSH, Claude Code, Codex, MCP clients, and the ov CLI. The plugin also handles indexed repository context injection, automatic recall per turn, and session synchronization with auto-commit.
Runtime requirements include Node ^22.19.0 or >=24.0.0; the plugin is written in TypeScript, with current version 0.1.0.
Core Features¶
Memory and Retrieval Tools¶
The plugin exposes the following tools to models (names match the README):
| Tool | Function |
|---|---|
memsearch |
Semantic search, modes: auto / fast / deep (deep uses session context) |
memfind |
Quick semantic lookup without session context |
memread |
Read viking:// URIs, modes: abstract / overview / read / auto |
membrowse |
Browse viking:// file system, operations: list / tree / stat |
memgrep |
Exact or regex content search, default scope: viking://resources/ |
memglob |
Enumerate files by glob pattern |
memadd |
Add remote URLs or local text under viking://resources/ |
memremove |
Delete resources, requires literal confirm: true |
memqueue |
Check observer queue status (background tasks like embedding, summary generation) |
memcommit |
Commit current session and extract persistent memory |
memlearn |
Proactively consolidate experience: write/merge memories or craft skill playbooks, including deduplication and sanitization, with immediate injection into current session |
Automatic Recall and Session Synchronization¶
Each user message can trigger one related memory recall (autoRecall), supporting both user and agent spaces; configurable with injection count, relevance threshold, per-item character limit, and token budget. Within the same message, refreshes can be done at tool step intervals, injecting only new memories.
For step-based problems like auditing, recovery, compensation, replay, verification, repair, diagnostics, or migration, the plugin activates a procedure lane in addition to regular global recall: filtering branches in the user memory tree with paths containing markers like methodology, playbook, workflow, runbook, pattern, case, skill, etc., retrieving up to 16 procedure branches, each with a 3-second timeout, without blocking current model steps on failure.
On the session side, support includes automatic commit (autoCommit) based on user turn count or time interval, consolidating conversations into persistent memories.
Slash Commands¶
| Command | Function |
|---|---|
/memlearn <lesson> |
Manually trigger memory consolidation; same origin as memlearn tool; does not initiate model turns, and raw input does not enter session logs |
Installation and Activation¶
Before use, an accessible OpenViking service is required; the plugin defaults to connecting to http://localhost:1933.
One-click installation (repository includes pre-built lib/, no local build needed):
sh install.sh [profile-name] # Default profile: dsh-openviking
Or manual installation:
dsh plugin --profile <name> add github:Rxiain/dsh-openviking
dsh --profile <name>
Alternatively, add via plugin configuration in DSH settings. Community directory page: SkillHub - dsh-openviking.
Connecting OpenViking and Account¶
Management commands require a root key (local service typically at ~/.openviking/root_api_key.txt):
ROOT=$(cat ~/.openviking/root_api_key.txt)
printf '{"url":"http://localhost:1933","api_key":"%s"}' "$ROOT" > /tmp/ov-root.conf
export OPENVIKING_CLI_CONFIG_FILE=/tmp/ov-root.conf
ov admin create-account dsh --admin dsh-admin
ov admin register-user dsh dsh --role user
ov admin regenerate-key dsh dsh
unset OPENVIKING_CLI_CONFIG_FILE && rm -f /tmp/ov-root.conf
Enter the returned key into the plugin configuration’s apiKey, and fill in account and user with the corresponding account and user.
Override Configuration¶
In the profile’s cordis.patch.yml, write the full configuration under id: openviking (patch completely replaces config). Example of common items:
- id: openviking
config:
endpoint: 'http://localhost:1933'
apiKey: !!js process.env.OPENVIKING_API_KEY ?? ''
account: ''
user: ''
agentId: 'deepseek-harness'
timeoutMs: 30000
stateFile: '~/.dsh/openviking/state.json'
repoContext:
enabled: true
cacheTtlMs: 60000
autoRecall:
enabled: true
limit: 6
scoreThreshold: 0.15
maxContentChars: 500
tokenBudget: 2000
agentSpaces: true
refreshSteps: 10
startupMapEveryTurns: 5
autoCommit:
enabled: true
turns: 3
intervalMinutes: 10
apiKey corresponds to the X-API-Key header; account, user, and agentId correspond to OpenViking’s tenant, user, and agent identifier headers respectively. stateFile only stores message IDs, not content or keys.
Typical Usage¶
Semantic Retrieval of Memory¶
The model calls memsearch or memfind when historical context is needed. memsearch’s deep mode combines with current session context; for quick repository searches without session context, use memfind.
Browsing and Reading Resources¶
First use membrowse to view directory structures under viking://, then use memread to load content hierarchically: abstract (one-sentence summary), overview (key points), to read (full text), reducing token consumption.
Adding and Removing Resources¶
Add documents or URLs to the repository:
memadd # Add remote URLs or local text files under viking://resources/
Deletion requires explicit confirmation: use memremove with confirm: true.
Consolidation and Session Commit¶
After long conversations, call memcommit to extract persistent memories; mid-session, use /memlearn <lesson> or the memlearn tool to write experiences to the repository with deduplication. Use memqueue to check background processing progress.
With autoRecall and autoCommit enabled, in most scenarios memories are automatically injected when users send messages and auto-committed after several turns, without manual invocation at each step.
Applicable Scenarios and Notes¶
Who It’s For: DSH users already running OpenViking (or planning to deploy); teams needing cross-session, cross-tool shared semantic memory and document resources; teams wanting to automatically recall procedural experiences (playbooks, runbooks, etc.) during relevant tasks.
Trade-offs with Local Solutions: The comparison table in the README points out that local FTS excels at exact matching, while OpenViking specializes in semantic recall and hierarchical loading; for only small local text with no cross-tool needs, maintenance cost may be lower. This plugin’s value lies in connecting OpenViking’s capabilities directly to the DSH toolchain, complementing automatic recall and session synchronization.
Security and Permissions: The plugin runs with the current DSH process permissions, accessing your configured OpenViking endpoint and API key. Before installation, please read the GitHub source code and MIT license to confirm that write operations like memadd and memremove comply with your data policies. SkillHub is a community directory, not officially affiliated with DeepSeek / High-Flyer.
The DSH ecosystem emphasizes “everything as a plugin”; dsh-openviking brings OpenViking’s retrieval, resource management, and dual-space memory to the Harness, suitable for agent development requiring long-term context and reusable procedural knowledge. Directory page: https://www.skillhub.cn/plugins/Rxiain/dsh-openviking; source and documentation: https://github.com/Rxiain/dsh-openviking.