Griptape Agent Config: HuggingFace Drivers
Hugging Face serverless inference as a Griptape config
- CONFIG
This config runs a Griptape agent against Hugging Face's hosted inference - both a prompt model and an embedding model, no local VRAM required. It's the config for people who already live on the Hub and want their agent to speak the model IDs they already know. It's also the config with the most strings attached, because you're not getting any model you can type: Hugging Face's serverless inference is picky about what it will actually serve.
How it works
The node builds a DriversConfig with a prompt driver pointed at a Hugging Face serverless inference endpoint and an embedding driver pointed at another. Both are free-text model IDs, not dropdowns - which is freedom you have to earn. The prompt driver runs the model you name on HF's serverless inference; the embedding driver does the same for embeddings.
The README is upfront about the constraint: not every model on the Hub works. Only models supported by Hugging Face's serverless inference will run, and because of serverless limitations, only models under 10GB are supported. If you type in a model that doesn't fit that bar, you get an inference error rather than a graceful fallback.
The inputs that matter
model(defaultHuggingFaceH4/zephyr-7b-beta) - the prompt model ID. This is a good default, actually: small, serverless-friendly, and it'll work out of the box.embedding_model(defaultsentence-transformers/all-MiniLM-L6-v2) andtokenizer(same default) - the embedding driver's model and tokenizer.max_output_tokens(default 512) - output cap for the prompt driver.api_token_env_var(defaultHUGGINGFACE_HUB_ACCESS_TOKEN) - HF access token, not the key. Create one at https://huggingface.co/settings/tokens.- Shared:
temperature,seed,max_tokens,use_native_tools,max_attempts_on_fail.
Output: single CONFIG.
Installing it
One pack, once:
cd ComfyUI/custom_nodes
git clone https://github.com/griptape-ai/ComfyUI-Griptape
or ComfyUI Manager → search "Griptape" → install. Restart, set your HF token in Settings → Griptape or as HUGGINGFACE_HUB_ACCESS_TOKEN. Shared caveat: griptape[all] pulls a torch build that can clash with ComfyUI's - README troubleshooting covers it.
Common issues
- Inference errors on your chosen model - the 10GB / serverless-support limit. The model either isn't served serverless or is too big. Fall back to a known-good small model like the default
zephyr-7b-beta. [WARNING]: HUGGINGFACE_HUB_ACCESS_TOKEN is not set- the usual missing-key path; check Settings → Griptape and env var spelling.- Rate limits - free serverless inference throttles hard. If your agent suddenly stalls mid-run, that's usually HF rate-limiting, not your workflow.
The honest take: this is a config you reach for when you specifically want Hugging Face models. The convenience of serverless comes with speed, quota, and compatibility trade-offs - if you're going to be running agents a lot, the OpenAI Compatible config pointed at a local server will feel much more consistent.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt_model_commentopt | STRING | Prompt Driver | — |
| modelopt | STRING | HuggingFaceH4/zephyr-7b-beta | The model to use from Hugging Face Hub. |
| 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. |
| api_token_env_varopt | STRING | HUGGINGFACE_HUB_ACCESS_TOKEN | Environment variable for the API token. Do not use your actual API key here. |
| embedding_model_commentopt | STRING | Embedding Driver | — |
| embedding_modelopt | STRING | sentence-transformers/all-MiniLM-L6-v2 | The model to use for embeddings. |
| tokenizeropt | STRING | sentence-transformers/all-MiniLM-L6-v2 | The tokenizer to use with the model. |
| max_output_tokensopt | INT | 512 | The maximum number of tokens for the output. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CONFIG | CONFIG | — |