Griptape Prompt Driver: Amazon Bedrock
Put Claude and Titan inside a Griptape agent via AWS Bedrock
- DRIVER
Every Griptape agent needs a brain, and the prompt driver is that brain. This is the version for Amazon Bedrock - which means it's for people who already live in AWS, because the setup is all AWS credentials and API access, not a friendly chat-app key. If you're not on AWS, this node is not for you. If you are, it's the cleanest way to make Claude or Titan models the reasoning engine of a ComfyUI workflow.
Bedrock is worth knowing about even if you never touch this node: it's how AWS serves hosted Anthropic and Amazon models with per-request pricing and enterprise agreements. You get Anthropic's Claude 3.5 Sonnet and Opus, plus Amazon's own Titan text models, all behind one API.
How it works
The node builds a Griptape AmazonBedrockPromptDriver - the object that tells a Griptape agent how to call the model. It reads your AWS credentials from environment variables (or from the pack's Settings page), passes your sampling preferences along, and hands you the ready-made driver on its DRIVER output. Wire that into any agent configuration node or RAG module that accepts a PROMPT_DRIVER, and the agent suddenly thinks with Bedrock.
The inputs that matter
The driver exposes a lot, but a beginner only touches a few:
model- a dropdown. Default isanthropic.claude-3-5-sonnet-20240620-v1:0, with the other Claude 3 models and Titan text models listed. Pick by cost: Sonnet for daily work, Haiku when you're churning, Opus when quality matters more than the bill.max_tokens- here's the one the author calls out: Bedrock tends to fail if this isn't given. The default is 100, which is fine for short answers but throttles anything long. If your agent replies seem cut off, raise this.- The three AWS fields:
aws_access_key_id_env_var,aws_secret_access_key_env_var, andaws_default_region_env_var. These take the name of the environment variable, not the key itself - defaults ofAWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY,AWS_DEFAULT_REGIONare right unless you've named yours differently.
temperature, seed, top_k, min_p, and max_attempts_on_fail are there for fine-tuning but the defaults are sane. The single output is DRIVER (type PROMPT_DRIVER).
Installing it
The pack install is the same as every Griptape node: ComfyUI Manager → search Griptape → ComfyUI-Griptape → Install, then restart. Manual clone:
cd ComfyUI/custom_nodes
git clone https://github.com/griptape-ai/ComfyUI-Griptape
Then add your AWS keys. You can set them in the pack's Settings page (Settings → Griptape), or export them in your environment before launching ComfyUI - the pack will pick up existing environment values automatically.
Common issues
The trap here is the env-var fields: type the variable name, not your actual key. Paste a real key into aws_access_key_id_env_var and the driver will look up an environment variable that doesn't exist and fail confusingly. Region matters too - make sure the region in AWS_DEFAULT_REGION is where your Bedrock models are enabled, or you'll get access-denied errors even with valid credentials.
And the pack-wide gotcha: griptape[all] can clobber ComfyUI's torch on Nvidia boxes. If ComfyUI breaks after install, pip uninstall torch then pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu121 fixes it.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| modelopt | COMBO | anthropic.claude-3-5-sonnet-20240620-v1:0 | 7 options: anthropic.claude-3-5-sonnet-20240620-v1:0, anthropic.claude-3-opus-20240229-v1:0, anthropic.claude-3-sonnet-20240229-v1:0, anthropic.claude-3-haiku-20240307-v1:0, amazon.titan-text-premier-v1:0, amazon.titan-text-express-v1, +1 |
| 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 | 100 | Maximum tokens to generate. Amazon Bedrock tends to fail if this isn't given. |
| min_popt | FLOAT | 0.100–1 | Minimum probability for sampling. Lower values will be more random. |
| top_kopt | INT | 40 | Top k for sampling. Lower values are more deterministic. |
| aws_access_key_id_env_varopt | STRING | AWS_ACCESS_KEY_ID | Enter the name of the environment variable for your AWS_ACCESS_KEY_ID, not your actual key. |
| aws_secret_access_key_env_varopt | STRING | AWS_SECRET_ACCESS_KEY | Enter the name of the environment variable for your AWS_SECRET_ACCESS_KEY, not your actual key. |
| aws_default_region_env_varopt | STRING | AWS_DEFAULT_REGION | Enter the name of the environment variable for your AWS_DEFAULT_REGION, not your actual region. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| DRIVER | PROMPT_DRIVER | — |