ComfyDeploy: How ComfyUI-Autogen works in ComfyUI?
What is ComfyUI-Autogen?
A collection of nodes for using Autogen with ComfyUI [a/AutoGen](https://github.com/microsoft/AutoGen): assistant agents, group chats, code executor, etc.
How to install it in ComfyDeploy?
Head over to the machine page
- Click on the "Create a new machine" button
- Select the
Edit
build steps - Add a new step -> Custom Node
- Search for
ComfyUI-Autogen
and select it - Close the build step dialig and then click on the "Save" button to rebuild the machine
ComfyUI-Autogen
A collection of nodes for using Autogen with ComfyUI
[AutoGen Stable]: assistant agents, group chats, code executor, etc.
Features
-
Autogen Model
- Initializes an OpenAI-like model via
autogen_ext.models
. - Lets you configure model name, base URL, API key, and optional capabilities like vision, function calling, and JSON output.
- Initializes an OpenAI-like model via
-
Autogen Assistant Agent
- Wraps an
AssistantAgent
fromautogen_agentchat.agents
. - Lets you specify tools (by scanning a
tools
folder), temperature, max tokens, etc. - Great for orchestrating more conversational or tool-using LLM tasks within ComfyUI.
- Wraps an
-
Autogen Code Executor
- A node wrapping the
CodeExecutorAgent
fromautogen_agentchat.agents
with a local command-line executor. - Enables code execution tasks, specifying a working directory, timeouts, etc.
- A node wrapping the
-
Autogen Group Chat
- Leverages
RoundRobinGroupChat
to let multiple agents interact in a conversation. - Terminates the chat based on a max number of messages or a specific terminate string.
- Leverages
Installation
Copy the folder
Place the ComfyUI-Autogen folder into your ComfyUI/custom_nodes/
directory.
Install dependencies
Activate the same Python environment (or virtual environment) that ComfyUI uses, then run:
pip install -r requirements.txt
Restart ComfyUI
The nodes should appear under the “Autogen” category in your ComfyUI interface.
Requirements:
autogen-core
autogen-ext
autogen-agentchat
Example
This example uses the Company Research sample from Autogen [here]
*note the
analyze_stock
tool uses the yfinance
library to retrieve stock information. It will need to be installed for this tool to work.
Todo
- vision models need integration
Contributing
Feel free to open issues or pull requests if you run into bugs, have ideas, or want to contribute enhancements. Feedback is welcome to help improve these nodes and their capabilities.