DeepSeek Harness
Updated: August 18, 2026
DeepSeek Harness (dsh) is an open-source agent harness developed by DeepSeek AI. It uses an "everything is a plugin" architecture powered by the Cordis kernel. Developers can freely compose models, tools, skills, sessions, sandboxes, storage, and other capabilities through configuration—no source code modifications required.
SiliconFlow provides an official adapter plugin, @siliconflow-official/dsh-llm-siliconflow, which enables DeepSeek Harness to use all open-source chat models on the SiliconFlow platform—including reasoning models like DeepSeek-V4-Flash, DeepSeek-V4-Pro, GLM-5.2, and Kimi-K2.7-Code.
$DSH_HOMEis the dsh home directory, defaulting to~/.dsh. It can be customized via theDSH_HOMEenvironment variable. All credential and settings files referenced in this document reside under this directory.
1. Install DeepSeek Harness
Ensure Node.js is installed, then verify that dsh is available:
npx @deepseek-ai/dsh --versionIf a version number is printed, dsh is ready. Subsequent steps use npx @deepseek-ai/dsh commands—npx fetches and runs dsh temporarily, so no global installation is needed. See the Web UI guide for details.
2. Get a SiliconFlow API Key
Before configuring the adapter plugin, you need a SiliconFlow API key:
- Visit the SiliconFlow website to register or log in.
- Go to the API Keys page, create a new API key, and copy it.
The setup wizard in the next step will ask for this key. If you prefer not to use the wizard, you can set the environment variable directly:
export SILICONFLOW_API_KEY=sk-xxxxxxxxxxxx3. Install the SiliconFlow Adapter Plugin
Install the SiliconFlow adapter plugin into your dsh profile:
npx @deepseek-ai/dsh plugin --profile web add @siliconflow-official/dsh-llm-siliconflowAfter installation, run the bundled setup wizard to interactively configure your API key and select a model:
npx @siliconflow-official/dsh-llm-siliconflowThis command launches the dsh-siliconflow-setup executable bundled with the plugin package. npx @siliconflow-official/dsh-llm-siliconflow runs it regardless of which profile the plugin was installed into—the wizard only reads and writes credentials and settings under $DSH_HOME (default ~/.dsh).
The wizard guides you through:
- Confirming whether to set SiliconFlow as the default provider
- Entering your SiliconFlow API key (stored in
$DSH_HOME/.credentials.yaml)—use the key obtained in Step 2 - Automatically fetching the list of available chat models from SiliconFlow
- Selecting a default model and writing it to
settings.yaml
Tip: If you have already set the
SILICONFLOW_API_KEYenvironment variable, the wizard detects it automatically and skips manual entry.
4. Using SiliconFlow Models
4.1 Via the Web UI
-
Start the dsh Web UI:
npx @deepseek-ai/dsh webOnce started, open http://127.0.0.1:3080 to access the Web UI.
-
Click Choose workspace and add your project directory.
-
Select a SiliconFlow model (e.g.,
deepseek-ai/DeepSeek-V4-Flash) from the model picker. -
Start a session and send your task.
The agent can read and edit workspace files, run commands, delegate subtasks, and maintain a plan—asking for approval on operations that require it under the active permission policy.
4.2 Reasoning Model Support
The SiliconFlow adapter automatically detects the reasoning_content field returned by reasoning models (e.g., DeepSeek-R1, QwQ, Kimi-K2-Thinking) and translates it into harness reasoning blocks. During tool-call turns, reasoning content is serialized back into the conversation history as required by hosted models; non-tool-call turns discard it to save tokens.
4.3 Dynamic Model Discovery
The adapter fetches the list of available chat models from SiliconFlow via GET /models?sub_type=chat in real time, with a five-minute cache. When SiliconFlow adds new models, they appear in the model picker automatically—no manual configuration update needed.
4.4 Background Execution
# Run the Web UI in the background
nohup npx @deepseek-ai/dsh web > ~/.dsh/web.log 2>&1 &
# Run a one-off headless task
nohup npx @deepseek-ai/dsh --profile headless "Analyze the dependency structure of this project" > ~/.dsh/task.log 2>&1 &5. Configuration Reference
In $DSH_HOME/settings.yaml, the SiliconFlow plugin configuration looks like this:
- id: llm-siliconflow
name: '@siliconflow-official/dsh-llm-siliconflow'
config:
apiKeyEnv: SILICONFLOW_API_KEY # default env var name
baseURL: https://api.siliconflow.cn/v1 # default API endpoint
maxTokens: 8192 # per-request output cap
streamIdleTimeoutMs: 300000 # SSE stream idle timeout (ms)
defaultContextWindow: 32768 # default context window
models: # fallback model list (shown if discovery fails)
- id: zai-org/GLM-5.2
- id: deepseek-ai/DeepSeek-V4-FlashThe plugin registers a siliconflow provider route. Model IDs use SiliconFlow's org/model format (e.g., deepseek-ai/DeepSeek-V4-Flash). The SiliconFlow endpoint does not expose thinking/reasoning_effort toggles—reasoning models are selected by their model ID.
Related Links
- DeepSeek Harness website: https://www.deepseek.com/harness/en/
- DeepSeek Harness GitHub: https://github.com/deepseek-ai/deepseek-harness
- SiliconFlow adapter plugin on npm: https://www.npmjs.com/package/@siliconflow-official/dsh-llm-siliconflow
- SiliconFlow adapter plugin GitHub: https://github.com/siliconflow/dsh-llm-siliconflow
- SiliconFlow website: https://siliconflow.cn/