Preface¶
The agent bundled with DeepSeek Harness (DSH) is typically a loop of “one model + a bunch of tools”: how it reasons in between and which tool to call first are hard to separate and modify within the conversation.
If you want to break down a multi-step agent into a visible flowchart — specifying sequence and parallelism, which model to use at each step, and which steps go directly through MCP — and after orchestration turn it into a DSH preset selectable in chat with one click, the community plugin dsh-plugin-agentflow (repo CC19990113/dsh-plugin-agentflow) provides a canvas-based orchestration solution. Maintainer: CC19990113; classified as “Workflow” in the SkillHub directory.
What is this¶
AgentFlow is a plugin for DSH: it provides an AgentFlow entry in the desktop left sidebar, uses a visual canvas to connect nodes such as LLM and MCP into a DAG (Directed Acyclic Graph), and the entire graph can also be run from the conversation side via plugin tools; the orchestration result can be exported as a DSH profile preset. The plugin comes with its own execution engine and local API service, automatically launched by the plugin after installation — no need to manually start the engine process separately.
Compared to a “black-box loop”, the README’s positioning is: each card on the canvas corresponds to one agent step, and you decide the number of steps, the topology, the models and tools, as well as the acceptance criteria for each step.
Core features¶
Nodes and execution model¶
- Node types: LLM (calls a model), MCP (directly calls tools, not going through the model), Dispatch (root node, serving as the conversation entry).
- Execution: Pure DAG — nodes with no upstream run first, nodes on the same layer can run in parallel; failure of one branch does not block other branches.
- Model channel: All calls go through DSH’s
ctx.llm(exposed to the engine via the llm bridge inside the plugin); inference intensity and a fallback model can be configured separately for each node.
Canvas and presets¶
- Each canvas corresponds to one DSH preset; cards mark the “conversation entry” root node; if you modified the canvas but did not write it back to the preset, the UI will show Preset not updated.
- Editing is auto-saved to local data; clicking “Save” (or ⌘S) will generate or overwrite the DSH preset.
- After export, the preset is written to
~/.dsh/profiles/<profile>/cordis.patch.yml(the default profile isdesktop, other profiles can be specified via the environment variableAGENTFLOW_PROFILE). After restarting DSH, the new session’s preset list can select this preset. The root node carries the persona, and a list of child nodes is attached during export.
Conversation-side tools¶
The plugin exposes tools agentflow_list and agentflow_run to the model, making it easy to list canvases and execute them in chat.
Validation and themes¶
- The top-bar “Validate AgentFlow” will actually run the entire graph once (consuming tokens), used to check whether the flow is smooth; cards mainly show a configuration summary and do not pile up run outputs.
- The canvas theme follows DSH; in the default
nativerendering mode it reads the host theme and syncs in real time; it can also be rolled back toiframeembedding an independent page via configuration.
Architecture highlights (for troubleshooting)¶
The DSH desktop process loads the plugin’s index.js, the child process node runtime/server.mjs listens on the default 127.0.0.1:8791, providing only the API; DAG execution is in engine.mjs, and model calls are completed within the DSH process. runtime/ is a copy of the engine synced at build time, so the plugin is ready to use upon installation. The current npm package version is 0.3.1 (subject to package.json), license MIT.
Installation and enabling¶
Requirements: DSH desktop 0.2.x, Node 22+. The README notes it has only been verified on macOS; Windows paths and commands have not been tested.
The plugin runs with the current DSH process permissions; before installation, it is recommended to review the source code and LICENSE on GitHub and confirm the source is the maintainer’s repository.
From npm¶
DSH → Settings → Plugins → Add plugin → enter:
dsh-plugin-agentflow
From GitHub¶
CC19990113/dsh-plugin-agentflow
After installation, restart DSH. The AgentFlow entry appears in the left sidebar; the backend is automatically launched by the plugin (default 127.0.0.1:8791), so there is no need to manually run a startup command.
Typical usage¶
1. Manage the canvas list¶
Open AgentFlow and view each canvas along with its conversation entry in the list; pay attention to the “Preset not updated” prompt to avoid still using the old preset in chat.
2. Orchestrate on the canvas¶
- Drag cards to adjust positions, and drag lines from card edges to connect upstream and downstream.
- Click a card to configure the model, inference intensity, fallback model, skills, and MCP tools.
- Use “Add downstream / Add upstream” to quickly derive new cards.
- After confirming the flow, click “Save” to write the orchestration into the preset.
3. Validate then export¶
First use the top-bar “Validate AgentFlow” to run through the entire graph (it will consume tokens), then save. The example structure of the preset root node is as follows (child node names and completion criteria are based on your canvas):
你是「AgentFlow」的对话入口。
你只负责和用户对话:问清需求、确认关键信息。
需求明确后,严格按照后续节点的 AgentFlow 流去执行,不要自己直接产出结果。
【完成标准】…
【子节点】共 4 个
- 大纲:根据给定的题材,写一个三幕剧的简要大纲
- 对白版:为关键场景写几句有张力的对白
…
4. Use in chat¶
After restarting DSH, select the exported preset in the preset list of a new session; you can also trigger execution from the conversation via agentflow_list / agentflow_run.
Configuration items¶
Can be adjusted in plugin configuration (see README for default values):
| Item | Default | Description |
|---|---|---|
| Data directory | ~/.dsh/agent-flow-data |
On first launch, migrates from ~/.dsh/agent-flow/data |
| Backend port | 8791 |
Plugin config item agentflowPort |
| Preset profile | desktop |
Environment variable AGENTFLOW_PROFILE |
agentflowRenderMode |
native |
native inline canvas; iframe embeds an independent page |
agentflowUrl |
http://127.0.0.1:8791 |
API base address under native; canvas page address under iframe |
Applicable scenarios and notes¶
Suitable for: Developers who need to break down multi-step agents into maintainable DAGs, want to uniformly go through the model channel within DSH, and hope the orchestration result can be preserved as selectable presets.
Notes:
- Validation and running graphs actually call the model, so pay attention to token consumption.
- Runtime state is globally shared: switching canvases while running a graph may cause events to be discarded; “Stop” does not distinguish by canvas.
- The preset depends on DSH profile’s patch mechanism; when the profile structure changes, corresponding adjustments are needed.
- The community directory SkillHub plugin page is an independent site, with no official affiliation with DeepSeek / Huanfang; the repository’s current GitHub stars is about 3 (subject to page display).
Links¶
- Directory page: https://www.skillhub.cn/plugins/CC19990113/dsh-plugin-agentflow
- Source code and documentation: https://github.com/CC19990113/dsh-plugin-agentflow