Introduction

In DeepSeek Harness (DSH), using Agent presets (such as router-spec or standard) usually requires manually opening the Web interface, creating a new conversation, selecting a preset, and then entering the task. This workflow is inefficient in automation scripts or batch-processing scenarios. We need a programmatic way to reuse these preset capabilities.

Plugin Overview

yigesama/dsh-preset-run is a plugin for DeepSeek Harness. It encapsulates “Web conversation + Agent preset” into a programmatic interface. By registering a host-plane tool preset_run, you can start a brand-new independent sub-conversation in any conversation, execute a task, and return the final answer text. This is equivalent to headlessly simulating the Web UI workflow: “create conversation -> select preset -> send message”.

Installation

The plugin must be installed into a profile using dsh plugin add. After installation, restart the web process for the tool to take effect.

dsh plugin --profile web add "github:YiGeSama/dsh-preset-run"

Environment Requirements:
* DeepSeek Harness >= 0.1.0-rc.6
* Node.js >= 18 (20+ recommended)
* A usable model service configured (agent-default-model in settings.yaml)
* The target preset already exists in the deployed roster (e.g., router-spec, minimal)

Windows Notes: If installing with a local path that contains spaces, dsh plugin may report an error. It is recommended to install from GitHub or clone to a path without spaces.

Usage

Call the preset_run tool directly in a conversation. It accepts a preset ID and task text as parameters.

// 示例 1:调用路由预设
preset_run("router-spec", "请调用 dev_router_status 工具并输出结果")

// 示例 2:调用极简预设
preset_run("minimal", "1+1=?")

// 示例 3:调用标准预设
preset_run("standard", "把 README.md 里的 TODO 列表整理成表格")

Parameters:
* preset: Agent preset ID. Supports dsh official default presets (standard, code, minimal, cordis) and third-party routing presets (router-spec, router-standard).
* timeoutMs: Optional parameter that controls the maximum duration of a single sub-conversation run (default 600000ms).

Precautions

Permissions and Security:
* preset_run allows any conversation that can invoke it to start sub-conversations, which is a strong capability. When deploying in multi-user or untrusted environments, ensure only trusted callers can access it.
* Sub-conversations inherit the deployment’s default permission preset. In the default workspace-write + ask environment, if a sub-agent needs elevated permissions, it enters an approval flow. For unattended operation, configure the permission preset as danger-full-access.
* Sub-conversations are one-time use; after returning text, they are discarded and leave no history.

router-spec Limitations:
* The router-spec preset is designed to expose only core tools in the first round (read, edit, glob, grep + shell), and opens the full tool catalog after the first tool call.
* If calling dev_router_status in a router-spec sub-conversation, you must first run a shell command (e.g., pwd) to trigger the tool catalog opening.

Summary

dsh-preset-run provides the ability to programmatically reuse Agent presets in DSH, making it suitable for scenarios that require automated invocation of specific Agent behaviors.