Nodes/ComfyUI Griptape Nodes/Griptape Agent Config: Grok Drivers
ComfyUI Node

Griptape Agent Config: Grok Drivers

Grok in your Griptape agent — xAI's models, one config node

By griptape-ai·Created 2 years ago·Updated about a year ago· 238
Griptape Agent Config: Grok Drivers
    • CONFIG
    prompt_model_commentPrompt Driver
    modelgrok-beta
    max_attempts_on_fail2
    temperature0.10
    seed10342349342
    use_native_toolstrue
    max_tokens-1
    min_p0.10
    response_formatdefault
    api_key_env_varGROK_API_KEY

    Want Grok as the brain of a Griptape agent? This is the one-box way to do it. The node builds a config whose prompt driver calls xAI's Grok models - including their chat and vision capabilities - using a GROK_API_KEY from https://console.x.ai. It's a deliberately small config: one driver, one model family, no embedding or image generation bundled. If you're testing Grok inside ComfyUI without building a full stack around it, this keeps things simple.

    How it works

    Like the other "Drivers" configs, it constructs a DriversConfig object and hands it out on a CONFIG output. In this case the config carries exactly one driver - a GrokPromptDriver. The model dropdown currently lists four Grok options with grok-beta as default, and the rest of the inputs are the shared prompt-driver controls: temperature, seed, max_tokens, min_p, response_format, use_native_tools, max_attempts_on_fail, plus api_key_env_var (default GROK_API_KEY).

    Key resolution is the standard pack behavior: the node looks up the env var name you specify, first in ComfyUI Settings → Griptape, then in the OS environment, and logs [WARNING]: GROK_API_KEY is not set if it comes up empty.

    The inputs that matter

    • model (default grok-beta) - pick the Grok model from the four offered.
    • api_key_env_var (default GROK_API_KEY) - key name, not the key. Get one at https://console.x.ai.
    • response_format - default vs json_object; useful if you want the agent's output machine-parseable.
    • use_native_tools (default on) - Grok's own tool calling vs Griptape's engine.

    Output: single CONFIG.

    Installing it

    Pack install, one time, covers all Griptape nodes:

    cd ComfyUI/custom_nodes
    git clone https://github.com/griptape-ai/ComfyUI-Griptape
    

    or ComfyUI Manager → search "Griptape" → install. Restart, add the key to Settings → Griptape, and the node works. Shared caveats: the pack installs griptape[all] plus a torch build that can conflict with ComfyUI's; the README's troubleshooting covers the fix.

    When to use it - and when not to

    Use it if you specifically want Grok - maybe you're comparing model outputs, or you want Grok's vision model doing image queries in the same agent. Skip it if you just need "an LLM": Grok is a prompt-only config here, so agents that want memory, RAG, image generation, or audio get nothing extra from it. You'd pair it with separate embedding/vector store nodes, and at that point the OpenAI Drivers or OpenAI Compatible configs are usually less assembly. Also note it's a hosted API - you're paying for tokens and your prompts go to xAI, so it's not the privacy choice.

    Common issues

    • [WARNING]: GROK_API_KEY is not set - the universal pack key problem. Double-check the key is in Settings → Griptape under that exact name, or set GROK_API_KEY in your environment before launching ComfyUI.
    • "Please provide a model" ExecutionBlocker - if the model param comes through empty, the node refuses to build rather than silently defaulting. Re-pick from the dropdown.
    • Agent can't remember anything - not a bug; this config has no embedding driver. Add one manually if you need memory.
    CategoryGriptape/Agent Configs

    Inputs (10)

    NameTypeDefaultDescription
    prompt_model_commentoptSTRINGPrompt Driver
    modeloptCOMBOgrok-beta4 options: grok-beta, grok-vision-beta, grok-2-latest, grok-2-vision-latest
    max_attempts_on_failoptINT21–100Maximum attempts on failure
    temperatureoptFLOAT0.100–1Temperature for sampling
    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.
    response_formatoptCOMBOdefaultFormat of the response
    api_key_env_varoptSTRINGGROK_API_KEYEnter the environment variable name, not the actual API key

    Outputs (1)

    NameTypeDescription
    CONFIGCONFIG