Preface

When building agents in DeepSeek Harness (DSH), while the dialogue model can draft plans and modify code, tasks like “producing a usable image” or “generating a few seconds of demo video” often require switching to a separate Web interface or integrating HTTP APIs manually. Hardcoding keys into repositories, fake progress bars, and scattered generation results in temporary directories also slow down iteration.

The following is an introduction to the community plugin dsh-agnes-image (maintainer SZTMBABY, GitHub Repository SZTMBABY/dsh-agnes-image). It registers two Agent tools on the DSH side and provides a sidebar panel with four tabs: Images, Videos, Library, and Settings. Images and videos are processed via official Agnes interfaces. Prompts can be optimized with one click in the panel, and keys are entered only in Settings and stored in the local DSH data directory, never entering the code repository.

What is this?

dsh-agnes-image is a client-side bundle plugin for DSH: the host-side index.js handles configuration, Agnes calls, file storage, and tool registration; the browser-side client.js handles the sidebar and panel UI. The repository is hand-written in the DSH bundle format with no build steps, and the README declares no additional runtime dependencies.

Capability Overview (consistent with README):

  • Static Images: Model agnes-image-2.5-flash, up to 4K, with selectable ratios and batches of 1–4 images.
  • Video: Default model agnes-video-2.5-flash, 720P, duration 4–12 seconds; tasks run on the Agnes free queue, and the plugin backs off and retries rather than failing immediately when the queue is busy.
  • Prompt Optimization: agnes-3.0-flash (or optionally reuses the current DSH dialogue model).
  • Panel and Agent Tools: Share the same host code path, ensuring consistent behavior.

Plugin Directory Page: skillhub.cn/plugins/SZTMBABY/dsh-agnes-image. The community directory is an independent site with no official affiliation with DeepSeek or 幻方 (High-Flyer); please review the source code and the MIT license yourself before installing. The current npm package version is 1.4.2, requiring Node.js >= 20.

Core Features

Agent Tools

The following tools can be called directly during conversation (names from README):

Tool Function
agnes_generate_image Text-to-image / Reference-to-image, returns absolute disk path
agnes_generate_video Create video task, poll, download; default blocking time up to 15 minutes

agnes_generate_image Key Parameters: prompt (required), size (1K/2K/3K/4K), ratio (e.g., 1:1, 16:9), count (1–4), reference_images (public HTTPS URL or data:image/...;base64).

agnes_generate_video Key Parameters: prompt (required), mode (text / keyframe / reference), seconds ("4"–"12", default "5"), size (default flow is 720P), aspect_ratio, first/last frames or reference images/audio, etc.; the plugin validates media asset rules for each mode locally before requesting upstream.

Four tabs from left to right: Images, Videos, Library, Settings.

  • Images: Prompt, size, ratio, quantity, optional reference images; thumbnails appear as soon as the task is submitted.
  • Videos: Mode, duration, aspect ratio, resolution; displays queue and rendering progress after submission and polls automatically; displays poster upon completion. Hands off to the system player via “Open with Default Application” rather than playing inline within the panel.
  • Library: Toggles between Image Library and Video Library sections, displaying a card grid; videos show only posters.
  • Settings: Paste and save Agnes API Key; if unconfigured, the generate buttons are disabled with an explanation.

Progress Display Principles: Image tasks are single calls, using an indeterminate progress bar plus elapsed seconds, without faking percentages; video tasks display real upstream progress (e.g., 0/10/70/100). If stuck at the same percentage for a long time, it switches to a striped style and notes the source to avoid fake progress.

AI Prompt Optimization

Both Image and Video input boxes provide AI Optimize: it first displays a rewritten card (only the rewritten content; the original title remains in the input box). You can choose Adopt / Discard / Retry. The default backend is Agnes (agnes-3.0-flash, sharing the Key with generation); you can also select dsh in settings to reuse the Harness’s current dialogue model (this option is unavailable if no LLM is available).

Called Agnes Interfaces

Usage Model Endpoint
Image Generation agnes-image-2.5-flash POST https://api.agnes-ai.cn/v1/images/generations
Video Generation agnes-video-2.5-flash (Default; 720P) POST https://api.agnes-ai.cn/v1/videos, Poll GET https://api.agnes-ai.cn/agnesapi?video_id=&model_name=
Prompt Optimization agnes-3.0-flash POST https://api.agnes-ai.cn/v1/chat/completions

For more detailed API descriptions, see Agnes Documentation (README links): Image, Video, Text.

Installation and Activation

In an environment where the DSH CLI is installed, the installation method provided in the README is:

npm install dsh-agnes-image

Or use a profile to add the plugin to the Harness:

dsh plugin --profile <your profile> add dsh-agnes-image

After installation, open the panel Settings, paste the Agnes API Key, and save. Credentials are saved in the local %DSH_HOME% data directory (settings namespace agnes-image); no keys are carried within the repository. Until configuration is complete, generation-related controls remain disabled.

Typical Usage

Generating Images in Conversation

Explain your requirements to the Agent and have it call agnes_generate_image. The tool return format is as follows (paths vary by environment):

Agnes generated 1 image (agnes-image-2.5-flash, 2K 1:1).
Saved to disk — absolute paths:
  C:\...\default-workspace\agnes-images\2026-10-16\190212-测试:一只戴宇航头盔的柴犬.png  (836.9 KB)

You can ask the Agent to read these absolute paths in subsequent steps or view and open the files in the panel Library.

Generating Videos in the Panel

  1. Open sidebar Videos, fill in prompt, select mode, seconds, aspect ratio, and resolution.
  2. If keyframe, add first/last frames; if reference, add reference images or audio (local paths are inlined as data: URLs if they meet size and side length constraints).
  3. Observe progress text and percentage after submission; view the poster in the panel upon completion, and open the final video with the system default application; historical entries are collected in the Library.

Optimizing Prompts before Generation

After writing your intent in the Images or Videos input box, click AI Optimize, confirm the rewrite, and click Adopt to return to the input box, then generate as usual. Video side rewrites additionally consider motion, camera angles, and rhythm.

Applicable Scenarios and Notes

Who is it for?

  • Those already building agents in DSH who want to generate 4K static images or seconds of 720P video directly within the conversation and hand file paths back to the workspace.
  • Those who want to reuse the same Agnes Key between the panel and tools without writing keys into project code.
  • Those needing honest progress feedback and local library management rather than pasting temporary external links in chat.

Please be aware before use

  • The plugin runs with current DSH process permissions and will make requests to api.agnes-ai.cn and write generated artifacts to local disk; read index.js / client.js and the license before installing.
  • Video depends on Agnes queues and account quotas; the README states the free queue backs off and retries when busy, and duration varies with upstream.
  • In reference mode, local media has size and pixel dimension limits (e.g., single file 15 MB, side length 256–5760 px); exceeding these will cause errors.
  • Community directory and GitHub stars (currently about 3) are for discovery and reference only and do not represent official endorsement.

Conclusion

dsh-agnes-image integrates Agnes’s static images, short videos, and prompt optimization into DSH: two Agent tools handle automation, the sidebar handles interaction and key management, and generated results are saved to disk and can be handed off to desktop applications in the Library. If you are building “can draw, can produce video” agents in the Harness ecosystem, you can start from the directory page or the repository README’s installation commands, and then configure the Key in Settings.