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

Griptape Agent Config: Google Drivers

Griptape's Google config for prompts and embeddings

By griptape-ai·Created 2 years ago·Updated about a year ago· 238
Griptape Agent Config: Google Drivers
    • CONFIG
    prompt_model_commentPrompt Driver
    modelgemini-2.0-flash
    max_attempts_on_fail2
    temperature0.10
    seed10342349342
    use_native_toolstrue
    max_tokens-1
    top_k250
    google_api_key_env_varGOOGLE_API_KEY
    top_p1.00
    embedding_model_commentEmbedding Driver
    embedding_modeltext-embedding-004
    task_typeRETRIEVAL_QUERY

    Want Gemini as the brain inside a Griptape agent? This is the config node for it. It wires up Google's models for two things at once - the prompt driver (chat / vision / image query) and the embedding driver - and bundles a local vector store driver on top of the embeddings, so agent memory and RAG come along for free. If you're already paying for a Google AI Studio API key, this turns it into a fully conversational, memory-equipped agent in one drag.

    How it works

    Like every "Drivers" config, it builds a DriversConfig from individual drivers rather than hard-coding one model. The prompt driver calls the Gemini API; the embedding driver calls Google's text-embedding-004; and it wraps the embeddings in a local vector store, meaning you don't need a separate vector database to give the agent memory. The config object that comes out the CONFIG output carries all of it, and any Agent or Structure node picks it up on its config socket.

    The key handling is standard for the pack: the node reads the env var name you give it (api_key_env_var, default GOOGLE_API_KEY), resolves it from ComfyUI Settings → Griptape or the OS environment, and warns loudly in the console if it can't find it.

    The inputs that matter

    • model (default gemini-2.0-flash) - the prompt model. The dropdown offers the 2.0 and 1.5 flash/pro families, so you can step down to a cheaper/smaller model or up to a bigger one.
    • embedding_model (default text-embedding-004) and task_type - the embedding driver. task_type matters more than people expect: RETRIEVAL_QUERY vs RETRIEVAL_DOCUMENT changes how Google optimizes the embedding, and picking the right one meaningfully improves RAG results.
    • api_key_env_var - key name, not the key. Grab a key at https://makersuite.google.com/app/apikey.
    • top_k (default 250), top_p (default 0.999), temperature, seed, max_tokens - Gemini-specific sampling knobs on the prompt driver. If output feels repetitive, top_k down is your lever.

    Output is a single CONFIG.

    Installing it

    Standard pack install - ComfyUI Manager → search "Griptape", or:

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

    Restart, set your GOOGLE_API_KEY in Settings → Griptape, done. The pack pulls griptape[all] plus python-dotenv; as always, griptape's torch dependency is the main post-install headache if ComfyUI starts misbehaving (see the README's troubleshooting).

    Common issues

    • [WARNING]: GOOGLE_API_KEY is not set in the console - the key isn't in settings or the environment, or the env var name in the field doesn't match. Check Settings → Griptape.
    • Embedding errors with a fresh key - text-embedding-004 sometimes lags behind API enablement. If embeddings 401, confirm the key has the Generative Language API enabled in Google Cloud, and try RETRIEVAL_QUERY for query-side tasks.
    • Wrong results from agent memory - this is almost always a task_type mismatch between how you index and how you query. Keep RETRIEVAL_DOCUMENT for the indexing pass and RETRIEVAL_QUERY for questions.

    One note: unlike the OpenAI config, there's no image generation or audio driver here - Google's image side isn't wired into this node. For text + embeddings + memory, though, it's complete.

    CategoryGriptape/Agent Configs

    Inputs (13)

    NameTypeDefaultDescription
    prompt_model_commentoptSTRINGPrompt Driver
    modeloptCOMBOgemini-2.0-flash6 options: gemini-2.0-flash, gemini-2.0-flash-lite-preview-02-05, gemini-1.5-pro, gemini-1.5-flash, gemini-1.0-pro, gemini-pro
    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.
    top_koptINT2500–500Limits the number of tokens considered for each step of the generation. Prevents the model from focusing too narrowly on the top choices.
    google_api_key_env_varoptSTRINGGOOGLE_API_KEYEnvironment variable for the Google API key. Do not use your actual API key here.
    top_poptFLOAT1.000–1Controls the cumulative probability distribution cutoff. The model will only consider the top p% most probable tokens.
    embedding_model_commentoptSTRINGEmbedding Driver
    embedding_modeloptCOMBOtext-embedding-004Select the embedding model to use.
    task_typeoptCOMBORETRIEVAL_QUERYSelect the task type for the embedding.

    Outputs (1)

    NameTypeDescription
    CONFIGCONFIG