Nodes/ComfyUI-Autogen/Autogen Assistant Agent
ComfyUI Node

Autogen Assistant Agent

Give it a system prompt, point it at a model, add tools

By strand1·Created 2 years ago·Updated 2 years ago· 3
Autogen Assistant Agent
  • autogen_model
  • assistant_agent
agent_nameassistant_agent
system_messageYou are a helpful assistant.
tool_1None
tool_2None
temperature0.5
max_tokens1200

AutogenAssistantAgent is where this pack stops being config and becomes a thing that actually talks. It wraps AutoGen's AssistantAgent around a model from the AutogenModel node, gives it a personality via system_message, optionally straps on up to two tools, and hands you an AGENT you can drop into a Group Chat. If you're building the "LLM agent that thinks, then my image workflow draws the result" pipeline, this is the brain node.

How it works

It constructs an AssistantAgent with your system prompt, the model client, and any tools you named. Tools aren't nodes - they're Python files dropped in the pack's tools/ folder, and tool_1/tool_2 take the filename (without .py). The pack ships two: analyze_stock and duck_duck_go. A tool just needs a tool_name and an execute function, so adding your own means writing a .py, dropping it in, and restarting.

One caveat about the temperature and max_tokens inputs: the pack sets them as plain attributes on the agent after construction, but recent AutoGen releases read sampling settings off the model client instead. If cranking temperature doesn't seem to change behavior, that's a version mismatch, not you doing it wrong.

The inputs that matter

  • autogen_model (required) - the output of the AutogenModel node. Wire it here or this node raises "A model client is required."
  • agent_name (required) - just a label, but keep it unique within a chat; AutoGen will complain about duplicate names in a team.
  • system_message - defaults to "You are a helpful assistant." This is the whole job spec: tell it what it is and what it should do. Multiline, so don't be shy.
  • tool_1 / tool_2 - "None" by default, or a tool name like analyze_stock.
  • temperature (0–1, default 0.5) and max_tokens (200–16200, default 1200) - sampling knobs, subject to the caveat above.

The single output is assistant_agent, type AGENT - it wires into AutogenGroupChat, alongside at least one other agent.

Install

Same as every node in this pack: search "ComfyUI-Autogen" in ComfyUI Manager, or:

cd ComfyUI/custom_nodes
git clone https://github.com/strand1/ComfyUI-Autogen
cd ComfyUI-Autogen
pip install -r requirements.txt

Restart ComfyUI. It needs the AutogenModel node working first - there's no standalone mode.

Common issues

A typo'd tool name fails silently: the loader prints "Tool X not found" to the console and just attaches zero tools, which is confusing when your agent claims it can search the web and then can't. The stock tool needs yfinance (plus pandas/matplotlib) installed in ComfyUI's Python environment - the README calls this out explicitly; the DuckDuckGo tool needs duckduckgo-search. If a tool call errors at runtime, that's usually a missing dependency, not a broken node. And remember an assistant alone is half a workflow: it's a talker, so pair it with a Code Executor or another assistant or it has no one to converse with.

CategoryAutogen

Inputs (7)

NameTypeDefaultDescription
autogen_modelMODEL
agent_nameSTRINGassistant_agent
system_messageoptSTRINGYou are a helpful assistant.
tool_1optSTRINGNone
tool_2optSTRINGNone
temperatureoptFLOAT0.50–1
max_tokensoptINT1200200–16200

Outputs (1)

NameTypeDescription
assistant_agentAGENT