Griptape Agent Config: Google Drivers
Griptape's Google config for prompts and embeddings
- CONFIG
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(defaultgemini-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(defaulttext-embedding-004) andtask_type- the embedding driver.task_typematters more than people expect:RETRIEVAL_QUERYvsRETRIEVAL_DOCUMENTchanges 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_kdown 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 setin 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-004sometimes lags behind API enablement. If embeddings 401, confirm the key has the Generative Language API enabled in Google Cloud, and tryRETRIEVAL_QUERYfor query-side tasks. - Wrong results from agent memory - this is almost always a
task_typemismatch between how you index and how you query. KeepRETRIEVAL_DOCUMENTfor the indexing pass andRETRIEVAL_QUERYfor 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.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt_model_commentopt | STRING | Prompt Driver | — |
| modelopt | COMBO | gemini-2.0-flash | 6 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_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 | -1 | Maximum tokens to generate. If <=0, it will use the default based on the tokenizer. |
| top_kopt | INT | 2500–500 | Limits 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_varopt | STRING | GOOGLE_API_KEY | Environment variable for the Google API key. Do not use your actual API key here. |
| top_popt | FLOAT | 1.000–1 | Controls the cumulative probability distribution cutoff. The model will only consider the top p% most probable tokens. |
| embedding_model_commentopt | STRING | Embedding Driver | — |
| embedding_modelopt | COMBO | text-embedding-004 | Select the embedding model to use. |
| task_typeopt | COMBO | RETRIEVAL_QUERY | Select the task type for the embedding. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CONFIG | CONFIG | — |