Griptape Prompt Driver: Anthropic
Give your agent the Claude brain — the one people actually reach for
- DRIVER
The Anthropic prompt driver is where most people land when they want a Griptape agent that actually thinks instead of just pattern-matching. Claude is the model family this pack's default configurations lean toward, and for good reason: it's consistently the best at following long, multi-step instructions, which is exactly what you need when an agent is chaining tools and reasoning about what to do next. If you're going to pay for one hosted brain for these nodes, this is the one to start with.
It's a prompt driver, which in Griptape terms means it's the configurable brain you plug into an agent. The node builds an AnthropicPromptDriver with your chosen model and sampling settings, and hands it out on a single DRIVER output. Wire that into an agent configuration node, and every reply the agent generates comes from Claude.
The inputs that matter
model- defaultclaude-3-5-sonnet-latest. That "latest" alias means the node tracks Anthropic's current Sonnet release, which is a nice default for most work. If you need a specific version pinned for reproducibility, type it here.api_key_env_var- the name of the environment variable holding your key. DefaultANTHROPIC_API_KEY, and you should leave it alone unless you named yours differently. Get the key from console.anthropic.com/settings/keys.max_tokens- default-1, meaning "let the model decide." Raise it if your agent's answers keep ending early on long writes.temperature,top_k,top_p- the sampling knobs. Defaults (0.1 temperature, top_p 0.999, top_k 250) are deliberately close to deterministic; dial temperature up toward 1.0 when you want variety.
use_native_tools defaults on, which lets Claude use Anthropic's native function-calling - that's what makes the agent's tool use (calculator, web scraping, file access) actually work. Leave it on. Output is DRIVER (PROMPT_DRIVER).
Installing it
Pack install is standard: ComfyUI Manager → search Griptape → ComfyUI-Griptape → Install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/griptape-ai/ComfyUI-Griptape
Then set your key. The pack reads ANTHROPIC_API_KEY from your environment automatically, or you can paste it into Settings → Griptape in ComfyUI's sidebar.
Common issues
The classic mistake is putting your actual key into api_key_env_var - that field wants the variable name, not the secret. If the node errors with an auth failure, check that first. Also note the tooltip: if you already have ANTHROPIC_API_KEY set in your shell, the pack's settings page shows it pre-filled, which trips people into thinking the key is stored elsewhere.
And the pack-wide warning: griptape[all] installs torch and can fight ComfyUI's own torch on Nvidia. If ComfyUI breaks after installing this pack, uninstall and reinstall torch with the cu121 wheel (pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu121). If you hit ImportError: cannot import name 'OllamaPromptDriver', your griptape library is stale - python -m pip install griptape -U and restart.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| modelopt | COMBO | claude-3-5-sonnet-latest | Select the model you want to use from the available options. |
| max_attempts_on_failopt | INT | 21–100 | Maximum attempts on failure |
| temperatureopt | FLOAT | 0.100–1 | Temperature for sampling |
| seedopt | INT | 10342349342 | Seed for random number generation |
| use_native_toolsopt | BOOLEAN | true | Use native tools for the LLM. |
| max_tokensopt | INT | -1 | Maximum tokens to generate. If <=0, it will use the default based on the tokenizer. |
| top_kopt | INT | 2500–500 | Limits the number of tokens considered for each step of the generation. Prevents the model from focusing too narrowly on the top choices. |
| api_key_env_varopt | STRING | ANTHROPIC_API_KEY | Enter the name of the environment variable for your ANTHROPIC_API_KEY key, not your actual key. |
| top_popt | FLOAT | 1.000–1 | Controls the cumulative probability distribution cutoff. The model will only consider the top p% most probable tokens. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| DRIVER | PROMPT_DRIVER | — |