Host-neutral durable DAG workflows for Agents with CLI, MCP, on-demand Skills, triggers, replay, and a visual Canvas.
Install
# from npm (prebuilt)
dsh plugin --profile web add @gm-hz/agent-dag-workflow
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:GM-HZ/agent-dag-workflow
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
简体中文 · English
Agent DAG Workflow is a host-neutral runtime for defining, running, and recovering directed acyclic graph (DAG) workflows. A single WorkflowTemplate can run through the CLI, Codex Skill, MCP gateway, DeepSeek Harness (DSH), or TypeScript SDK. Your host supplies tools, agents, and permissions. The runtime validates the graph, executes its nodes, and records the run for inspection, recovery, and replay.
Documentation · Runnable examples · WorkflowTemplate v1 specification
Quick start
Requires Node.js 22.19 or later. Create a directory and install the package:
mkdir adw-quickstart
cd adw-quickstart
npm install @gm-hz/agent-dag-workflow
The package includes a workflow that processes three sample orders. Validate the template, save a draft, publish it, and run revision 1. This example needs no model account or external tools.
adw_examples=node_modules/@gm-hz/agent-dag-workflow/examples
npm exec -- adw validate "$adw_examples/script-transform.workflow.json"
npm exec -- adw draft put "$adw_examples/script-transform.workflow.json"
npm exec -- adw publish script-transform-demo --expected 1
npm exec -- adw run script-transform-demo@1 --input "$adw_examples/inputs/script-transform.json"
Look for data.status set to completed and a data.outputs object containing:
{
"customer": "GM-HZ",
"orderCount": 3,
"total": 100,
"approvedIds": ["A-100", "A-102"]
}
In the same directory, replace RUN_ID with data.runId from the run output to inspect its recorded events:
npm exec -- adw trace RUN_ID --events
The CLI stores drafts, published workflows, and run history in .agent-dag-workflow.db in the current directory. To use a different SQLite file, pass the same --db path to each command that reads or writes workflow data. The package exposes both adw and agent-workflow as names for the same CLI.
Build your own workflow
Start with the sample template and the authoring guide. A template declares its input and output schemas, nodes, edges, and required capabilities. Use a script node for JSON transformations, a condition node to select a branch, or a foreach node to call a tool or agent for each item.
Validate and save your template as a draft. Publish it using the revision returned by the draft command, then run the published workflow by its explicit id@revision. The published revision is immutable. Hosts that supply external tools or agents configure a Host Adapter to resolve capabilities and apply their own permission and credential policies.
Use a run's trace to inspect node and output events in sequence. Recorded replay starts a new run from a completed run, reuses committed external results, and recalculates deterministic steps. Live replay calls the external capabilities again.
Choose an integration
| If you use | Start here |
|---|---|
| A terminal or CI | Use the adw CLI to validate, publish, run, and trace a workflow. |
| Codex | Install the Codex plugin and on-demand Skill to discover and run workflows through the CLI. |
| An MCP client | Connect the fixed MCP gateway. The invoke profile exposes tools to search, describe, run, and inspect workflows. |
| DeepSeek Harness | Use the DSH bundle and Canvas to edit workflows and open traces in the Web app. Check supported DSH versions under engines.dsh. |
| Your own Node.js application | Import WorkflowRuntime from @gm-hz/agent-dag-workflow and connect your host tools and agents. |
See the examples for approval gates, parallel calls, and subworkflows. The operations guide covers SQLite storage, recovery, and delivery.
License
Links
More in this category
loopx-project/loopx#dsh-loopx-plugin★ 6769
LoopX, a provider-neutral, local-first state kernel and control plane for long-horizon agents: keeps Goal, Todo, gate, evidence, quota, recovery, and handoff state above DeepSeek Harness, while the plugin bootstraps the CLI and skills, admits bounded same-session continuation, and adds a loopback GoalBar for the exact bound loop. Its HTTP routes have no DSH access check, so a web page open in your browser could call them.
Q00/ouroboros#integrations/dsh-plugin★ 6389
Config-only bundle that mounts Ouroboros through the DSH MCP client, exposing 36 interview, Seed, execution, evaluation, and evolution workflow tools in DSH.
chuspeeism/dashi-taskboard#deepseek-harness★ 3539
Embeds the active installed Codex Taskboard runtime in the DeepSeek Harness sidebar, using its launcher runtime descriptor instead of a fixed port.
NanmiCoder/dsh-agent-teams★ 3120
AgentTeams multi-agent teams.
EthanYoQ/AI-Novel-Writer#dsh-ai-novel-writer★ 2944
Installs a dedicated AI novel-writing preset and workbench: revisioned local project assets, a compact side drawer, and native approval-gated single-file changes.
shanliuling/dsh-image-gen★ 1798
Native conversational image generation for DeepSeek Harness: ask the agent to create an image, and it handles generation and keeps the result directly in the conversation.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.