Introduction¶
In DeepSeek Harness (DSH), a single subagent delegation is often sufficient; however, as tasks extend and participants multiply, common issues arise: context bleed within the same conversation, downstream agents attempting to patch holes when upstream deliverables are insufficient, and the loss of previous decision-making and “lessons learned” records after node retries or recovery. dsh-agent-graph writes multi-step tasks as a YAML graph with dependencies, scheduled by the engine within the session via the /graph command. Each node is an independent DSH subagent activation, utilizing structured handoffs between nodes. When deliverables are insufficient, it allows for bounded rework requests to the direct upstream, while writing progress and decisions into a hierarchical global ledger. Below, we introduce what it is, what it can do, and how to install and run the examples.
What is this?¶
dsh-agent-graph is a DSH workflow plugin published by community maintainer wrc093. The npm package name is also dsh-agent-graph. The version referenced in the current documentation is 0.2.1, the license is MIT, and the runtime environment requires Node.js >= 22. In one sentence, its positioning is: graph orchestration of “scoped agent nodes” within a DSH session—featuring structured handoffs, bounded rework, and a hierarchical global ledger.
The plugin is available in the SkillHub directory and the GitHub repository. The directory site is an index for the community ecosystem and has no official affiliation with DeepSeek or Quantwai (High-Flyer).
Core Functions¶
The capabilities summarized in the documentation correspond to mechanism descriptions in the README, rather than relying solely on prompt constraints.
Task Decomposition and Validation
Nodes and needs dependency edges are described in YAML. Before execution, the engine validates for cycles, unknown references, duplicate IDs, and other issues.
Node Execution
Each node executes a ctx.subagents.start('spawn', …) upon activation, carrying scope hints, upstream handoffs, ledger pointers, and structured output schemas. Nodes do not share conversations; an activation only sees the node’s own prompt, direct upstream deliverables, and the ledger.
Inter-Node Deliverables
Handoffs have a fixed structure (summary / artifacts / openIssues), injected into the activation context of every direct downstream node.
Rework on Upstream Insufficiency
Downstream nodes can initiate bounded rework requests to their direct upstream, accompanied by evidence and acceptance criteria. The upstream may provide the missing information, refuse the request, or forward it turn-by-turn according to the protocol.
Shared Memory
Each run corresponds to a ledger (README → index → node chapters → details). Nodes read and write to it, and the engine deterministically regenerates it; it is readable by both humans and other agents.
Failure and Recovery
The system fails fast on errors; /graph resume can be used to retry failed or interrupted nodes.
Observability
/graph status and the on-disk ledger; activation, handoff, and rework trajectories are all persisted to disk.
Web Orchestration (V2)
Upon installing the Web profile, an Orchestration (编排) tab appears in the session title bar, offering a drag-and-drop DAG canvas, node inspector, dependency editing, and graph validation (marked as Visual DAG editor V2 in the documentation).
Comparison with built-in DSH capabilities (Summary from README table): Graph orchestration is more suitable when explicit dependencies, more than two or three participants, and traceability of “who decided what” (even after node reconstruction) are required. For simple one-or-two-step delegations, the built-in subagent remains sufficient.
Installation and Activation¶
Add the plugin under the DSH Web profile using the installation command from the README:
dsh plugin --profile web add dsh-agent-graph
Please review the repository source code and MIT license prior to installation. The plugin runs with the current dsh process permissions; as with any DSH plugin, you should confirm its behavior meets your security and compliance requirements.
Typical Usage¶
Graph Documents and Command Entry¶
Graphs are driven by the human command /graph within a DSH session, rather than being a model-facing tool. The nodes themselves are ordinary subagents that can utilize host-granted tools.
The repository includes a five-node example examples/feature-delivery.yaml and a scripted dry run requiring no model (examples/fake-script.json). You can demonstrate it locally in the root directory of the cloned or downloaded repository:
npm install
npm run demo
A real run starts live subagents for the same graph, with example output resembling the following (paths depend on the actual workspace):
/graph run examples/feature-delivery.yaml
Started run feature-delivery-20260918-024342 (graph "feature-delivery", 5 nodes, concurrency 2).
Ledger: /path/to/workspace/.agent-graph/runs/feature-delivery-20260918-024342
Track with /graph status; nodes are DSH subagents, so this may take a while.
Viewing Run Status and Node Ledger¶
/graph status
Run feature-delivery-20260918-024342 — feature-delivery · status completed
activations 7/24 · started 2026-09-17T18:43:42.782Z · finished 2026-09-17T18:43:42.807Z
node state try handoff
implement ok 2 nodes/implement/handoff/v1.md
research ok 1 nodes/research/handoff/v1.md
spec ok 1 nodes/spec/handoff/v2.md
test-plan self_handled 2 nodes/test-plan/handoff/v1.md
tests ok 1 nodes/tests/handoff/v1.md
/graph show test-plan # prints that node's ledger section
The example dry run also demonstrates two rework outcomes: implement asks spec for missing details and receives supplements (provided); test-plan asks implement for interface boundaries, is refused (out of scope), and handles it itself (declined → self_handled). Exchange records are found under requests/.
To validate a graph file, you can use the repository script (same CLI source as the demo):
npm run validate
Use Cases and Notes¶
More Suitable For
Tasks with real dependency structures (e.g., research → spec → implement → test-plan → tests), involving many participants, where decision-making and handoff versions need to be preserved after retries, resumes, or follow-ups.
Not Strictly Necessary For
Single or dual-step delegations without complex dependencies; the built-in subagent path is shorter. It addresses adjacent problems to the built-in workflow (JS orchestration scripts written by the model) or ralph (immutable goal iterations); refer to the README comparison table to select a combination.
Usage Notes
- Graph execution may take a long time as nodes are DSH subagents.
- The first node failure terminates the entire run; use /graph resume to recover.
- Web orchestration capabilities depend on --profile web installation; a dsh-agent-graph binary is also provided for the CLI (see the bin field in package.json).
- Data is persisted to .agent-graph/runs/ under the workspace at runtime; see the corresponding sections in the repository README for specific limitations and troubleshooting.
Conclusion¶
dsh-agent-graph uses a declarative dependency graph to define node boundaries, utilizes handoffs and bounded rework to regulate upstream-downstream collaboration, and employs a hierarchical ledger to preserve memory across activations. It is suitable for breaking down long-chain tasks like “delivering a feature” into traceable multi-agent workflows within DSH.
- Directory Page: https://www.skillhub.cn/plugins/wrc093/dsh-agent-graph
- GitHub: https://github.com/wrc093/dsh-agent-graph
- Chinese README Link (in repository):
README.zh-CN.md