Preface¶
The core philosophy of DeepSeek Harness (DSH) is “Everything is a Plugin.” For users using loci as a local knowledge base, managing knowledge often requires switching between the CLI tool and the Web interface. loci-dsh provides a pure UI-layer solution, integrating loci’s memory features into the DSH Web UI sidebar. With this plugin, you can search, ask questions, record, and visualize your local knowledge base without leaving the conversation interface.
Introduction¶
loci-dsh is a Memory-type plugin maintained by IvenKooLab. It does not involve Python embedding or core forking, serving merely as a UI mount layer for the DSH Web server. The plugin connects sidebar tabs to the locally running loci HTTP server, enabling hybrid retrieval of the local knowledge base, LLM answer citations, and knowledge graph browsing.
Core Features¶
The plugin provides the following core views and capabilities:
- Search: Supports hybrid retrieval, adjustable result counts, retrieval of memories only (
tag=memory), and path filtering. - Ask: Answers questions based on the local knowledge base and generates citation chips within the answers.
- Memories: Displays a panoramic timeline arranged in reverse chronological order, supporting direct and quick memory recording.
- Graph: Browses loci’s knowledge graph (requires loci ≥ 0.6.0), supporting filtering of relationships by clicking entities.
- Status: Displays connection status, storage summary, and block counts for various sources.
Installation and Activation¶
Before installation, please ensure your environment meets the following dependencies:
- Node.js ≥ 24 (The DSH launcher uses
import.meta.main; Node 20/22 will exit silently). - DeepSeek Harness (dsh): Install via
npm i -g @deepseek-ai/dsh. - dsh-better-sidebar: Provides basic sidebar support; run the installation command to mount the sidebar.
- loci ≥ v0.6.2: Ensure its HTTP server is running and set a fixed Token in the configuration file.
1. Install the Plugin¶
Run the following command to add the plugin to the Web configuration file:
dsh plugin --profile web add github:IvenKooLab/loci-dsh
2. Configure loci¶
Configure the HTTP server Token in loci’s config.toml:
[http]
token = "<a random string>"
Start loci’s HTTP server (default port 8765):
loci serve-http
3. Configure the DSH Plugin¶
Edit ~/.dsh/profiles/web/cordis.patch.yml. Since DSH’s patching mechanism is “full replacement” rather than “deep merge,” you need to write an override line for loci-dsh. Note that you should not use insert, as the plugin is already mounted upon installation.
- id: loci-dsh
config:
baseUrl: 'http://127.0.0.1:8765'
token: '<与 loci config.toml 中 [http] token 相同的值>'
Configuration Details¶
The plugin supports fine-tuning via environment variables or configuration files. The main configuration items are as follows:
- baseUrl: The address for loci serve-http, defaults to
http://127.0.0.1:8765. - token: Bearer authentication token, must match the loci configuration.
- timeoutMs: Defaults to 20000ms, controls the timeout for short requests such as health checks, searches, and recordings.
- askTimeoutMs: Defaults to 180000ms, controls the timeout for the
/askAPI, which involves full LLM interactions. - graphPath: Absolute path used to enable the Graph view (defaults to reading
<store>/graph.json). - memoriesPath: Absolute path used to enable the timeline feature for the Memories view (defaults to reading the
memories/directory).
Notes¶
- Pure UI Layer: The plugin does not include a Python runtime and does not modify the core logic of DSH or loci.
- Configuration Replacement: When configuring in
cordis.patch.yml, you must list all key-value pairs you wish to override. The plugin does not automatically merge old configurations. - Version Dependency: Strictly depends on Node.js ≥ 24 and loci ≥ v0.6.2. Older versions may have compatibility issues.
Summary¶
loci-dsh solves the integration issue of local knowledge bases in DeepSeek Harness through lightweight UI mounting. It provides a complete pipeline from search and Q&A to graph visualization, suitable for developers and users who need to operate local RAG knowledge bases directly in the browser.
Plugin Directory: https://www.skillhub.cn/plugins/IvenKooLab/loci-dsh
Source Code: https://github.com/IvenKooLab/loci-dsh