1
0
mirror of https://github.com/comfyanonymous/ComfyUI.git synced 2026-10-24 02:49:04 +03:00
Files
ComfyUI/agent_requirements.txt
Simon Pinfold 7a28332047 Load the optional local agent through comfy-agent's v1 host (#17241)
* Load the optional local agent through comfy-agent's v1 host

Add --enable-agent. When set, ComfyUI discovers the "v1" entry point in
the comfyui.agent group, creates the host, lets it mount its own routes
on the aiohttp app during route registration, starts it once the server
is listening and stops it on shutdown. The host's state is published as
the `agent` server feature flag and an `agent_status` websocket message.

Any failure in the package (missing, outdated protocol, a raising
entry point, register or start) disables the agent and is reported
through the flag; it never stops ComfyUI from starting.

* Pin comfy-agent in agent_requirements.txt to its published version

* Keep a failing agent from escaping startup or leaving a stale flag

A host whose status() raises SystemExit no longer ends ComfyUI startup
when load() publishes the flag, and a register() failure now republishes
the agent flag as failed instead of leaving it at "starting".

* Disable an agent host whose status() exits

load() reads status() to publish the flag. A host that raises SystemExit
there is now disabled, so register() and start() skip it, matching the
"failed" flag it reports.

* Run startup callbacks from a list of hooks

The browser launch and the agent start each append a named hook, and
call_on_start runs them in order, instead of the agent block wrapping
whatever call_on_start was before it.

* Start the agent from a named call_on_start, like the browser launch
2026-10-20 21:48:03 -07:00

2 lines
24 B
Plaintext

comfy-agent==0.0.0.dev0