In the DSH plugin ecosystem, developers often face the challenge of connecting loose tool calls into complex workflows. dsh-intent-network aims to address this problem by parsing users’ natural-language intents into editable, observable, and learnable multi-hop tool call graphs.
What It Is¶
The plugin is maintained by helibeiqi and belongs to the workflow category. Its core responsibility is to translate user intents into structured execution plans. It consumes CDP (Context Description Protocol) semantics and uses mcp::* tools bridged in through dsh-cordis-universal-adapter to build execution graphs with conditional branches, dependencies, and fallback mechanisms.
As a Host composition layer, it works together with dsh-cdp-metadata (provides CDP semantics) and dsh-cordis-universal-adapter (bridges MCP tools). The three can be installed simultaneously without overwriting each other’s configurations.
Core Features¶
The plugin provides the following capabilities:
- Intent parsing and graphing: Parses user intents into tool call graphs.
- Semantic consumption: Consumes CDP metadata (such as
cdp_tagsandboundaries) to guide execution. - Tool bridging: Reads and executes bridged MCP tools through
dsh-cordis-universal-adapter. - Process orchestration: Supports conditional branches, node dependencies, and fallback paths.
- Planning and execution:
- Planner strategies support
llm,rule, andhybrid. - The executor supports concurrency control (
maxParallel) and loop limits (maxLoops).
- Planner strategies support
- Observability: Supports writing Traces to disk, recording execution paths and decision reasons.
- Learning mode: Supports collecting Trace data (M1 only collects and does not include algorithms).
Installation¶
Use the following command to install the plugin:
dsh plugin --profile web add github:helibeiqi/dsh-intent-network
Configuration and Enablement¶
The plugin depends on the DSH runtime supporting the Cordis plugin mechanism and injection of ctx.tools and ctx.cdpRegistry. It is compatible with @deepseek-ai/cordis >= 0.1.0 and @deepseek-ai/dsh-tools >= 0.1.0; @deepseek-ai/cdp-metadata is an optional dependency.
Set the following fields in the configuration file:
- sources: Specifies the intent graph directory; defaults to
./intents. - planner:
enabled: Whether to enable the planner; defaults tofalseto reduce overhead.strategy: The planning strategy; supportsllm,rule, andhybrid; defaults tohybrid.fallbackToLLM: Escalates to an LLM when rules are insufficient; defaults totrue.
- executor:
maxParallel: Limits the maximum number of parallel nodes; defaults to4.maxLoops: Limits the maximum number of loops to prevent runaways; defaults to3.
- observability:
enabled: Whether to write Traces to disk; defaults totrue.logPath: The directory where Traces are written; defaults to./.intent-traces.
- learning:
enabled: Disabled by default in M1 mode; only collects Traces.
Typical Usage¶
Define intent graph files under the intents directory, for example analyze_and_report.intent.json. The following example shows how to connect data retrieval, causal inference, visualization, and report generation, and how to define fallback paths:
{
"id": "analyze_and_report@v1",
"intent": "分析标的下跌原因并生成中文报告",
"nodes": [
{ "id": "fetch", "tool": "mcp::quant:get_history", "cdp_tags": ["historical_pattern"] },
{ "id": "attribute", "tool": "mcp::causal:infer", "cdp_tags": ["causal_estimate"],
"guard": "boundaries.can 含因果推断" },
{ "id": "visualize", "tool": "dsh:excel-kit", "cdp_tags": ["quantitative_metric"],
"depends_on": ["fetch"] },
{ "id": "report", "tool": "docx_gen", "cdp_tags": ["reportable"],
"depends_on": ["attribute", "visualize"] }
],
"edges": [
{ "from": "fetch", "to": "attribute", "when": "data 含干预变量" },
{ "from": "fetch", "to": "visualize", "when": "默认" },
{ "from": "attribute", "to": "report", "when": "tag=causal_estimate" },
{ "from": "attribute", "to": "__human_review__", "when": "tag=limitations 或 archetype=advisor" }
],
"fallbacks": {
"attribute->visualize": "使用 dsh-excel-kit 做相关性分析替代因果推断"
}
}
When the attribute node (causal inference) fails or lacks intervention variables, the system falls back to the visualize node (correlation analysis) according to fallbacks, without interrupting execution of the entire graph.
Notes¶
- API evolution: The DSH plugin ecosystem is still evolving. APIs may change with DSH versions, so pin compatible versions where possible.
- Dependency environment: Ensure that the DSH runtime supports the Cordis plugin mechanism and the related Context injections.
- M1 limitations: The M1 version does not include learning algorithms. It only exposes
collectTraceand an emptysuggestOptimizations; pattern mining will be implemented in later versions. - LLM fallback: The planner’s LLM mode depends on
ctx.llm. If the host does not providectx.llm, the strategy degrades torule. - Security boundaries: The plugin does not implement a sandbox. Tool side effects are the responsibility of the host environment and the tools themselves.
- Parameter limitations: Currently, node execution parameters are an empty
{}. Parameterized inputs are planned for later versions.
Summary¶
dsh-intent-network provides a mechanism for transforming intents into structured execution graphs. By configuring intent files and fallback strategies, developers can build stable and observable workflows. For scenarios requiring complex tool-chain invocations, the plugin provides a clear orchestration view.