JMCAI Comfypet: Enabling Agents to Invoke Desktop-Configured ComfyUI Workflows

Introduction

Running ComfyUI locally or on a LAN usually means assembling HTTP requests in your own agent, maintaining the node graph, or exporting a separate workflow file for scripts. If you have already configured workflows and exposed parameters in the JMCAI Comfypet desktop application and would rather “select workflow → fill parameters → await result” inside a conversation instead of rebuilding a bridge layer, JMCAI Comfypet (SkillHub ID @user_8dd3bc37/comfypet-jmcai-skill) is the agent skill for that path. It queries, submits, and polls tasks through the desktop app’s built-in Workflow Bridge rather than modifying your graph or connecting directly to ComfyUI’s native API.

What Is This

JMCAI Comfypet is a community skill in SkillHub (category design-media, current version 1.2.5, publisher user_8dd3bc37). In one sentence: it lets an agent invoke already-configured ComfyUI workflows inside the JMCAI Comfypet desktop app. The package provides a CLI entry jmcai_skill.py; the agent follows the SKILL.md guide to run checks, pick workflows, submit runs, and query status. Metadata shows requires_api_key=false, so no cloud API key is needed, but the JMCAI desktop app must be running locally (or at a trusted bridge URL). Distribution link is in the skill metadata: comfypet-jmcai-Dist.

Core Features

Based on the official SKILL.md and reference docs (verify against the installed package):

  1. Health check: python jmcai_skill.py doctor verifies connectivity to the desktop app’s Workflow Bridge.
  2. List agent-facing workflows: python jmcai_skill.py registry --agent returns summary, tags, input_modalities, output_modalities, example_prompts, etc., to help choose a workflow.
  3. Submit by alias schema: use only parameter names exposed by the registry; run returns a run_id.
  4. Polling and results: status queries a run; on success, it prefers local output paths already downloaded to this machine; history shows recent records.
  5. Multimodal inputs: types like image, mask, video, audio, and file accept absolute paths when using the local bridge. With a remote bridge_url, the skill uploads them automatically as upload:<id> (file has a format whitelist).
  6. Explicit non-goals: no workflow import, no schema changes, no target binding edits, and no direct calls to ComfyUI’s native API.

Installation & Activation

Install SkillHub CLI (if not yet installed)

command -v skillhub && skillhub --version

If not installed, follow the official SkillHub instructions to run the full install script (see skillhub.md).

Install the Skill

Install with --dir pointing to the current agent’s skills directory; otherwise the default ./skills/ may not be recognized. Common paths: Cursor: ~/.cursor/skills/; Claude Code: ~/.claude/skills/; Codex: ~/.codex/skills/ or project-local .agents/skills/ (for other clients, follow skillhub.md).

skillhub install comfypet-jmcai-skill --namespace user_8dd3bc37 --dir ~/.cursor/skills/

Alternatively, have the agent follow the prompts on the SkillHub page and install @user_8dd3bc37/comfypet-jmcai-skill by referencing skillhub.md. After installation, restart or refresh the skill list as required by your client.

Configure the Bridge

Copy and edit config.json inside the skill directory (see config.example.json). By default, it communicates with the local desktop app:

{
  "bridge_url": "http://localhost:32100",
  "request_timeout_ms": 15000,
  "upload_timeout_ms": 60000,
  "download_timeout_ms": 120000,
  "network_retry_count": 1,
  "retry_backoff_ms": 1500,
  "min_bridge_version": "1.2.0"
}

The environment must have python, python3, or py available (per the skill metadata requires).

Typical Usage

A reproducible flow: confirm the desktop app and bridge, then pick a workflow, submit, and check results.

1. Check & Registry

python jmcai_skill.py doctor
python jmcai_skill.py registry --agent

Use the registry’s modalities and example prompts to choose a workflow_id, and only fill the alias parameters exposed in the schema.

2. Submit a Run (text-to-image example)

python jmcai_skill.py run --workflow <workflow_id> --args '{"prompt_1":"a cinematic scene"}'

With an image input (local path example; see references/usage.md):

python jmcai_skill.py run --workflow demo-image --args '{"prompt_1":"a clean product photo","image_6":"/absolute/path/to/input.png"}'

3. Query Status

python jmcai_skill.py status --run-id <run_id>

If the status is queued or running, keep polling in subsequent separate calls; do not fake completion. On success, present the local file paths in outputs to the user.

4. Optional: History

python jmcai_skill.py history --workflow <workflow_id> --limit 5

Bridge contract and more examples for images/videos/assets are in references/bridge.md and references/usage.md.

Use Cases & Notes

Who It’s For

  • You already maintain ComfyUI workflows in the JMCAI Comfypet desktop app and want agents like Cursor or Claude Code to trigger image/video generation, or tasks with masks, audio/video, and file inputs via natural language.
  • You accept that “parameters and workflow boundaries are exposed by the desktop app,” not modifying graphs or bindings inside the agent.

Limitations & Common Issues

  • Hard dependency on the desktop app: if doctor fails, prompt the user to start or upgrade the JMCAI app; if you see Cannot reach Workflow Bridge, first check that the app is running and bridge_url is correct.
  • No available workflows: an error like No enabled workflows are currently exposed by Workflow Bridge. means the desktop app is not exposing any workflows at the moment.
  • Security & privacy: default is 127.0.0.1; for remote bridges, ensure you trust the endpoint. General file uploads are limited to common media, subtitles, and some document extensions; arbitrary local files are not supported.
  • Error handling: on run failure, return the raw error to the user; warnings indicates the task succeeded but auto-downloading outputs may have encountered network or write issues.

The SkillHub page shows this skill’s score as 100000, with 725 downloads and 26 installs (stats per the page and subject to change over time).

Conclusion

With the steps above, you can connect agent conversations to your already-configured ComfyUI workflows: query, fill parameters, run, and poll—without maintaining a parallel interface inside the agent. Official skill page: JMCAI Comfypet on SkillHub; API endpoint: https://api.skillhub.cn/user_8dd3bc37/comfypet-jmcai-skill.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye