Nodes/ComfyUI Griptape Nodes/Griptape Expand: Agent Nodes
ComfyUI Node

Griptape Expand: Agent Nodes

Tear a Griptape agent apart to see what's actually inside it

By griptape-ai·Created 2 years ago·Updated about a year ago· 238
Griptape Expand: Agent Nodes
  • agent
  • AGENT
  • PROMPT_DRIVER
  • RULESETS
  • TOOLS
  • MEMORY

A Griptape agent is a bundle: it's got a prompt driver, rulesets, tools, and memory all tucked inside one object, and when it misbehaves you usually can't tell which part is at fault. Griptape Expand: Agent Nodes unzips it. Feed it an agent and it hands you every component on its own output socket, so you can inspect, rewire, or replace the piece that's letting you down.

This is a debugging and refactoring tool first, a workflow tool second. When an agent returns something unexpected, the fastest way to isolate why is to expand it and look at what's actually configured.

How it works

The mechanism is nearly transparent. The node takes one required input - agent (typed AGENT) - and calls expand() on it. Under the hood that reads agent.prompt_driver, agent.rulesets, agent.tools, and agent.conversation_memory, then hands each back on its own socket. It also passes the agent itself through unchanged, so you can expand in the middle of a chain and keep the agent flowing to a Run Agent node afterward.

Five outputs, and they map cleanly to the pieces you'll want to touch:

  • AGENT - the same agent, unchanged.
  • PROMPT_DRIVER - what model/provider the agent talks to. This is the usual suspect when an agent "doesn't know" something: the wrong driver, or a driver with a weak model.
  • RULESETS - the behavior rules the agent is operating under.
  • TOOLS - the tools it can reach.
  • MEMORY - its conversation memory.

The practical pattern: expand an agent, grab the PROMPT_DRIVER, and feed it into a fresh driver node to build a variant with a stronger model - no need to rebuild the whole agent from scratch.

Installing

Ships with the ComfyUI Griptape Nodes pack:

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

Dependencies are the pack-wide set: griptape[all], openai, python-dotenv, plus git-hosted extensions in requirements.txt. One shared install caveat: Griptape pulls torch as a dependency and can clash with ComfyUI's build - if the GPU goes weird after installing, reinstall torch with the CUDA index per the README (--extra-index-url https://download.pytorch.org/whl/cu121).

Gotchas

The outputs only show what's actually on the agent - if an agent was created without tools or memory, those sockets come back empty, and that's often the bug you were hunting. Also, "expand" is not "edit": this node reads the agent's parts, it doesn't change them. If you want to swap components onto an agent, you're looking for the replacement nodes (Griptape Replace Tools on Agent, Griptape Replace Rulesets on Agent) that the pack ships. Expand first to diagnose, replace to fix.

CategoryGriptape/Agent

Inputs (1)

NameTypeDefaultDescription
agentAGENT

Outputs (5)

NameTypeDescription
AGENTAGENT
PROMPT_DRIVERPROMPT_DRIVER
RULESETSRULESET
TOOLSTOOL_LIST
MEMORYMEMORY