Nodes/ComfyUI Griptape Nodes/Griptape Create: Agent
ComfyUI Node

Griptape Create: Agent

Building Your First Griptape Agent

By griptape-ai·Created 2 years ago·Updated about a year ago· 238
Griptape Create: Agent
  • agent
  • config
  • tools
  • rulesets
  • key_value_replacement
  • OUTPUT
  • AGENT
input_string
STRING
max_subtasks3

This is the node the whole pack orbits. Griptape Create: Agent builds a Griptape agent - an LLM-driven structure that can hold rules, use tools, remember conversations, and answer your prompt - and spits back both the answer and the agent object itself so you can reuse it downstream. If you install ComfyUI-Griptape and do nothing else, this is the node you'll build a workflow around.

What it is, honestly

Griptape is a Python framework for LLM agents, and this pack grafts it onto ComfyUI's node graph. The community's verdict on that idea is basically "straight awesome" - people who wanted to build real agent pipelines in ComfyUI instead of one-shot chat forms keep landing on this pack. Create Agent is where that idea becomes tangible: you wire in a config (which picks your LLM), optionally some rules and tools, type a prompt, and get a text response.

The key architectural detail: the agent persists as a first-class object in your workflow. The second output isn't just for show - wire it into other task nodes and they reuse the same agent, same memory, same drivers. That's the difference between "call an API" and "run an agent."

The inputs that matter

Most are optional, and that's on purpose:

  • STRING - the prompt text. Leave it empty and the node just creates the agent (you'll get "Agent created." and a usable AGENT output for later nodes).
  • agent (AGENT) - an existing agent to reuse. If you pass one, you extend it rather than starting fresh.
  • config (CONFIG) - the configuration node that picks your prompt driver. This is how you choose OpenAI vs. Ollama vs. Bedrock vs. Gemini, etc. No config = default config, which usually means you need an API key set in Settings → Griptape.
  • rulesets (RULESET) - behavior control. Combine Rules List outputs go here.
  • tools (TOOL_LIST) - capabilities. Combine Tool List outputs go here.
  • key_value_replacement (DICT) - fills {{ key }} placeholders in your prompt from a dictionary.
  • input_string (STRING) - appended to STRING with a newline. Handy for dynamic text from other nodes.
  • max_subtasks (INT, default 3) - caps how many tool-call back-and-forths the agent can do. Lower it to save tokens, raise it for long tool chains.

Outputs

  • OUTPUT (STRING) - the agent's text reply (or an error message if something failed).
  • AGENT - the agent object. Connect this to other Griptape nodes to keep the same brain.

Installation

Part of ComfyUI Griptape Nodes:

  • ComfyUI Manager: search "Griptape" → install.
  • Manual: cd ComfyUI/custom_nodes && git clone https://github.com/griptape-ai/ComfyUI-Griptape, restart ComfyUI.

You'll also need either a paid API key (set under Settings → Griptape in the ComfyUI sidebar) or a local LLM via Ollama (ollama run llama3) or LM Studio. The README's whole "Ultimate Configuration" section is about which driver nodes feed this agent.

Troubleshooting

The two things that bite everyone:

  • "OpenAI API key is missing" - you're using the default config with no key set. Either set OPENAI_API_KEY in Griptape settings or attach a config node pointing at a provider you've configured.
  • Blank/error model complaints - the node explicitly checks for a blank model in the config and raises a clear error. If you see it, your config node isn't fully wired.

The pack's other classic install issues (torch version fights, ImportError: cannot import name 'OllamaPromptDriver' when griptape didn't update properly) are all in the README's troubleshooting section - worth reading before you add this pack to a production ComfyUI.

Start small: no tools, no rules, one config, one prompt. Then add the Combine nodes once the basics feel right.

CategoryGriptape/Agent

Inputs (8)

NameTypeDefaultDescription
agentoptAGENTAn existing agent to use. If not provided, a new agent will be created.
configoptCONFIGThe configuration for the agent. If not provided, the default configuration will be used.
toolsoptTOOL_LISTOne or more tools to use with the agent.
rulesetsoptRULESETOne or more rules to use with the agent. Use these to control the agent behavior.
input_stringoptSTRINGAdditional text be appended to the STRING with a newline character.
key_value_replacementoptDICTThe will replace the {{ key }} with a value.
STRINGoptSTRINGThe prompt text.
max_subtasksoptINT3The maximum number of subtasks to run when an Agent uses a Tool

Outputs (2)

NameTypeDescription
OUTPUTSTRINGText response from the Agent
AGENTAGENTThe Agent. Can be connected to other nodes.