Skip to the content.

Configure Hermes Agent with Local LiteLLM Proxy

Set up Hermes Agent (CLI and Desktop) to use a locally hosted LiteLLM proxy as its custom LLM provider. The proxy is backed by Vertex AI Claude models (no auth, http://127.0.0.1:4000).

Rules

Do NOT fabricate or invent command output, status, or results. Every report MUST come from actual script or command execution. If a command fails, report the actual error — do not guess.

Do NOT skip steps or combine multiple operations into one step. Execute each step in order and verify before proceeding.

Prerequisites

Model Selection Architecture

Hermes stores the default model in three locations that must stay in sync. There is no separate fast_model concept (unlike Goose).

Field Location Purpose
model.default Top-level in config.yaml Active default model
providers.<name>.default_model Provider entry Provider-level default
providers.<name>.model Provider entry Currently selected model

The restore.sh script updates all three together. With no --default-model it uses the strongest served model (hey litellm default model: opus > sonnet > haiku, newest first).

Note: hermes model may not persist changes to config.yaml. Use scripts/restore.sh or direct file editing for reliable updates.

Reference Configuration

File: ~/.hermes/config.yaml (relevant sections only)

⚠️ Use this exact schema. Do NOT write from memory or improvise field names. Copy this template and substitute only the marked placeholders.

model:
  base_url: http://127.0.0.1:4000/v1
  default: claude-opus-5-5            # strongest served model (restore.sh default)
  provider: litellm-vertex-ai
  key_env: HERMES_CUSTOM_LITELLM_VERTEX_AI_API_KEY
providers:
  litellm-vertex-ai:
    api: http://127.0.0.1:4000/v1
    name: LiteLLM Vertex AI
    discover_models: true
    default_model: claude-opus-5-5    # must match model.default
    base_url: http://127.0.0.1:4000/v1
    model: claude-opus-5-5            # must match model.default
    models:                             # written by restore.sh from /v1/models
      claude-opus-5-5: {}               # (excerpt — one key per proxy model, ranked;
      claude-sonnet-5-5: {}             #  current list: `hey litellm model list`)
      claude-haiku-4-5: {}
    key_env: HERMES_CUSTOM_LITELLM_VERTEX_AI_API_KEY

Key Fields Explained

Field Value Why
model.provider litellm-vertex-ai Named provider identifier (not custom)
model.base_url http://127.0.0.1:4000/v1 Local LiteLLM proxy with /v1 path
model.default strongest served model, e.g. claude-opus-5-5 Default conversation model (restore.sh picks it; --default-model overrides)
key_env HERMES_CUSTOM_... Auto-generated by Hermes; no actual key needed (proxy has no auth)
discover_models true Hermes queries proxy for available models at runtime
models hash with {} values Per-model metadata, not an allowlist: with discover_models: true Hermes lists the live /v1/models set (verified 2026-11-13: Desktop showed all 11 proxy models while models: had 3). Only discover_models: false or a list/string models: pins the catalog. verify.sh S4 follows these rules.

Workflow

Step 1 — Pre-flight Check

The agent MUST run the verification script to check current state:

bash ~/.agents/skills/hermes-litellm-provider/scripts/verify.sh

If the proxy is not running, the agent MUST start it:

systemctl --user start litellm-proxy

Step 2 — Create or Restore the Provider

Option A — Script (recommended):

bash ~/.agents/skills/hermes-litellm-provider/scripts/restore.sh --dry-run
bash ~/.agents/skills/hermes-litellm-provider/scripts/restore.sh

The script backs up config.yaml to ~/.hermes/backups/config/config.yaml.agentfs.<stamp> (Hermes’ own backup dir — Hermes moves config.yaml.bak.<digits> siblings there), replaces only the model: and providers.litellm-vertex-ai: blocks (other lines byte-for-byte), and refuses to write if anything else would change. Restart the Hermes gateway/Desktop to pick up the new default.

Optionally override the default model (must be served by the proxy):

bash ~/.agents/skills/hermes-litellm-provider/scripts/restore.sh \
  --default-model claude-sonnet-5-5

The script:

Option B — Interactive wizard:

hermes model
  1. Select “Custom endpoint (enter URL manually)”
  2. API base URL → http://127.0.0.1:4000/v1
  3. API key → press Enter to skip (no auth needed)
  4. API mode → accept the default (auto-detect)
  5. Pick a default model from the discovered list

Note: hermes model may not persist changes. Verify with scripts/verify.sh after using the wizard.

Step 3 — Verify Configuration

The agent MUST run the verification script:

bash ~/.agents/skills/hermes-litellm-provider/scripts/verify.sh

The agent MUST report the script output verbatim. All 11 checks should pass.

Step 4 — Test from CLI

The agent MUST run a test query:

hermes -z "Say hello in one sentence"   # v0.23+: `chat --oneshot` was removed

Step 5 — Test from Desktop (Optional)

  1. Launch Hermes Desktop
  2. Type /model in a chat session
  3. Confirm all proxy models are listed and selectable
  4. Send a test message

Recovery Procedure

If the LiteLLM provider is lost (e.g., after a config reset):

bash ~/.agents/skills/hermes-litellm-provider/scripts/restore.sh
bash ~/.agents/skills/hermes-litellm-provider/scripts/verify.sh

Specification

ID Capability Verifiable By
S1 LiteLLM proxy is running with all endpoints healthy scripts/verify.sh checks S1a, S1b
S2 Hermes config.yaml has correct model section (provider, base_url, default) scripts/verify.sh checks S2a–S2d
S3 Provider entry exists with correct base_url, discover_models, default_model, and consistency with model.default scripts/verify.sh checks S3a–S3d
S4 Hermes sees the live LiteLLM models (discovered, or pinned list matches) scripts/verify.sh check S4

Tests

Test Spec Command Expected Result
T1 S1 bash scripts/verify.sh 2>&1 \| grep S1 Both S1a and S1b show ✅
T2 S2 bash scripts/verify.sh 2>&1 \| grep S2 All S2a–S2d show ✅
T3 S3 bash scripts/verify.sh 2>&1 \| grep S3 All S3a–S3d show ✅
T4 S4 bash scripts/verify.sh 2>&1 \| grep S4 S4 shows ✅
T5 S1–S4 bash scripts/verify.sh Exit code 0, all 11 checks pass
T6 S2–S4 Strip provider from config → bash scripts/restore.sh → bash scripts/verify.sh Restore + verify both succeed; other config preserved

Troubleshooting

Symptom Cause Fix
“Connection refused” LiteLLM proxy not running systemctl --user start litellm-proxy
Only 1 model in picker Missing discover_models: true Run scripts/restore.sh
Model resets after restart hermes model not persisting Edit config.yaml directly or use scripts/restore.sh
Hermes ignores provider model.provider wrong Verify with scripts/verify.sh
Desktop shows old provider Cached state Restart Hermes Desktop

Changelog

See CHANGELOG.md for version history.