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

Griptape Run: Task

The flexible middle child of the Run nodes

By griptape-ai·Created 2 years ago·Updated about a year ago· 238
Griptape Run: Task
  • agent
  • key_value_replacement
  • tools
  • OUTPUT
  • AGENT
STRING
input_string

If Griptape Run: Agent is the "just answer this prompt" node, Griptape Run: Task is the one you reach for when you want the same prompt plus tools. It's the flexible middle child: give it a prompt, optionally hand it a tool or a list of tools, and the agent gets to actually do things instead of just talking.

Here's the nuance that makes it worth its own node: it picks the right task type for you based on how many tools you connect. No tools? It's a plain PromptTask. Exactly one tool? ToolTask. Two or more? ToolkitTask, which lets the agent chain multiple tools to finish the job. So one node covers three different behaviors depending on what you wire in - that's why it exists separately from Run Agent.

It's the node to use for "answer this using the calculator" or "look this up via the web scraper then summarize" style jobs where the answer depends on an action, not just the model's memory.

How it works

The node builds the appropriate task with your prompt, attaches the tools, runs it against the connected agent (or a default one), and returns the response. A couple of smarts under the hood: if a connected tool uses a dummy vector-store driver, it gets swapped for the agent's real one, and if any tool is marked off_prompt, the node adds a QueryTool so task memory still works. If the prompt comes through blank, it politely returns "No prompt provided."

The inputs

  • STRING - the prompt (required).
  • tools - a TOOL_LIST; zero, one, or many, each changes the task type.
  • agent - optional.
  • input_string / key_value_replacement - appendix and template fill.

Outputs: OUTPUT (the answer) and AGENT.

Installing

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

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

Restart ComfyUI. Deps: griptape[all], python-dotenv, openai - heavy first install.

Common gotchas

Two real ones. First, some local models (plain llama3, mistral) are shaky at tool calling - the pack even returns a warning suggesting you use the dedicated Tool Task node instead. If your agent is confidently inventing calculator results, that's the model, not you.

Second, the pack-wide environmental issues: torch version conflicts on Nvidia (reinstall with --extra-index-url https://download.pytorch.org/whl/cu121) and the stale-griptape ImportError: cannot import name 'OllamaPromptDriver' (fix: python -m pip install griptape -U).

CategoryGriptape/Agent

Inputs (5)

NameTypeDefaultDescription
STRINGSTRING
input_stringoptSTRING
agentoptAGENT
key_value_replacementoptDICTThe will replace the {{ key }} with a value.
toolsoptTOOL_LIST

Outputs (2)

NameTypeDescription
OUTPUTSTRING
AGENTAGENT