dsh-pipeline: Define Multi-Node Agent Pipelines with JSON

Preface

When doing multi-step tasks in DeepSeek Harness (dsh), the common practice is to manually switch models, attach skills, paste prompts, and copy the output from the previous step into the next one in each round. As the number of steps grows, the workflow becomes hard to reuse and difficult to put into git for review. In the official discussion #7704, someone proposed turning this kind of repetitive orchestration into declarable workflows; the community plugin dsh-pipeline (maintainer yuluo554, category: workflow) is an implementation for this need: it describes a multi-node pipeline with a JSON file, compiles and runs it with a single command, and the Web UI also provides form-based editing and live run cards.

Below we explain what it is, what it can do, and how to install it and run your first pipeline.

What Is This

dsh-pipeline is a multi-node workflow orchestration plugin for DeepSeek Harness (npm package name dsh-pipeline, current version 0.2.0). It writes “per-node independent prompt / model / skills, automatic transfer of outputs between nodes, failure strategies, and cancellation propagation” into a JSON file in the workspace. After schema validation and deterministic compilation, it is handed to dsh’s official workflow-ptc engine for execution; child agents inherit the parent session workspace and consume the model credentials you have already configured in dsh.

The project is a community third-party plugin, not an official DeepSeek product; the software is provided under the MIT license. Directory page: skillhub.cn/plugins/yuluo554/dsh-pipeline; source code and documentation: github.com/yuluo554/dsh-pipeline.

Core Features

Pipeline as a File

Definitions are stored in the workspace at .dsh/pipelines/<name>.json, as pure JSON, reviewable and shareable. The compilation path is: definition → IR → plain JS scripts (no eval), and the snapshot can be frozen and verified byte-for-byte.

Node-Level Routing and Prompts

  • Each node can independently declare provider / model, so in cost-sensitive scenarios you can route outlines and writing to different tiers.
  • Nodes support sequential delivery via prompts[]; intermediate results are passed through the {{prev}} chain.
  • Cross-node template variables include {{input}}, {{<node-id>}}, and {{prev}}, automatically injecting upstream outputs.
  • Explicit DAG: use dependsOn to override implicit chaining and support joins; missing references, cycles, and self-dependencies are rejected at compile time.
  • Node-level skills[] are resolved into prompts via ctx.skills; missing skills will fail-loud.
  • Node-level outputSchema (a subset of the engine’s schema) enables safe interpolation downstream.

Failure, Cancellation, and Capability Probing

  • Node-level failure policies: abort (default), skip, retry:n; a pipeline-level default policy can be set.
  • Session interruption or AbortSignal is propagated through the engine’s shared signal to managed child agents, aiming for a clean exit.
  • If a provider lacks the agentOptions / outputSchema pathway, a readable error is given before execution, without silent degradation.

Web and CLI Entry Points

  • Web editor: a pipeline list in the settings area + form-style node editing (model dropdown reads the catalog, skill descriptions), so you don’t have to hand-write JSON.
  • Run entry page: select a pipeline, fill in the input, and run with one click; after launching, view a pipeline-run card in the session stream (node chain status, duration, tokens, dual-model cost comparison badges grouped by declared routing).
  • Commands and tools: user commands /pipeline list|show|run (without going through the model turn); a pipeline tool for models (parameters {name, input}). On installation, a bundle patch enables the workflow-ptc engine that is disabled by default in the web profile.

Currently Explicitly Unsupported or Limited

  • Node-level tools routing and model.reasoningEffort are explicitly rejected at compile time (the engine seam has no corresponding pathway); the Web editor shows these two types of fields as read-only and preserves them on round-trip.
  • Single-session orchestration: no cross-session, scheduled, or unattended scheduling; it does not replace the official workflow tool and agentTeams.
  • Only supports the dsh compatibility-locked preview line (≥ 0.2.0-rc.1).

Installation and Activation

Prerequisites

  • Node ≥ 20
  • dsh ≥ 0.2.0-rc.1 (this version is under the next tag on npm; latest still points to 0.1.x, which cannot run this plugin)

Example of installing the dsh core (from the source material):

npm i -g @deepseek-ai/dsh@next

A configured, working model provider (the plugin does not include any API keys).

Installing the Plugin

Installation under the Web profile (command from the source material):

dsh plugin --profile web add dsh-pipeline

The package contains pre-built artifacts, ready to use upon installation. To uninstall:

dsh plugin --profile web remove dsh-pipeline

To verify it is active: dsh --help does not load plugins; use dsh --profile web --dump-config to check whether a # == dsh-pipeline section appears and workflow-ptc is enabled.

Typical Usage

1. Write Your First Pipeline Definition

Create .dsh/pipelines/three-node-two-models.json in the workspace (example from the README: outline on the cheap route, review on the default route, writing on the reasoner route):

{
  "name": "three-node-two-models",
  "description": "Outline on the cheap route, review on the parent route, write on the reasoner route.",
  "nodes": [
    {
      "id": "outline",
      "label": "Outline",
      "prompts": ["Write a concise bullet-list outline for a short article about {{input}}."],
      "model": { "provider": "deepseek", "model": "deepseek-chat" }
    },
    {
      "id": "review",
      "label": "Review",
      "prompts": ["Review the outline for factual risks. Return numbered revision notes.\n\n{{outline}}"]
    },
    {
      "id": "write",
      "label": "Write",
      "prompts": ["Write the final short article about {{input}}.\n\nOutline:\n{{outline}}\n\nNotes:\n{{review}}"],
      "model": { "provider": "deepseek", "model": "deepseek-reasoner" }
    }
  ]
}

For full field descriptions, refer to the 7 examples under data/pipelines/ in the repository, as well as plan/03-模块详设.md.

2. Run from the Command Line

/pipeline list
/pipeline show <name>
/pipeline run three-node-two-models <topic...>

3. Run in Session or via Web

Tell the model to use the three-node-two-models pipeline and provide a topic, letting the model invoke the pipeline tool to launch it; or select the pipeline on the Web Settings → Pipelines run entry page and run it with one click. After running, a live run card appears in the session stream, where you can view each node’s status and usage.

Use Cases and Notes

Who it’s for: teams or individuals who need fixed “multi-step, multi-model, skills-attachable” writing or analysis workflows in dsh; scenarios where the definition should go into git and the same pipeline can be triggered from both CLI and Web.

Runtime permissions and cost: the plugin runs with the permissions of the current dsh process; pipelines create real child agents and consume real tokens (including failures and retries). Before installing, review the source code and the MIT license yourself to assess account and data risks; the community directory skillhub.cn has no official affiliation with DeepSeek / HiThink.

Environment notes (recorded from actual testing in the README): on Windows + Git Bash, global npm i -g may behave abnormally; you can instead run npm-cli directly via node; dsh must be the next-tagged 0.2.0-rc.1, otherwise the plugin may remain pending and inactive.

Closing

dsh-pipeline turns multi-node agent orchestration into versionable JSON, executes it via the official workflow-ptc engine, and provides editing, running, and run-card observation on the Web side. If you are doing multi-step workflows on the dsh preview line (≥ 0.2.0-rc.1), you can start by comparing installation commands and example pipelines from the directory page and the GitHub repository.

  • Directory page: https://www.skillhub.cn/plugins/yuluo554/dsh-pipeline
  • GitHub: https://github.com/yuluo554/dsh-pipeline
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye