Griptape Replace: Tools on Agent
Give an agent new hands mid-graph
- agent
- tools
- AGENT
Tools are what turn a Griptape agent from a chat model into something that can do things - calculate, read a file, scrape a URL, query a vector store. This node swaps an agent's toolset for a new one in one shot, and it's the difference between building three agents and building one agent you re-tool three times.
The "Replace" is literal. The node rebuilds the agent with whatever tools you connect and discards the old set. Connect nothing and you get the agent back bare-handed, which is exactly how you strip tools you don't want running.
This is the node you reach for when one workflow needs a calculator-toting agent and another needs the same model equipped with a web scraper. It pairs naturally with the Griptape Replace: Rulesets on Agent node - same idea, one for the brain, one for the hands. You can chain the two: retool, repersonality, then run.
How it works
The node pulls the agent's config, conversation memory, task memory, and rulesets, then constructs a fresh agent with your new tools attached. The TOOL_LIST input takes one or more tools - a single tool node, or the output of the pack's Tool List combine node. The rebuilt AGENT output feeds any Run or Task node downstream.
The inputs
- agent - the agent you're re-equipping.
- tools - the replacement toolset, as a
TOOL_LIST. Empty = remove all tools.
Output: one AGENT, marked as an output node.
Installing
Same pack as the rest. ComfyUI Manager → search "Griptape" → Install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/griptape-ai/ComfyUI-Griptape
Restart ComfyUI. Dependencies are griptape[all], python-dotenv, and openai - heavy first install, so grab a coffee.
Common gotchas
Two things trip people up here.
First, some local models (plain llama3, mistral) are bad at tool calling. If your replaced agent suddenly starts refusing to use tools or hallucinating results, that's often the model, not the node - the pack has warnings for this, and the fix is a stronger config.
Second, the same pack-wide environmental issues apply: 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). If you're on StabilityMatrix, its Python Packages panel is where the torch fix happens instead of the terminal.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| agentopt | AGENT | The agent to replace the tools for. | |
| toolsopt | TOOL_LIST | The tools to replace the agent's tools with. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| AGENT | AGENT | Text response from the Agent |