Nodes/ComfyUI Griptape Nodes/Griptape Prompt Driver: Ollama
ComfyUI Node

Griptape Prompt Driver: Ollama

Ollama + Llama 3 inside a Griptape agent

By griptape-ai·Created 2 years ago·Updated about a year ago· 238
Griptape Prompt Driver: Ollama
    • DRIVER
    base_urlhttp://127.0.0.1
    port11434
    model
    max_attempts_on_fail2
    temperature0.10
    seed10342349342
    use_native_toolstrue
    max_tokens-1
    min_p0.10
    top_k40
    keep_alive240

    Ollama is the local-model driver, and it's the one the pack's own README walks you through first. No API key, no account, no per-token invoice - you install Ollama, pull a model, and a Griptape agent gets a free, private brain that lives on your machine. For learning how the whole agent thing works, or for any workflow where your data shouldn't leave your desk, this is the driver to start with. It's the reason the pack can do something useful on day one without touching a paid API.

    The honest trade-off: "free" means "your GPU." Ollama runs models locally, competing with ComfyUI's diffusion for VRAM. A 7–8B model like Llama 3 is the sweet spot - small enough to coexist with image gen, capable enough for real agent work. Don't try to run a 70B and generate images on the same card.

    How it works

    Ollama runs a local server on http://127.0.0.1:11434. The node builds a Griptape OllamaPromptDriver pointed at it - and those two fields (base_url http://127.0.0.1, port 11434) are the only required inputs in this whole driver family, which tells you how foundational local is to the pack. The model you specify has to already exist locally (ollama run llama3 pulls it). Output is a single DRIVER.

    The inputs that matter

    • model - free-text, e.g. llama3, mistral, llama3.2-vision. It must be a model you've already pulled with Ollama; the node won't download it for you.
    • base_url / port - the required defaults (http://127.0.0.1, 11434) match a stock Ollama install. Change only if you've configured Ollama otherwise.
    • keep_alive - default 240. Seconds Ollama keeps the model warm in memory between requests. Lower it to free VRAM sooner, raise it to avoid reload latency on chatty agents. This one's actually useful.
    • use_native_tools - defaults on here, unlike LM Studio; Ollama serves modern models that mostly handle tool calling fine.
    • top_k (default 40) and min_p (default 0.1) - the sampling knobs; temperature defaults low (0.1) for reliability.

    seed, max_tokens (-1 = model default), and max_attempts_on_fail complete the set.

    Getting started (the README's own path)

    # install Ollama from ollama.com, then:
    ollama run llama3
    

    That one command pulls the model and opens a chat to verify it works. Close it, restart ComfyUI, and the driver will find Ollama on the default port. The pack's YouTube tutorials cover this exact flow.

    Installing the pack

    ComfyUI Manager → GriptapeComfyUI-Griptape, restart, or

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

    No keys to set for the Ollama driver - the only "config" is having Ollama running.

    Common issues

    Most failures are "Ollama isn't running" - the server only exists while the Ollama app is up. Next most common: a model name in the field that wasn't pulled (model not found). And if ComfyUI breaks after installing the pack at all, it's griptape[all] stomping torch - reinstall with pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu121. Stale griptape shows up as ImportError on driver names; python -m pip install griptape -U fixes it.

    CategoryGriptape/Agent Drivers/Prompt

    Inputs (11)

    NameTypeDefaultDescription
    base_urlSTRINGhttp://127.0.0.1The base URL of the Ollama server
    portSTRING11434The port of the Ollama server
    modeloptSTRINGThe prompt model to use
    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.
    top_koptINT40Top k for sampling. Lower values are more deterministic.
    keep_aliveoptINT240Seconds to keep the connection alive

    Outputs (1)

    NameTypeDescription
    DRIVERPROMPT_DRIVER