Nodes/ComfyUI Griptape Nodes/Griptape Prompt Driver: Cohere
ComfyUI Node

Griptape Prompt Driver: Cohere

Command-R for your agent — Cohere's long-context, tool-friendly brain

By griptape-ai·Created 2 years ago·Updated about a year ago· 238
Griptape Prompt Driver: Cohere
    • DRIVER
    modelcommand-r-plus
    max_attempts_on_fail2
    seed10342349342
    use_native_toolstrue
    max_tokens-1
    min_p0.10
    top_k40
    cohere_api_key_env_varCOHERE_API_KEY

    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. Default command-r-plus, the flagship; command-r is the budget tier, and the command, command-light, and nightly variants are the older generation. For agent work you want command-r or command-r-plus - the "r" is RAG-optimized, which is the whole reason to be here.
    • cohere_api_key_env_var - the env-var name, default COHERE_API_KEY. Grab a key at dashboard.cohere.com/api-keys.
    • top_k and min_p - Cohere's favored sampling controls. top_k default 40 biases toward the most likely tokens; min_p default 0.1 keeps the tail from getting too wild. Lower min_p = more random.
    • max_tokens - -1 default 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 → GriptapeComfyUI-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.

    CategoryGriptape/Agent Drivers/Prompt

    Inputs (8)

    NameTypeDefaultDescription
    modeloptCOMBOcommand-r-plusSelect the Cohere model to use.
    max_attempts_on_failoptINT21–100Maximum attempts on failure
    seedoptINT10342349342Seed for random number generation
    use_native_toolsoptBOOLEANtrueUse native tools for the LLM.
    max_tokensoptINT-1Maximum tokens to generate. If <=0, it will use the default based on the tokenizer.
    min_poptFLOAT0.100–1Minimum probability for sampling. Lower values will be more random.
    top_koptINT40Top k for sampling. Lower values are more deterministic.
    cohere_api_key_env_varoptSTRINGCOHERE_API_KEYEnvironment variable for the Cohere API key. Do not use your actual API key directly.

    Outputs (1)

    NameTypeDescription
    DRIVERPROMPT_DRIVER