Context Lab

Ollama: local LLM install for agents

Guide · AI Practice · Education · RAM/disk figures are approximate

Goal: a local OpenAI-compatible endpoint your agent can call, with enough context for tool-calling. Hermes (and similar agents) often reject models under 64K context — a chatty 8K window is not “agent-ready.”

Use official installers from ollama.com. Version numbers and model tags change; re-check their docs before production.

Install Ollama

Use the official installer from ollama.com (curl on Linux/macOS, PowerShell on Windows, or the download page).

Confirm the Daemon

Check ollama --version and curl http://127.0.0.1:11434/api/tags so the local service is up before you pull models.

Pull a Tool Model

Pick a model card that lists tool / function calling and fits your RAM. Chat-only models often fail agent workflows.

Raise Context (≥64K)

Default windows are often too small for Hermes. Use -c 65536 or a Modelfile with num_ctx 65536.

OpenAI-Compat Endpoint

Smoke-test /v1/models, then point Hermes at the local base URL and model name before any gateway.

    Topic summary · original diagrams · no autoplay

    1) Install Ollama

    Linux / macOS:

    curl -fsSL https://ollama.com/install.sh | sh

    Windows (PowerShell):

    irm https://ollama.com/install.ps1 | iex

    Or use the platform downloaders on ollama.com/download. Confirm the daemon responds:

    ollama --version
    curl -s http://127.0.0.1:11434/api/tags

    2) Pull a tool-capable model

    Pick a model that documents tool / function calling and that you can fit in RAM. Approximate disk for weights (not a benchmark claim):

    # Example tags — replace with a current tool-capable model from ollama.com/library
    ollama pull qwen2.5:14b
    ollama run qwen2.5:14b

    Verify tool use in the model card. A pure chat model will disappoint Hermes even if tokens stream fine.

    3) Raise context (≥64K for Hermes)

    Default context is often too small for agent loops. For a one-off run:

    ollama run qwen2.5:14b -c 65536

    For a durable Modelfile (name is yours):

    FROM qwen2.5:14b
    PARAMETER num_ctx 65536
    ollama create my-agent -f Modelfile
    ollama run my-agent

    Larger context uses more RAM/VRAM. If the process thrashing or OOMs, drop size or context — do not pretend 8K is enough for multi-step tools.

    4) Smoke-test the OpenAI-compatible API

    curl http://127.0.0.1:11434/v1/models

    Point Hermes at a custom OpenAI-compatible endpoint via hermes model (custom / Ollama path). Confirm base URL, model name, and that a plain chat works before enabling gateway or cron.

    Out of scope

    Sources