Griptape Prompt Driver: Cohere
Command-R for your agent — Cohere's long-context, tool-friendly brain
- DRIVER
Cohere doesn't get the hype Anthropic and OpenAI do, but in agent-land it's quietly excellent - and the Command-R family was built for exactly what this pack does. Long context windows, aggressive tool use, and RAG-style grounded answers are Command-R's whole personality. If you're building a Griptape agent that needs to chew through a big document and answer from it, this driver is a very reasonable choice, often cheaper than Claude for the same work.
The node is a prompt driver like every other brain in this pack: it constructs a Griptape CoherePromptDriver with your settings and emits it on DRIVER, ready to wire into an agent configuration or a RAG response module.
The inputs that matter
model- dropdown of the Command family. Defaultcommand-r-plus, the flagship;command-ris the budget tier, and thecommand,command-light, and nightly variants are the older generation. For agent work you wantcommand-rorcommand-r-plus- the "r" is RAG-optimized, which is the whole reason to be here.cohere_api_key_env_var- the env-var name, defaultCOHERE_API_KEY. Grab a key at dashboard.cohere.com/api-keys.top_kandmin_p- Cohere's favored sampling controls.top_kdefault 40 biases toward the most likely tokens;min_pdefault 0.1 keeps the tail from getting too wild. Lowermin_p= more random.max_tokens--1default means the model picks; bump it for long-form outputs.
temperature, seed, use_native_tools, and max_attempts_on_fail round out the standard set. Output: DRIVER (PROMPT_DRIVER).
How to think about it
The one genuinely different thing about Cohere here: its native tool use and its RAG support are the best-matched to the Griptape engine's RAG modules. If you're pairing a prompt driver with the pack's RAG response modules, Cohere and the command-r family are the pairing the model was designed for. It's not better than Claude at everything - for long creative writing most people still pick Anthropic - but for "answer from this pile of text and cite where you got it," Cohere is right there with it and usually cheaper.
Installing it
Same pack install: ComfyUI Manager → Griptape → ComfyUI-Griptape, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/griptape-ai/ComfyUI-Griptape
Set COHERE_API_KEY in Settings → Griptape or your environment and you're done.
Common issues
The usual env-var-name trap applies: put the name COHERE_API_KEY in the field, not the key. Cohere also changes model availability without much fanfare - if a dropdown option 404s, the model's been deprecated and the provider's current list has moved on. And the pack-wide gotchas: griptape[all] pulling a conflicting torch is the most common ComfyUI breakage (reinstall torch with the cu121 wheels), and a stale griptape install shows up as ImportError: cannot import name '...' from 'griptape.drivers' - fix with python -m pip install griptape -U.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| modelopt | COMBO | command-r-plus | Select the Cohere model to use. |
| max_attempts_on_failopt | INT | 21–100 | Maximum attempts on failure |
| 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. |
| 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. |
| cohere_api_key_env_varopt | STRING | COHERE_API_KEY | Environment variable for the Cohere API key. Do not use your actual API key directly. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| DRIVER | PROMPT_DRIVER | — |