Nodes/ComfyUI Griptape Nodes/Griptape Run: Parallel Prompt Task
ComfyUI Node

Griptape Run: Parallel Prompt Task

Batch a list of prompts through one agent, fast

By griptape-ai·Created 2 years ago·Updated about a year ago· 238
Griptape Run: Parallel Prompt Task
  • agent
  • string_list
  • OUTPUT

Some jobs are a thousand one-shot prompts in a trench coat: caption fifty images, draft twenty tag variations, review a list of headlines. Griptape Run: Parallel Prompt Task is the node that doesn't make you run them one at a time.

You feed it an agent and a list of prompts (STRING_LIST), and it runs a PromptTask for every item in the list - in parallel, inside a Griptape Workflow structure - then concatenates the answers into one text output. This was added in v2.2.14 explicitly to "greatly speed up workflows where you want to pass a large list of strings to an Agent and get the response on each one," and it's one of those changes that quietly becomes a habit. For an image-captioning loop or a batch rewrite, this is dramatically faster than chaining sequential runs.

How it works

The node snapshots the connected agent's config - its prompt driver, rulesets, task settings - then builds a Workflow, creates a separate PromptTask per string in the list, and runs them in parallel. The single OUTPUT is the concatenation, with each response labeled ### input_<n>: followed by its answer. If no agent is connected it falls back to a default agent, which works but usually isn't what you want for a serious batch job.

One honest caveat: "parallel" means concurrent API calls if you're on hosted models. That's the whole speed win, but it's also the whole credit burn, and rate-limited tiers may throttle you mid-batch.

The inputs

  • string_list - the list of prompts, one per item. Comes from the pack's Combine: String List node (or anything emitting STRING_LIST).
  • agent - the agent to run each prompt through.

Output: OUTPUT, the concatenated, labeled results.

Installing

ComfyUI Manager → search "Griptape" → Install, or:

cd ComfyUI/custom_nodes
git clone https://github.com/griptape-ai/ComfyUI-Griptape

Restart ComfyUI. Heavy deps (griptape[all], python-dotenv); make sure the pack updates past 2.2.14 or this node won't be there.

Common gotchas

The pack-wide torch conflicts (reinstall with the cu121 index) and the stale-griptape ImportError: cannot import name 'OllamaPromptDriver' (fix: python -m pip install griptape -U) apply here like everywhere.

Two node-specific notes: the output is one giant blob, so if you need the answers separately, plan to split on the ### input_ markers downstream. And if your strings come out garbled, check that your STRING_LIST is actually a list and not a single string - the node iterates whatever it gets, and a single string iterates per character, which is a comedy of errors you don't want.

CategoryGriptape/Agent

Inputs (2)

NameTypeDefaultDescription
agentoptAGENTThe agent to use for the task.
string_listoptSTRING_LISTA list of prompts to send to the agent.

Outputs (1)

NameTypeDescription
OUTPUTSTRING