Hermes Agent + Ollama in 2026: Local Setup, the 64K Context Floor, and the Skill Loop No Other Agent Has
TL;DR: Nous Research’s Hermes Agent connects to Ollama through a one-block custom-endpoint config and then does something no other local agent does — it writes its own reusable skills from tasks it completes. The catch is the steepest context requirement in the local-agent pack: Hermes wants 64,000 tokens minimum, and Ollama’s default is a tiny fraction of that.
- What you’ll be able to do after this guide: run Hermes Agent — file edits, shell commands, multi-step tasks, cron automations, even a Telegram/Discord bot — entirely against a local Ollama model, with zero API spend and no code leaving your machine.
- What you’ll need: Ollama, Hermes Agent v0.19.0 (the “Quicksilver” release, July 20, 2026), and realistically 24+ GB of RAM or VRAM for a model that survives its tool-calling load at 64K context.
- What you’ll avoid: the context-floor trap that makes Hermes “behave erratically after a few tool calls” on default Ollama installs, and picking a model that can chat but can’t act.
Honest take: If you want a local agent purely for coding inside a repo, goose is still the more forgiving wire-up — native Ollama provider, lower context floor in practice. Choose Hermes when you want a persistent local assistant that codes: the self-improving skill library, session memory, cron scheduling, and messaging gateways are things goose and Cline simply don’t have, and they all work offline.
What Hermes Agent is, and where it sits next to goose and Cline
Hermes Agent is Nous Research’s open-source autonomous agent — MIT-licensed, with the GitHub repo at NousResearch/hermes-agent sitting at over 220,000 stars as of July 30, 2026. It runs as a terminal agent (with a full TUI), a desktop app, or a gateway process that fronts Telegram, Discord, Slack, WhatsApp, and Signal. The current release is v0.19.0, shipped July 20, 2026, which cut first-turn time-to-first-token by roughly 80% and streams reasoning live by default.
The pitch that matters for this site’s readers: it is model-agnostic. The config ships provider aliases for ollama, vllm, and llamacpp that all map to a custom OpenAI-compatible endpoint, so the same agent that runs on Anthropic or OpenRouter runs on your GPU. And unlike the agents we’ve already wired to Ollama this year, Hermes has a closed learning loop — after complex tasks it can author a skill file into ~/.hermes/skills/, improve it on later runs, and expose it as a slash command. Skills follow the open agentskills.io standard, so they’re portable, and Nous ships a separate self-evolution toolkit (DSPy + GEPA, presented at ICLR 2026) for optimizing them offline.
Here’s the honest positioning against the two agents its queue-mates keep comparing it to:
| Hermes Agent | goose | Cline | |
|---|---|---|---|
| Form factor | Terminal agent + TUI + messaging gateway + desktop | Terminal agent + desktop | VS Code extension |
| License | MIT | Apache 2.0 | Apache 2.0 |
| Ollama wiring | Custom endpoint (base_url in config.yaml) | Native provider (OLLAMA_HOST) | Built-in Ollama provider |
| Stated context minimum | 64,000 tokens | None stated (32K workable, more is better) | None stated (suffers below ~32K) |
| Self-created skills | Yes — written to ~/.hermes/skills/, improved over time | No | No |
| Persistent memory across sessions | Yes (FTS5 search + user model) | Session-scoped | Task-scoped |
| Cron / scheduled tasks | Built in | No | No |
| Local tool-call fallback repair | Auto-repair + cloud fallback after 3 failures | XML fallback parser (Ollama path) | None — loops on malformed calls |
| Cost | $0 + hardware | $0 + hardware | $0 + hardware |
The last row is the point: all three are free. The decision is workflow, not price.
Hardware and model choice — read this before installing anything
Hermes leans on tool calling for everything: file edits, terminal commands, browsing. The official local-setup docs are blunt that models without tool-call support “can only chat; they can’t take actions.” Their recommended local table, verified today from the docs source in the repo:
| Model | Size on disk | RAM needed | Tool calling | Best for |
|---|---|---|---|---|
gemma4:31b | ~20 GB | 24+ GB | Yes | Full agentic work — the docs’ only recommended tool-caller |
gemma2:27b | ~16 GB | 20+ GB | No | Conversation only |
gemma2:9b | ~5 GB | 8+ GB | No | Fast Q&A, no actions |
llama3.2:3b | ~2 GB | 4+ GB | No | Lightweight chat |
Two practical notes from our own local-agent testing this year. First, the docs’ table is conservative — qwen3-coder:30b (~19 GB at Q4) and devstral:24b (~15 GB) both tool-call well in goose and are worth trying in Hermes too; the docs themselves say tool-calling support in the Ollama library “is expanding rapidly.” Second, budget headroom beyond the weights: a 64K-token KV cache adds several extra GB on a ~30B model, which is exactly why a 24 GB card is the comfortable floor here. A used RTX 3090 remains the cheapest 24 GB ticket, and the full VRAM-to-model ladder lives in runaihome.com’s local models by VRAM guide. CPU-only works — the docs quote ~2–5 tokens/sec for a 31B model on a modern 8-core CPU — but every agent turn takes 30–120 seconds, so set expectations (and timeouts, covered below) accordingly. No GPU at all? Pointing the base URL at a rented RunPod box running your own Ollama daemon keeps the no-per-token-billing economics with borrowed hardware.
Step 1: Ollama up, model pulled, endpoint verified
$ curl -fsSL https://ollama.com/install.sh | sh
$ ollama pull gemma4:31b
pulling manifest
pulling 3c1f6a9b02de... 100% ▕████████████████▏ 20 GB
verifying sha256 digest
success
Confirm the OpenAI-compatible endpoint answers before Hermes ever touches it — this one command rules out the whole connection-refused error family up front:
$ curl http://localhost:11434/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model": "gemma4:31b", "messages": [{"role": "user", "content": "Say hello"}], "max_tokens": 50}'
{"id":"chatcmpl-...","choices":[{"message":{"role":"assistant","content":"Hello! ..."}}],...}
If that JSON comes back, the backend is ready.
Step 2: The 64K context floor — fix it now, not after it breaks
This is the problem section, and with Hermes it’s worse than with any other agent we’ve covered. Ollama serves models with a small default context — the Hermes docs assume 2,048 tokens; recent Ollama builds default to 4,096, as covered in our context-length fix guide. Hermes explicitly requires at least 64,000 tokens for agentic work with tools, because every tool call and its result stays in the window so the model can reason across the sequence. On a default install, the window silently overflows after the first few tool calls and the agent starts contradicting itself, re-running commands, or “forgetting” the task — nothing errors, it just degrades.
The docs’ recommended fix is a derived model with the context baked in:
cat > /tmp/Modelfile << 'EOF'
FROM gemma4:31b
PARAMETER num_ctx 64000
EOF
ollama create gemma4-64k -f /tmp/Modelfile
Then use gemma4-64k as your model name in Hermes. The daemon-wide alternative (OLLAMA_CONTEXT_LENGTH=65536 in Ollama’s environment) also works and covers every client at once, at the cost of allocating the bigger KV cache even for casual chat models.
Step 3: Install Hermes and point it at Ollama
One-line install (Linux, macOS, WSL2 — there’s an install.ps1 for native Windows PowerShell):
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash
source ~/.bashrc
hermes setup
In the setup wizard, choose Custom Endpoint as the provider and enter:
- Base URL:
http://localhost:11434/v1 - API key: leave empty (Ollama doesn’t need one)
- Model:
gemma4-64k(the derived model from Step 2)
Or skip the wizard and edit ~/.hermes/config.yaml directly:
model:
default: "gemma4-64k"
provider: "custom"
base_url: "http://localhost:11434/v1"
Two quality-of-life settings worth adding immediately. On CPU-only or partially-offloaded boxes, widen the API timeout — it’s an env var in ~/.hermes/.env, not a config key:
# ~/.hermes/.env
HERMES_API_TIMEOUT=1800 # 30 minutes, generous for slow local inference
And keep the model resident so the gateway or a cron job doesn’t pay a cold-load penalty every 5 minutes of idle:
# /etc/systemd/system/ollama.service.d/override.conf
[Service]
Environment="OLLAMA_KEEP_ALIVE=24h"
Then start it:
hermes
Ask it to list the Python files in a directory and count lines per file — you’ll watch it run the terminal tool against your local model with zero cloud calls. /model switches between pulled models mid-session; Ollama loads and unloads them on demand.
The skill loop: what you’re actually getting for the extra VRAM
Everything up to here, goose does too. This part it doesn’t. Hermes treats skills as on-demand knowledge documents in ~/.hermes/skills/ — progressive-disclosure files the agent loads only when relevant, each automatically exposed as a slash command. Three ways they accumulate:
- The agent writes them itself. After a complex task completes, Hermes can author a skill from the successful trajectory — the docs call this “autonomous skill creation after complex tasks,” and skills “self-improve during use.” Do a fiddly deployment once, and the procedure becomes a reusable command instead of a lost conversation.
/learnturns anything into a skill on demand. Point it at a local SDK directory, a docs URL, pasted notes, or literally “how I just deployed the staging server,” and the live agent gathers the material with its own tools and writes theSKILL.md.- Install from the hub or stack them. Skills are agentskills.io-standard files, chainable up to 5 per message (
/github-pr-workflow /test-driven-development fix issue #123 and open a PR).
For a developer this is the compounding argument for local: the skill library, the persistent memory (full-text search over past sessions), and the cron scheduler all live on your disk, work offline, and cost nothing to exercise — where a cloud-backed assistant with this much always-on activity would bill you per token for every scheduled run. The official docs’ own cost table pegs a typical ~100K-in/20K-out session at ~$0.80 on Claude Sonnet via API versus $0.00 local; a Hermes install that also runs nightly cron jobs and a Telegram gateway multiplies that gap.
If a task exceeds the local model, the config supports a scoped escape hatch — cloud only when local fails (Hermes retries malformed tool calls with auto-repair first, and falls back after 3 failures):
fallback_providers:
- provider: openrouter
model: anthropic/claude-sonnet-4
Where it breaks
Be clear-eyed about the limits before committing 20 GB of downloads:
- The 64K floor is real, and it’s the highest in the category. Cline gets usable around 32K; goose has levers to work at 32K. Hermes rejects the premise — under 64K the multi-step loop degrades. That pushes the comfortable hardware bar to a 24 GB GPU or a 32 GB unified-memory Mac, where Cline runs acceptably on 16 GB.
- The blessed local model list is short. Officially, one recommended tool-caller (
gemma4:31b). Community-verified alternatives exist, but you’re off the documented path — test tool calls on a trivial task before trusting an overnight cron job to one. - It’s not an IDE tool. No editor pane, no inline diff review in VS Code. If your whole workflow is “AI edits my open buffer,” Cline or goose’s desktop app fit better.
- Small models waste your time. A 3B/7B model driving a tool-heavy loop produces malformed calls that auto-repair can only partially rescue. The docs say it plainly; our testing across six agents this year agrees.
Verdict
Among free local agents in July 2026: goose stays our pick for repo-focused coding on modest hardware, but Hermes Agent is the best local agent to live in — the only one whose capabilities compound, because completed work turns into skills, memory persists across sessions, and cron plus messaging gateways make it a genuinely autonomous assistant rather than a per-task tool. If you have the 24 GB to feed its context floor, it’s the most interesting thing running on localhost:11434 right now. If you have 16 GB or less, run Cline or goose locally instead, or front Hermes with a cheap cloud model and keep the skill loop anyway. For the open-source AI ecosystem beyond coding agents, aifoss.dev tracks the wider FOSS stack.
FAQ
Does Hermes Agent work with LM Studio or llama.cpp instead of Ollama?
Yes. The provider system treats them all as OpenAI-compatible custom endpoints — the shipped config even includes ollama, vllm, and llamacpp aliases. Point base_url at LM Studio’s server (http://localhost:1234/v1 by default) and the flow is identical; the same 64K context requirement applies, set in LM Studio’s model-load dialog.
Is Hermes Agent actually free? The software is MIT-licensed and free. Nous Portal (a paid subscription consolidating 300+ cloud models under one key) is optional and irrelevant to a pure-local setup. Local cost is hardware plus roughly $0.01–0.05 of electricity per session, per the official docs.
Can I run it on a machine with no GPU?
Yes — the docs quote ~10 tokens/sec for a 9B model and ~2–5 tokens/sec for a 31B on a modern 8-core CPU. But agentic turns chain many generations, so raise HERMES_API_TIMEOUT and treat it as an async assistant (message it on Telegram, read the answer later) rather than an interactive pair programmer.
How is this different from goose’s or Cline’s local setup? Wiring is comparably easy in all three. The differences are the context floor (64K vs ~32K workable), and what you get for it: Hermes adds self-created skills, persistent cross-session memory, cron scheduling, and messaging gateways — none of which exist in goose or Cline.
Which exact versions does this guide describe? Hermes Agent v0.19.0 (released July 20, 2026) and the official local-Ollama documentation as of July 30, 2026. Both move fast; re-check the docs if you’re reading this months later.
Sources
- Hermes Agent — official GitHub repository (NousResearch/hermes-agent)
- Hermes Agent releases — v0.19.0 “Quicksilver”, July 20, 2026
- Run Hermes Locally with Ollama — official documentation
- Hermes Agent Skills System — official documentation
- hermes-agent-self-evolution — official DSPy + GEPA skill-optimization toolkit
- Agent Skills specification — agentskills.io
- Ollama — official site and model library
Last updated July 30, 2026. Versions, model support, and requirements change frequently; verify current state against the official docs before building on this setup.
Was this article helpful?
Thanks for the feedback — it helps improve future articles.