Introduction¶
When building agents in DSH, the common approach is to register a bunch of model tools, allowing the agent to call APIs directly. Image and video generation often require separate handling of credentials, output paths, and asynchronous polling, which also fail to align with the harness’s settings page and session workspace. Below is an introduction to the community plugin dsh-agnes (maintainer Lennon-lylt): it connects Agnes’s generation capabilities to DSH, using the Settings Page to manage configuration and API Keys, and employing a bundled skill + standalone CLI to execute generation. The agent completes calls by running commands via the shell, rather than registering model tools on the host side.
What is this¶
dsh-agnes is a “Model Inference” category plugin for DeepSeek Harness. In one sentence: Agnes AI image / video generation — the Settings Page handles configuration, and actual calls go through a bundled skill.
- Repository: github.com/Lennon-lylt/dsh-agnes
- Community Directory: skillhub.cn/plugins/Lennon-lylt/dsh-agnes
- Current package version (from
package.jsonin materials): 0.6.1, targeting the DSH 0.2.x line; thedsh-agnes@0.6.0on the registry targets 0.1.x. The README explicitly advises not to click upgrade on the old package in the marketplace to avoid incompatibility with 0.2.x. - License: MIT; Node >= 20.
The Host side registers the agnes settings namespace, two same-origin routes for configuration/credentials, and the bundled skill (skills/agnes/SKILL.md, where {{CLI}} is replaced with the absolute path of the CLI in the installation directory). No model tools are registered — the capability resides in the skill, executed by the agent using the shell to run lib/cli.mjs.
Core Features¶
Settings Page and Configuration Storage¶
The Client side registers Settings → Agnes in settings.section, allowing configuration of API Key, model, dimensions, output directory, polling parameters, etc. The page probes transports in order: ctx.remote.settings → settingsScope (0.1.x) → Host side routes /api/dsh-agnes.settings (config) and /api/dsh-agnes.credential (credentials). In the Web client of DSH 0.2.0-rc.2, the first two are often undefined for plugin contexts, so the third same-origin /api channel is actually used most often.
Configuration lands in a plugin-owned file: <DSH_HOME>/storages/agnes/config.json, structured as { version, revision, values }. Read priority: Built-in defaults → DSH settings namespace (lower) → This file (highest). The page POSTs writes with a revision for conflict detection; if the file is edited manually, the host re-reads based on mtime.
API Key Storage and CLI Read Order¶
The authoritative source is the DSH Credential Store; upon saving, the host mirrors it to <DSH_HOME>/storages/agnes/api-key (0600) for the standalone CLI process to read. The environment variable AGNES_API_KEY has the highest priority. CLI retrieval order: Environment Variable → Key File (The CLI cannot read the DSH Credential Store).
Executor: Pure Node CLI¶
lib/cli.mjs is a pure Node process without Cordis or DSH ctx. It reads the same settings and Key files, reusing lib/agnes-api.mjs. Stdout outputs only a single JSON object (process info goes to stderr): Success { ok: true, files|task }, Failure { ok: false, error, kind, hint } with exit code 1.
Artifacts are downloaded to disk immediately from the URL returned by Agnes (URLs expire and are not used as deliverables). Disk write order:
--out → Output directory in settings → <Current Working Directory>/agnes-output/<Date>/ → <DSH_HOME>/agnes-output/<Date>/; the result will include fellBack: true upon fallback.
Skill and Agent-side Usage¶
After installation and filling in the API Key on the settings page, the skill is already hanging in the skill directory; the agent reads SKILL.md and executes the CLI when needed. The example in the README is as follows (The <Plugin Directory> in the path will be replaced with the actual absolute path upon installation):
node "<Plugin Directory>\lib\cli.mjs" image --prompt "Ancient town under neon rainy night, Chinese illustration style" --size 2K --aspect 16:9
node "<Plugin Directory>\lib\cli.mjs" image --prompt "Change to line art style" --images .\photo.png
node "<Plugin Directory>\lib\cli.mjs" video --prompt "Drone flying over snow-capped mountains" --size 720P --wait=180000
node "<Plugin Directory>\lib\cli.mjs" task list
node "<Plugin Directory>\lib\cli.mjs" models
node "<Plugin Directory>\lib\cli.mjs" config
Subcommands also include task status/wait/cancel --id <taskId>, etc. See the repository README for details.
Implementation Trade-offs Related to Agnes API Behavior (Summary of Actual Tests in Materials)¶
The following comes from actual tests recorded in the plugin README in October 2026, used to understand the design of the CLI/skill, rather than third-party SLAs:
| Capability | Description |
|---|---|
| Text-to-Image | POST /v1/images/generations, returns URLs by default; supports pixel pairs and 2K/4K + aspect_ratio |
| Image-to-Image | Image endpoint accepts base64 data URI as image input |
| Text-to-Video | POST /v1/videos asynchronous; poll GET /agnesapi?video_id=..&model_name=.. |
| Video First Frame | Video image only accepts public URLs; data URIs are silently discarded — if the plugin side wants to use a local image as the first frame, it needs to exchange it for a public URL first via methods like Image-to-Image |
Installation and Activation¶
Please use the DSH installer, and do not manually copy the package directory into profiles/<profile>/node_modules (this causes profile inconsistency, preventing the harness from starting). The commands provided in the official README are as follows:
dsh plugin --profile web add dsh-agnes
If installing from a local directory:
dsh plugin --profile web add file:D:\path\to\dsh-agnes
After installation, restart DSH to allow the profile to recombine, then open Settings → Agnes to fill in the API Key. Hot-loading on the desktop client takes effect immediately for the host side; in the browser, the newly loaded old client package requires a page refresh (F5) for the new settings page to take effect.
Before local directory installation: If a development self-check has created a junction pointing to the profile node_modules, the node_modules link must be deleted before installation, otherwise the installer’s full-tree copy may result in ENOENT (The README has specific error examples and cmd /c rmdir examples).
Uninstallation or rollback should use the installer or marketplace UI; manual remnants require cleaning up both the directory and the profile manifest declaration.
Typical Usage Flow¶
- Install the plugin as per the previous section and restart DSH, configuring API Key, model, output directory, etc., in Settings → Agnes.
- In the agent session, the model calls
cli.mjsvia the shell based on the bundled skill (e.g., Text-to-Image, Image-to-Image, Text-to-Video, andtask wait). - Check files under
agnes-output/<Date>/in the session workspace or the configured output directory; when troubleshooting, usenode .../cli.mjs configto view the resolved configuration (excluding keys).
Developers can run the self-check scripts listed in the README within the repository (such as scripts/selfcheck.mjs, scripts/client-page.check.mjs, scripts/smoke.mjs with AGNES_API_KEY); it is recommended to run at least the schema self-check before installation.
Applicable Scenarios and Notes¶
Who it fits: Developers already using Web profiles on DSH 0.2.x, who want the agent to call Agnes for image/video generation via skill + CLI, and wish to manage Keys and default models centrally on the harness settings page.
Permissions and Security: The plugin and CLI run with the permissions of the current DSH process and agent shell; API Keys are written to the DSH Credential Store and may be mirrored to a local Key file. Before installation, you should read the source code and MIT license to assess whether you accept the plaintext Key file or prefer using the AGNES_API_KEY environment variable.
Ecosystem Note: The DSH community plugin directory (such as SkillHub) is an independent site and has no official affiliation with DeepSeek / High-Flyer; the facts in this article come from the GitHub README and the provided package metadata.
Troubleshooting Tips: If the settings page indicates no available settings transport, expand the probe report to check if /api/dsh-agnes.settings is non-JSON (common when the host side is not loaded or the route is not registered); the page has an error boundary to avoid a blank screen. See the “Settings Page Troubleshooting” section in the repository README for more comparison tables.
Conclusion¶
dsh-agnes splits Agnes generation capabilities into “Configuration within DSH + CLI execution guided by skill,” adapting to the settings and /api routes of 0.2.x, and handling details like output disk writing and video first-frame URLs. For further information, please visit the Community Directory Page and the GitHub Repository.