Gemini Interactions Store
What Interactions Store actually does
- Session Table
- Last Interaction ID
In a pack whose entire job is to phone Google, Gemini Interactions Store is the node that never makes a call. No API key, no model, no network. It reads a JSON file on your disk and prints a table.
That sounds useless until you understand the problem. Gemini's newer Interactions API keeps conversation state on Google's side: you send a prompt, you get back an interaction_id, and you can continue that session later by handing the ID back. Silveroxides' Expanded Gemini Interactions (Text/Image) node has a store toggle and a previous_interaction_id field for exactly that - but an ID is an opaque string you'd otherwise be digging out of a terminal log. The Store node is the ledger for those sessions: which conversations exist, which model ran them, how many turns they've had, which was active last.
If you use Gemini as a prompt rewriter chained in front of your sampler, continuity is what lets turn two understand "make it moodier" without you re-describing the scene - and this node is how that survives a restart.
How the mechanism actually works
It's a class called GeminiInteractionsStoreManager and one file: gemini_interactions.json, written to ComfyUI's user directory if that exists, otherwise to your output folder. Inside is a last_interaction_id string plus a sessions list, each entry carrying an id, model, turn_count and timestamps. Continuing an interaction bumps the turn count instead of adding a duplicate row.
It doesn't collect anything itself. Writing is done by the sibling prompt node: on a successful call, with store enabled and a non-empty interaction ID, it appends to the file and updates the last-ID pointer. An empty table is a report about your prompt node, not this one.
It doubles as an auto-continue pointer. With store on and previous_interaction_id empty, the prompt node reads the store's last ID and continues that session - the console logs [INFO] Automatically continuing last interaction from store. The file, not the node, is the state, which is why a fresh workflow can pick up a conversation you thought was finished.
The inputs that matter
limit (default 10, max 100) is "Number of recent sessions to display in table" per the author's own tooltip - it sorts by last update and shows that many rows. Nothing on disk changes; the file keeps growing until you clear it, so limit is purely how much you want to look at.
clear_history is the dangerous one. Flip it on, queue, and the store is wiped - sessions and the last-ID pointer - returning the string History cleared. That's an action hidden in a boolean: save that workflow with it true and every queue nukes the table. Set it back to false as soon as you've used it, or keep one throwaway workflow for clearing.
The two outputs
Session Table is a plain fixed-width ASCII table - ID, Model, Turns, Created, Last Updated - or the literal No interactions stored. It's a STRING, so it wants Comfy's text preview node rather than anything image-shaped.
Last Interaction ID is the useful one: the raw ID string you wire into the prompt node's previous_interaction_id to resume that exact conversation. One caveat straight from the source - the table truncates the ID column to 45 characters for alignment, so copy IDs from the output, not the table cell, or you'll paste a headless string that looks valid and isn't.
Installing it
It ships with the pack, so there's no separate install. Either search ComfyUI Gemini Expanded API in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/silveroxides/ComfyUI_Gemini_Expanded_API.git
cd ComfyUI_Gemini_Expanded_API
pip install -r requirements.txt
Then restart ComfyUI. Requirements are light - google-genai>=2.17.0, numpy, torch, Pillow - and there are no model downloads. interactions_nodes.py also imports cv2, which normally comes with ComfyUI's own opencv dependency but won't exist on a trimmed install; that's an import error, not a missing node. Look under API/Gemini/Interactions in the node search.
This family is newer than the README - its parameter list covers the older API/Gemini nodes, so the tooltips on these nodes are the real spec. Pull the latest pack if the Interactions category isn't in your node list at all.
Where people get burned
"No interactions stored." Either store is off on the prompt node, or the API call failed - failures don't record, the code only writes on success. Check the console for the real error before blaming the store.
Turn counts that never go up. A repeat run with identical inputs can be served from the prompt node's local cache, which returns before anything touches the file.
Where's the file? It depends on whether folder_paths.get_user_directory() resolves on your install - the user folder when it does, output when it doesn't. Check both to read the raw JSON.
Two ComfyUI instances, one file. The lock is in-process and every save rewrites the whole file, so one server should own the state.
Given the category it belongs to - a pack that holds your API key and calls the network by design - it's reassuring that this node has no key field and no outbound socket. It's a viewer with a delete button. Just remember which of those two is which.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| clear_history | BOOLEAN | false | Clear all recorded interactions from local store. |
| limit | INT | 101–100 | Number of recent sessions to display in table. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| Session Table | STRING | — |
| Last Interaction ID | STRING | — |