Runware Messages
Messages — build a conversation, one node at a time
- messages
- messages
Runware's catalog isn't just images - there are text-inference models in there too, and chat-style text models take a list of messages as their prompt rather than a single prompt string. This builder is how you construct that list: each node adds one message, you chain them together, and the result feeds a model node's messages socket. It's the closest this pack gets to "prompt engineering," and it's blessedly simple.
The inputs
- role - required enum:
userorassistant. Who's speaking. This is what turns a pile of text into a conversation instead of a prompt salad. - content - required STRING. The text of the message.
- messages - the chain input. Same type as the output, so you wire message after message in reading order.
How to use it
Wire the first node's messages output into the second node's messages input, set the second node's role/content, and so on. The model node gets the whole ordered history. A typical shape for a task:
- Node 1: role
user, content "You are a copywriter who writes product blurbs in a dry tone." - Node 2: role
assistant, content "Understood. Give me a product and I'll write three options." - Node 3: role
user, content "A mechanical keyboard with a rotary volume knob."
The system-style instruction lives in the first user message - there's no separate system role here, just user and assistant, so front-load the context. Order absolutely matters, and because the chain is linear it's easy to read back: the graph is the conversation history.
Output and wiring
Output is RUNWARE_MESSAGES. Wire it into a text model node's messages socket. If the text node you're using takes a plain prompt instead, you don't need this builder.
Install
The usual, once per machine:
cd ComfyUI/custom_nodes
git clone https://github.com/Runware/ComfyUI-Runware
pip install -r ComfyUI-Runware/requirements.txt
Restart, add your Runware API key (Settings → Runware API key, or RUNWARE_API_KEY).
The honest take
It's a three-field node and it's basically done - the only real thinking is designing the conversation, which is a writing task, not a settings task. Two practical notes: keep the chain readable by routing outputs left-to-right, because a tangled messages chain is miserable to debug; and remember each run of the model node bills the whole conversation context, so a long history costs more than a short one. If your workflow is single-shot text generation, skip this entirely and use the prompt field. This is for the cases where the model needs to remember something you said three messages ago.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| role | COMBO | The role of the message author. | |
| content | STRING | The text content of the message. | |
| messagesopt | RUNWARE_MESSAGES | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| messages | RUNWARE_MESSAGES | — |