Nodes/ComfyUI Griptape Nodes/Griptape Set: Default Agent
ComfyUI Node

Griptape Set: Default Agent

Stop reconnecting the same agent everywhere

By griptape-ai·Created 2 years ago·Updated about a year ago· 238
Griptape Set: Default Agent
  • config
  • key_value_replacement
  • OUTPUT
max_subtasks3

Every Run and Task node in this pack will happily fall back to a "default agent" when you don't connect one. This node is how you decide what that default is. Griptape Set: Default Agent takes an agent config and saves it as the pack-wide default, so every node downstream that runs without an explicit agent uses your chosen configuration instead of a surprise OpenAI default.

If you've built a workflow where half the nodes work and the other half are quietly using the wrong model, this is the fix. Connect your config node once, set it as default, and stop threading AGENT connections through every node that could just inherit the right default. It's the "set it and forget it" node for the pack's config story.

How it works

The node takes a CONFIG (from the pack's driver/config nodes), converts it to a dict, and saves it into Griptape's settings as Griptape.default_config - along with any API keys it finds on the config's drivers. From then on, agents created without an explicit config pick this one up. Run it with no config connected and it clears the default back to none. It's an output node that returns the config, so you can also just use it as a pass-through that happens to persist your setup.

The inputs

  • config - the CONFIG to install as default. Empty clears the default.
  • key_value_replacement / max_subtasks - template fill and the tool-subtask cap, carried into the default agent.

Output: OUTPUT (the CONFIG).

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). You'll want at least one config node (e.g. the OpenAI or Ollama drivers config) to actually have something to set.

Common gotchas

The subtle one: the default is persisted - it's saved to the settings file, so it survives restarts and applies to other workflows, not just the one you set it in. That's the feature, and also the footgun. If a workflow starts behaving differently than it did last week, check whether a stray Set Default Agent run changed the global default.

Then the pack-wide usuals: torch version conflicts on Nvidia (reinstall with the cu121 index) and the stale-griptape ImportError: cannot import name 'OllamaPromptDriver' (fix: python -m pip install griptape -U).

CategoryGriptape/Agent

Inputs (3)

NameTypeDefaultDescription
configoptCONFIGThe configuration for the agent. If not provided, the default configuration will be used.
key_value_replacementoptDICTThe will replace the {{ key }} with a value.
max_subtasksoptINT3The maximum number of subtasks to run when an Agent uses a Tool

Outputs (1)

NameTypeDescription
OUTPUTCONFIGText response from the Agent