Griptape Combine: Merge Dictionary
The Node That Feeds {{ placeholders }} to Your Griptape Agent
- dict_1
- DICT
If you've ever stared at a {{ key }} inside a Griptape prompt and wondered where the value comes from, this is the node that answers it. Griptape Combine: Merge Dictionary takes a bunch of one-pair dictionaries and squashes them into a single dictionary that the rest of the pack uses for template replacement. It's the plumbing between "data I want to inject" and "the prompt my agent actually sees."
What it's for
Most Griptape agents support {{ key }} substitution in their prompt text. Build a prompt like Describe {{ subject }} in the style of {{ artist }}, and those placeholders get filled in from a context dictionary. That dictionary has to come from somewhere - and this node is how you assemble it from pieces. Wire it into the key_value_replacement input on Griptape Create: Agent (or any of the task nodes that expose it) and your agent suddenly gets runtime variables without you hand-editing prompts.
The pieces it merges are usually made by Griptape Create: Key Value Pair, which outputs exactly one key → value entry per node. Merge Dictionary is the collector that joins them.
How it works
Under the hood it's a dict comprehension: every connected input contributes its single key-value pair, and they're all folded into one output dict. The source is about as simple as it gets:
merged_dict = {list(item.keys())[0]: list(item.values())[0] for item in dicts}
The trap worth knowing: if two inputs carry the same key, the last one wins. So keep your keys unique across whatever you're merging - otherwise a variable silently overrides another and you'll spend a while wondering why your prompt never changes.
Inputs and output
There's just one input to think about:
dict_1(DICT) - connect any dictionary here and the node dynamically grows more inputs. Each one you connect becomes another pair in the merged result.
The output is a single DICT, which you wire into key_value_replacement on an agent or task node. It also plays nicely with the display nodes if you want to eyeball what's actually in the dict before it hits the LLM.
Installation
This node ships in the ComfyUI Griptape Nodes pack, so you install the whole pack:
- ComfyUI Manager (recommended): Manager → search "Griptape" → install
ComfyUI-Griptape. - Manual:
cd ComfyUI/custom_nodes && git clone https://github.com/griptape-ai/ComfyUI-Griptape, then restart ComfyUI.
The pack pulls in griptape[all], python-dotenv, openai, and a couple of git-installed driver extensions, so the first launch after install is slow while pip works through them. See the pack README for the torch troubleshooting - Griptape installing its own torch version is the classic way this pack breaks an otherwise healthy ComfyUI install.
Gotchas
- Keys must be unique across merged dicts, or later pairs silently overwrite earlier ones.
- This is a pure data node - no LLM call, no API key, nothing to configure. If it's erroring, the problem is upstream (a Key Value Pair with an empty key, usually).
For a beginner this is the "one node you didn't know you needed" of the pack: boring, tiny, and the reason template prompts with variables actually work.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| dict_1opt | DICT | A Key Value DICT. Connect a DICT to dynamically create more inputs. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| DICT | DICT | — |