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

Griptape Embedding Driver: Cohere

Vectorize text for your agent's memory — Cohere embeddings, no fuss

By griptape-ai·Created 2 years ago·Updated about a year ago· 238
Griptape Embedding Driver: Cohere
    • DRIVER
    embedding_modelembed-english-v3.0
    input_typessearch_query
    cohere_api_key_env_varCOHERE_API_KEY

    The Embedding Driver: Cohere node is how your Griptape agent gets a memory that can be searched. Embeddings are how text becomes numbers that a vector store can compare - turn a document into a vector, turn a query into a vector, and "find the relevant chunk" becomes "find the nearest neighbor." That's the machinery behind agent RAG, and this node provides it using Cohere's API.

    Why Cohere specifically? Two reasons people actually pick it. Its embed-english-v3.0 and embed-multilingual-v3.0 models are legitimately good at multilingual retrieval, which matters if your source material isn't all English. And for pure embedding work it's usually cheaper than running a local embedding model that would fight your diffusion model for VRAM. If your agent only needs simple text memory and you already have an OpenAI key, the OpenAI embedding driver is the no-new-accounts option; Cohere is the choice when you want its specific multilingual quality.

    How it works

    This is a thin wrapper around Griptape's CohereEmbeddingDriver. It reads your key from the COHERE_API_KEY environment variable (default), builds the driver with the model and input type you choose, and outputs an EMBEDDING_DRIVER object. Wire that into Griptape Agent Config: Custom Structure (or a Cohere driver config), and any vector-store or RAG module in your agent suddenly has embeddings to work with - the Cohere drivers config even wires it into a local vector store for you automatically.

    The input_types dropdown is Cohere-specific and worth understanding: search_query (for your questions), search_document (for the chunks you're indexing), or classification (for classification use). Cohere's v3 models tune their embeddings to the input type, so picking the right one genuinely improves retrieval quality. Get this wrong and searches come back noisier than they should.

    The inputs that matter

    • embedding_model - embed-english-v3.0 (default) or embed-multilingual-v3.0. Multilingual if your corpus spans languages; English otherwise.
    • input_types - search_query / search_document / classification. Match it to what the embedding is for.
    • cohere_api_key_env_var - the name of the env var with your key, default COHERE_API_KEY. Not the key itself.

    Output is a single EMBEDDING_DRIVER. You're not getting vectors out of this node directly - you're getting the ability to make vectors, which the agent uses when you run RAG or vector-store tasks.

    Install and keys

    Same pack, same install - ComfyUI Manager, search "Griptape", or:

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

    Grab a key from dashboard.cohere.com/api-keys and set it in Settings → Griptape or your environment. The pack's requirements.txt installs griptape[all] and python-dotenv; on Nvidia watch for the torch conflict the README warns about (griptape[all] pulls its own torch - reinstall from the cu121 index if ComfyUI breaks).

    Common gotchas

    The api-key field takes a variable name, not the secret - same rule as every driver in this pack. And don't be surprised that this node alone doesn't do anything visible: it's a driver, not a task. You need the config node and a vector-store/RAG step before anything actually gets embedded. If retrieval feels weak, the first thing to check is that you're using search_query for queries and search_document for your stored chunks rather than one value everywhere.

    CategoryGriptape/Agent Drivers/Embedding

    Inputs (3)

    NameTypeDefaultDescription
    embedding_modeloptCOMBOembed-english-v3.0Select the embedding model to use.
    input_typesoptCOMBOsearch_querySelect the type of input for embedding.
    cohere_api_key_env_varoptSTRINGCOHERE_API_KEYEnvironment variable name for the Cohere API key. Do not enter your actual API key.

    Outputs (1)

    NameTypeDescription
    DRIVEREMBEDDING_DRIVER