# Running NousResearch Hermes Agent on Custom LLM Gateways (https://reapi.ai/resources/hermes-agent)

Developers deploying `NousResearch/hermes-agent` (MIT-licensed, at 267.9k GitHub stars and 81,277 commits on December 3, 2026) routinely mix up two separate OpenAI-compatible HTTP surfaces inside the runtime.<sup><a href="#ref-1">\[1]</a></sup> Upstream, **NousResearch Hermes Agent** acts as an OpenAI API client defined in `~/.hermes/config.yaml`, sending multi-turn tool calls to any inference provider that clears a 64,000-token minimum context floor, such as `https://api.reapi.ai/v1` serving discounted `claude-opus-5-5:claude-0.5`, `gpt-6.2-sol:gpt-0.1`, or `deepseek-v4.1-flash`.<sup><a href="#ref-2">\[2]</a></sup><sup><a href="#ref-5">\[5]</a></sup><sup><a href="#ref-8">\[8]</a></sup><sup><a href="#ref-9">\[9]</a></sup><sup><a href="#ref-10">\[10]</a></sup> Downstream, enabling `~/.hermes/.env` and launching `hermes gateway` turns **Hermes Agent** itself into an OpenAI-compatible HTTP server on `http://127.0.0.1:8642/v1` for Open WebUI, LobeChat, LibreChat, NextChat, and Python OpenAI SDK clients.<sup><a href="#ref-3">\[3]</a></sup><sup><a href="#ref-6">\[6]</a></sup>

Mixing those boundaries causes most first-day failures: pointing `config.yaml` at port 8642 triggers a loopback cycle, pasting a provider key into `API_SERVER_KEY` breaks auth with `401 Unauthorized`, and sending hyphenated page slugs instead of dotted wire IDs fails with `Model Not Found`.<sup><a href="#ref-3">\[3]</a></sup><sup><a href="#ref-5">\[5]</a></sup><sup><a href="#ref-9">\[9]</a></sup> Because one `AIAgent` class in `run_agent.py` drives the CLI, desktop app, over 20 messaging platforms, cron jobs, and the HTTP API server, separating upstream inference from downstream serving stabilizes every surface at once.<sup><a href="#ref-3">\[3]</a></sup><sup><a href="#ref-7">\[7]</a></sup>

![Matte sage-olive anodized aluminum modular blocks coupled to a brushed-brass horological gear wheel with sapphire pivot jewel on dark slate illustrating NousResearch Hermes Agent](https://cdn.reapi.ai/media/blog/hermes-agent/hero-v1.png)

## Separating Upstream Providers From Downstream API Serving

Before editing local files, separate both OpenAI-compatible interfaces by direction, configuration path, credential, base URL, and model string.<sup><a href="#ref-2">\[2]</a></sup><sup><a href="#ref-3">\[3]</a></sup><sup><a href="#ref-5">\[5]</a></sup>

| Integration layer                                         | Traffic direction                   | Config file                                                 | Auth credential                                                             | Base URL                                                       | Model field sent                                                                                                                                                                         |
| --------------------------------------------------------- | ----------------------------------- | ----------------------------------------------------------- | --------------------------------------------------------------------------- | -------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Upstream LLM gateway<sup><a href="#ref-5">\[5]</a></sup>  | Runtime to inference provider       | `~/.hermes/config.yaml`<sup><a href="#ref-5">\[5]</a></sup> | `providers.<name>.key_env` or `api_key`<sup><a href="#ref-5">\[5]</a></sup> | `https://api.reapi.ai/v1`<sup><a href="#ref-8">\[8]</a></sup>  | `claude-opus-5-5:claude-0.5`, `gpt-6.2-sol:gpt-0.1`, `deepseek-v4.1-flash`<sup><a href="#ref-8">\[8]</a></sup><sup><a href="#ref-9">\[9]</a></sup><sup><a href="#ref-10">\[10]</a></sup> |
| Downstream API server<sup><a href="#ref-3">\[3]</a></sup> | Frontend or SDK to `hermes gateway` | `~/.hermes/.env`<sup><a href="#ref-3">\[3]</a></sup>        | `API_SERVER_KEY` bearer token<sup><a href="#ref-3">\[3]</a></sup>           | `http://127.0.0.1:8642/v1`<sup><a href="#ref-3">\[3]</a></sup> | `hermes-agent` or local profile ID from `/v1/models`<sup><a href="#ref-3">\[3]</a></sup><sup><a href="#ref-6">\[6]</a></sup>                                                             |

Installation tooling has evolved rapidly since launch on February 25, 2026.<sup><a href="#ref-7">\[7]</a></sup> Third-party mirrors still cite Python 3.11 and experimental Windows support, whereas the official repository moved its first-party runtime to Python 3.14 on September 7, 2026 (with Node 26 across `pnpm` workspaces) and ships macOS/Windows desktop installers alongside shell installers for Linux, macOS, WSL2, native PowerShell (`iex (irm https://hermes-agent.nousresearch.com/install.ps1)`), and aarch64 Android via Termux.<sup><a href="#ref-1">\[1]</a></sup><sup><a href="#ref-2">\[2]</a></sup>

```bash
# Linux, macOS, or WSL2 (CLI-only without Hermes Desktop)
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash
source ~/.zshrc
```

On first launch, `hermes setup` detects existing OpenClaw, Claude Code, Codex CLI, or Cursor installs and offers migration via `agent-importers`.<sup><a href="#ref-2">\[2]</a></sup> For model routing, `hermes setup --portal` configures Nous Portal OAuth (over 300 models plus hosted web search, image generation, TTS, and cloud browser via the Tool Gateway), while `Use my own API key or a subscription` opens `hermes model` and `Blank Slate` writes explicit `platform_toolsets.cli` and `agent.disabled_toolsets` blocks that enable only File Operations and Terminal tools.<sup><a href="#ref-2">\[2]</a></sup>

Unlike routing an IDE-focused CLI over Anthropic Messages (covered in [connecting Claude Code to a third-party API gateway](/resources/claude-code-third-party-api-setup)) or offloading orchestration into an AWS IAM boundary (see [when Claude Managed Agents on Bedrock beat custom loops](/resources/claude-managed-agents-bedrock)), **Hermes Agent** keeps `USER.md`, `MEMORY.md`, immutable `SOUL.md`, and self-written `~/.hermes/skills/` on your host, executes up to 8 parallel tool calls through a `ThreadPoolExecutor`, and outsources only model inference.<sup><a href="#ref-7">\[7]</a></sup>

## Configuring Hermes Agent Upstream Gateways in config.yaml

Beyond more than 30 built-in providers (OpenRouter, Anthropic, Fireworks AI, DeepSeek, AWS Bedrock, Azure Foundry, and local vLLM/SGLang/Ollama servers), **Hermes Agent** supports any OpenAI-compatible `/v1` API inside `~/.hermes/config.yaml` without plugins or code edits.<sup><a href="#ref-2">\[2]</a></sup><sup><a href="#ref-5">\[5]</a></sup> Create a dedicated key under [reAPI API Keys](/settings/apikeys), export `REAPI_API_KEY` in your shell profile, and bind it through `key_env` so raw secrets stay out of YAML files.<sup><a href="#ref-5">\[5]</a></sup><sup><a href="#ref-8">\[8]</a></sup>

```yaml
model:
  default: gpt-6.2-sol:gpt-0.1
  provider: reapi

providers:
  reapi:
    base_url: https://api.reapi.ai/v1
    key_env: REAPI_API_KEY
    type: openai
    default_model: gpt-6.2-sol:gpt-0.1
    models:
      - claude-opus-5-5:claude-0.5
      - claude-opus-5-5
      - gpt-6.2-sol:gpt-0.1
      - gpt-6.2-sol:gpt-0.4
      - gpt-6.2-sol
      - deepseek-v4.1-flash
```

For headless systemd hosts where inline credentials are required, substitute `api_key: sk-your-reapi-key` strictly inside `providers.reapi`; putting `api_key` at top level leaves the provider unauthenticated and returns `401 Unauthorized`.<sup><a href="#ref-5">\[5]</a></sup>

### The Context Window Floor and Model Picker Rules

Every upstream model connected to **Hermes Agent** must provide at least 64,000 tokens of context.<sup><a href="#ref-2">\[2]</a></sup> Smaller windows fail startup validation because multi-step tool execution, injected skills, and persistent memory quickly overflow short prompts; local model servers must pass explicit flags (`--ctx-size 65536` for `llama.cpp` or `-c 65536` for Ollama).<sup><a href="#ref-2">\[2]</a></sup> All three reAPI routes exceed that 64,000-token minimum cleanly: [DeepSeek V4.1 Flash](/models/deepseek-v4-1-flash) provides a 1M-token window with 384K documented max output and default thinking enabled across three effort levels, while [GPT-6.2 Sol](/models/gpt-6-2-sol) keeps standard token rates up to 272,000 input tokens per call.<sup><a href="#ref-9">\[9]</a></sup><sup><a href="#ref-10">\[10]</a></sup>

The `models:` array directly controls interactive switching. Omitting `models:` reduces `/model` to one button for `default_model`, whereas listing more than 8 entries enables 8-per-page Prev/Next pagination inside Telegram, Discord, Slack, and WhatsApp inline keyboards.<sup><a href="#ref-5">\[5]</a></sup> Running `/model claude-opus-5-5:claude-0.5` changes only the current session, while `/model deepseek-v4.1-flash --global` persists back to `config.yaml`; manual YAML edits require restarting `hermes` or running `hermes gateway restart`.<sup><a href="#ref-5">\[5]</a></sup>

### Mapping Wire Model IDs and Environment Credentials

Watch the naming split between documentation URLs and live wire identifiers. On reAPI as of December 3, 2026, model pages use hyphenated slugs (`/models/gpt-6-2-sol` and `/models/deepseek-v4-1-flash`), whereas `POST https://api.reapi.ai/v1/chat/completions` requires dotted wire IDs (`gpt-6.2-sol`, `gpt-6.2-sol:gpt-0.1`, `gpt-6.2-sol:gpt-0.4`, and `deepseek-v4.1-flash`).<sup><a href="#ref-9">\[9]</a></sup><sup><a href="#ref-10">\[10]</a></sup> Meanwhile, [Claude Opus 5.5](/models/claude-opus-5-5) uses hyphenated wire IDs (`claude-opus-5-5` and `claude-opus-5-5:claude-0.5`).<sup><a href="#ref-8">\[8]</a></sup> Sending `gpt-6-2-sol:gpt-0.1` instead of `gpt-6.2-sol:gpt-0.1` yields `Model Not Found` even with a valid key.<sup><a href="#ref-5">\[5]</a></sup><sup><a href="#ref-9">\[9]</a></sup>

Because [Claude Opus 5.5](/models/claude-opus-5-5) on reAPI accepts synchronous OpenAI Chat Completions at `POST https://api.reapi.ai/v1/chat/completions` (`Authorization: Bearer`, preserving Anthropic tool and thinking blocks in compatible JSON) alongside its native Anthropic Messages route (`POST https://api.reapi.ai/v1/messages`), one `type: openai` block consolidates Anthropic, OpenAI, and DeepSeek models under one balance and `/model` menu.<sup><a href="#ref-5">\[5]</a></sup><sup><a href="#ref-8">\[8]</a></sup><sup><a href="#ref-9">\[9]</a></sup><sup><a href="#ref-10">\[10]</a></sup>

## Live Token Economics Across Discounted reAPI Routes

Multi-step loops replay `MEMORY.md`, loaded skills, and prior tool results on every turn, making input volume and prompt-cache reads the primary cost driver for **Hermes Agent**.<sup><a href="#ref-7">\[7]</a></sup> One community security audit shared on X logged 1.42M tokens in 5 minutes and 4 seconds ($4.63 on Grok 4.5) during a single task, showing how rapidly autonomous chains accumulate tokens.<sup><a href="#ref-7">\[7]</a></sup>

Nous Portal offers bundled convenience ($20/month Plus with $22 credits, $100/month Super with $110 credits, $200/month Ultra with $220 credits, and optional Nous Portal Cloud instances starting around $0.32/day for 1GB RAM and 2 vCPUs).<sup><a href="#ref-7">\[7]</a></sup> Teams already self-hosting on a laptop or VPS can instead route raw token spend through live December 3, 2026 reAPI group IDs (quoted between 10:05 and 10:06 UTC, refreshed every 300 seconds, with 1 credit equal to $0.001 and settled from exact usage without whole-credit rounding).<sup><a href="#ref-8">\[8]</a></sup><sup><a href="#ref-9">\[9]</a></sup><sup><a href="#ref-10">\[10]</a></sup>

| Wire model ID                | Group                | Input / 1M | Output / 1M | Cache read / 1M | Cache write / 1M |                   Sample 3.2M-token session |
| ---------------------------- | -------------------- | ---------: | ----------: | --------------: | ---------------: | ------------------------------------------: |
| `claude-opus-5-5`            | `claude` (default)   |      $2.80 |      $14.00 |           $0.14 |            $3.50 |   $6.23<sup><a href="#ref-8">\[8]</a></sup> |
| `claude-opus-5-5:claude-0.5` | `claude-0.5`         |      $2.00 |      $10.00 |           $0.10 |            $2.50 |   $4.45<sup><a href="#ref-8">\[8]</a></sup> |
| `gpt-6.2-sol`                | `gpt` (default)      |      $1.50 |       $7.50 |          $0.075 |           $1.875 |   $3.34<sup><a href="#ref-9">\[9]</a></sup> |
| `gpt-6.2-sol:gpt-0.4`        | `gpt-0.4`            |      $0.80 |       $4.00 |           $0.04 |            $1.00 |   $1.78<sup><a href="#ref-9">\[9]</a></sup> |
| `gpt-6.2-sol:gpt-0.1`        | `gpt-0.1`            |      $0.20 |       $1.00 |           $0.01 |            $0.25 |   $0.45<sup><a href="#ref-9">\[9]</a></sup> |
| `deepseek-v4.1-flash`        | `deepseek` (default) |      $0.18 |       $0.72 |         $0.0036 |            $0.18 | $0.33<sup><a href="#ref-10">\[10]</a></sup> |

The sample column totals a concrete 3.2M-token autonomous workflow: 500,000 uncached input tokens, 500,000 cache-write tokens, 2,000,000 cache-read tokens, and 200,000 output tokens, keeping each request under 272,000 input tokens.<sup><a href="#ref-8">\[8]</a></sup><sup><a href="#ref-9">\[9]</a></sup><sup><a href="#ref-10">\[10]</a></sup> Default `claude-opus-5-5` sits 30% below Anthropic's published $4.00 input and $20.00 output list rates (verified October 9, 2026), while `claude-opus-5-5:claude-0.5` halves standard base pricing to $2.00/$10.00 and trims the 3.2M-token session from $6.23 to $4.45.<sup><a href="#ref-8">\[8]</a></sup>

Shifting routine cron digests and repository scanning onto budget routes multiplies savings: the same 3.2M-token run drops to $0.445 ($0.45) on `gpt-6.2-sol:gpt-0.1` and $0.3312 ($0.33) on `deepseek-v4.1-flash`, where 2,000,000 cached reads cost $0.0072.<sup><a href="#ref-9">\[9]</a></sup><sup><a href="#ref-10">\[10]</a></sup> Monitor one cliff on [GPT-6.2 Sol](/models/gpt-6-2-sol): once any single prompt crosses 272,000 input tokens, long-context rates activate across every group (`gpt-0.1` doubles input to $0.40, cache read to $0.02, and cache write to $0.50, while output increases 50% to $1.50; default `gpt` climbs to $3.00 input and $11.25 output).<sup><a href="#ref-9">\[9]</a></sup> [DeepSeek V4.1 Flash](/models/deepseek-v4-1-flash) keeps flat token rates across its entire 1M-token window, protecting unattended log audits from sudden tier jumps.<sup><a href="#ref-10">\[10]</a></sup>

## Exposing Hermes Agent Downstream With hermes gateway

Follow Nous Research's sequencing rule: confirm one normal CLI conversation succeeds before adding messaging adapters, cron triggers, or the HTTP API server.<sup><a href="#ref-2">\[2]</a></sup> Once upstream inference works cleanly, enable the downstream server in `~/.hermes/.env`:<sup><a href="#ref-3">\[3]</a></sup><sup><a href="#ref-6">\[6]</a></sup>

```bash
API_SERVER_ENABLED=true
API_SERVER_HOST=127.0.0.1
API_SERVER_PORT=8642
API_SERVER_KEY=replace-with-random-local-secret
# Uncomment only if browser JavaScript calls the gateway directly
# API_SERVER_CORS_ORIGINS=http://localhost:3000
```

Non-loopback `API_SERVER_HOST` bindings enforce `API_SERVER_KEY` authentication automatically, and setting a key even on `127.0.0.1` blocks local processes from invoking shell tools unauthenticated; optional `API_SERVER_CORS_ORIGINS` allowlists cache preflight responses for 10 minutes.<sup><a href="#ref-3">\[3]</a></sup><sup><a href="#ref-6">\[6]</a></sup> Run `hermes gateway`, verify `[API Server] API server listening on http://127.0.0.1:8642`, and connect Open WebUI, LobeChat, LibreChat, or the OpenAI Python SDK to `http://127.0.0.1:8642/v1`:<sup><a href="#ref-3">\[3]</a></sup><sup><a href="#ref-6">\[6]</a></sup>

```python
from openai import OpenAI

client = OpenAI(
    base_url="http://127.0.0.1:8642/v1",
    api_key="replace-with-random-local-secret",
)

resp = client.chat.completions.create(
    model="hermes-agent",
    messages=[{"role": "user", "content": "Check git status and summarize pending changes."}],
    extra_headers={"Idempotency-Key": "repo-audit-2026-12-03-01"},
)
print(resp.choices[0].message.content)
```

Downstream clients pass `"hermes-agent"` (or a profile name from `GET /v1/models`), never your upstream reAPI model string.<sup><a href="#ref-3">\[3]</a></sup><sup><a href="#ref-6">\[6]</a></sup> Port 8642 exposes four families: stateless `POST /v1/chat/completions`, SQLite-backed `POST /v1/responses` (chaining turns via `previous_response_id` or named `conversation` state), asynchronous `/v1/runs` (`POST /v1/runs`, `GET /v1/runs/{run_id}`, SSE progress on `GET /v1/runs/{run_id}/events`, and `POST /v1/runs/{run_id}/stop`), plus discovery and health checks (`GET /v1/models`, `GET /api/model/options`, `GET /v1/capabilities`, `GET /health`, and `GET /health/detailed`).<sup><a href="#ref-3">\[3]</a></sup><sup><a href="#ref-6">\[6]</a></sup>

### Idempotency Keys, Streaming Conflicts, and Session Lifecycles

May 16, 2026 third-party guides still depict `Idempotency-Key` as a 5-minute response cache.<sup><a href="#ref-6">\[6]</a></sup> The November 17, 2026 official API Server specification (`api-server.md`, 953 lines in `NousResearch/hermes-agent`) clarifies that a gateway running a session authority (Canonical mode) treats each key as a durable admission identity scoped to the API profile and `API_SERVER_KEY`; the 5-minute in-memory cache applies only to Legacy mode (without streaming deduplication), while `/v1/runs` uses a separate 24-hour ledger.<sup><a href="#ref-3">\[3]</a></sup><sup><a href="#ref-4">\[4]</a></sup>

Reusing a key in Canonical mode with modified identity fields or a different session triggers `admission_conflict` and executes nothing.<sup><a href="#ref-3">\[3]</a></sup><sup><a href="#ref-4">\[4]</a></sup> Responses and non-streaming Chat Completions return HTTP 409, whereas streaming Chat Completions has already sent HTTP 200 headers and delivers the refusal inside the final SSE chunk (`finish_reason: "error"`, `error.message: "admission_conflict"`) right before `data: [DONE]`.<sup><a href="#ref-3">\[3]</a></sup><sup><a href="#ref-4">\[4]</a></sup> Client wrappers inspecting only HTTP status codes on `stream: true` will miss that refusal completely.<sup><a href="#ref-3">\[3]</a></sup><sup><a href="#ref-4">\[4]</a></sup>

Four contract details govern reliable retries against `hermes gateway`:<sup><a href="#ref-3">\[3]</a></sup><sup><a href="#ref-4">\[4]</a></sup>

1. Identity fields differ by route: `/v1/responses` hashes `input`, `instructions`, `previous_response_id`, `conversation`, `conversation_history`, `model`, `provider`, `model_options`, `tools`, and `truncation`, whereas `/v1/chat/completions` excludes `tools` and `tool_choice` (replaying the original answer when only tool definitions change), and both allow switching between JSON and `stream: true`.<sup><a href="#ref-3">\[3]</a></sup><sup><a href="#ref-4">\[4]</a></sup>
2. Treat `409 unknown_execution` on `/v1/responses` as a side-effect warning, because the store recorded the claim (for example from an older release) without an answer, so resending under a new key risks running shell mutations twice.<sup><a href="#ref-3">\[3]</a></sup><sup><a href="#ref-4">\[4]</a></sup>
3. Separate wrap-ups from cancellations: interrupted turns return `finish_reason: "cancelled"` and failures return `"error"` (never `"stop"`), while exhausting `agent.max_turns` returns usable summary text with `finish_reason: "length"` and `hermes.error_code: "iteration_budget_exhausted"` on Chat Completions (or `status: "incomplete"` on Responses).<sup><a href="#ref-3">\[3]</a></sup><sup><a href="#ref-4">\[4]</a></sup>
4. Account for deletion tombstones: `DELETE /api/sessions/{id}` retains tombstones for 7 days before pruning, permanently retires explicit `X-Hermes-Session-Id` values (returning `not_found` to fresh calls), and in `/v1/responses` depends on a bounded store retaining the 1,000 most recently settled identities per profile by default (10 per stored-response slot; pending or running entries never drop).<sup><a href="#ref-3">\[3]</a></sup><sup><a href="#ref-4">\[4]</a></sup>

### Tool Progress Streams, Prompt Layering, and Multimodal Payloads

Streaming from `hermes gateway` emits custom `hermes.tool.progress` events alongside `chat.completion.chunk` frames so frontends like Open WebUI can display active tool badges without streaming bulky tool output or polluting saved history; standard OpenAI clients simply ignore unknown event types.<sup><a href="#ref-6">\[6]</a></sup> On `/v1/responses`, SSE emits `response.created`, `response.output_text.delta`, `response.output_item.added`, `response.output_item.done`, and `response.completed` with structured `function_call` and `function_call_output` items.<sup><a href="#ref-6">\[6]</a></sup> Any `system` prompt or Responses `instructions` passed by a frontend appends onto the core system prompt of **Hermes Agent** without disabling local tools, memory, or skills.<sup><a href="#ref-6">\[6]</a></sup>

Watch one cross-boundary mismatch on vision inputs. Downstream `POST /v1/chat/completions` accepts both remote `http(s)` image URLs and inline `data:image/...` base64 URIs while keeping structured image arrays separate from gateway slash commands.<sup><a href="#ref-3">\[3]</a></sup><sup><a href="#ref-6">\[6]</a></sup> Upstream, reAPI rejects base64 and `data:` URIs platform-wide in favor of public HTTP(S) URLs.<sup><a href="#ref-8">\[8]</a></sup><sup><a href="#ref-9">\[9]</a></sup><sup><a href="#ref-10">\[10]</a></sup> When routing Open WebUI image turns through reAPI, reference hosted HTTP(S) URLs or upload pasted screenshots before forwarding them upstream.<sup><a href="#ref-3">\[3]</a></sup><sup><a href="#ref-9">\[9]</a></sup><sup><a href="#ref-10">\[10]</a></sup>

## Verification Sequence and Common Misconfigurations

Verify bottom-up so upstream credential errors never look like local gateway bugs. First, test `https://api.reapi.ai/v1/chat/completions` directly outside Hermes:<sup><a href="#ref-9">\[9]</a></sup>

```bash
curl -sS https://api.reapi.ai/v1/chat/completions \
  -H "Authorization: Bearer $REAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-6.2-sol:gpt-0.1",
    "messages": [{"role": "user", "content": "Reply with OK only."}]
  }'
```

Second, run `hermes doctor` to confirm `~/.hermes/config.yaml` loaded the right active provider and default model, then complete one CLI turn via `hermes`.<sup><a href="#ref-2">\[2]</a></sup><sup><a href="#ref-5">\[5]</a></sup> Third, launch `hermes gateway`, check `curl http://127.0.0.1:8642/health` (`{"status": "ok"}`, or `GET /health/detailed` for session metrics), query `GET /v1/models`, and send one authenticated test turn to `http://127.0.0.1:8642/v1/chat/completions`.<sup><a href="#ref-3">\[3]</a></sup><sup><a href="#ref-6">\[6]</a></sup>

| Failure symptom                                                                                        | Layer affected                | Root cause                                                                                                                                           | Resolution                                                                                                                                                                                      |
| ------------------------------------------------------------------------------------------------------ | ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Startup rejects configured model<sup><a href="#ref-2">\[2]</a></sup>                                   | Upstream (`config.yaml`)      | Context window below 64,000 tokens<sup><a href="#ref-2">\[2]</a></sup>                                                                               | Use a 64K+ hosted model or set `--ctx-size 65536` / `-c 65536` locally<sup><a href="#ref-2">\[2]</a></sup>                                                                                      |
| `401 Unauthorized` on first turn<sup><a href="#ref-5">\[5]</a></sup>                                   | Upstream (`config.yaml`)      | `api_key` at YAML root instead of `providers.<name>`, or `key_env` unset<sup><a href="#ref-5">\[5]</a></sup>                                         | Nest `key_env: REAPI_API_KEY` under `providers.reapi` and export it<sup><a href="#ref-5">\[5]</a></sup>                                                                                         |
| `Model Not Found` from gateway<sup><a href="#ref-5">\[5]</a></sup><sup><a href="#ref-9">\[9]</a></sup> | Upstream (`config.yaml`)      | Hyphenated slug sent instead of dotted wire ID<sup><a href="#ref-9">\[9]</a></sup><sup><a href="#ref-10">\[10]</a></sup>                             | Use `gpt-6.2-sol:gpt-0.1`, `deepseek-v4.1-flash`, or `claude-opus-5-5:claude-0.5`<sup><a href="#ref-8">\[8]</a></sup><sup><a href="#ref-9">\[9]</a></sup><sup><a href="#ref-10">\[10]</a></sup> |
| `/model` shows one button only<sup><a href="#ref-5">\[5]</a></sup>                                     | Upstream (`config.yaml`)      | `models:` list omitted under provider block<sup><a href="#ref-5">\[5]</a></sup>                                                                      | Add explicit `models:` entries (over 8 activates 8-per-page pagination) and restart<sup><a href="#ref-5">\[5]</a></sup>                                                                         |
| HTTP 409 or SSE `admission_conflict`<sup><a href="#ref-3">\[3]</a></sup>                               | Downstream (`hermes gateway`) | Reused `Idempotency-Key` with changed fields or session<sup><a href="#ref-3">\[3]</a></sup><sup><a href="#ref-4">\[4]</a></sup>                      | Issue a fresh key per distinct turn and inspect final SSE error chunks<sup><a href="#ref-3">\[3]</a></sup><sup><a href="#ref-4">\[4]</a></sup>                                                  |
| Vision paste rejected upstream<sup><a href="#ref-3">\[3]</a></sup><sup><a href="#ref-9">\[9]</a></sup> | Cross-boundary                | Downstream accepts `data:image/...` while reAPI requires public HTTP(S) URLs<sup><a href="#ref-3">\[3]</a></sup><sup><a href="#ref-9">\[9]</a></sup> | Supply hosted HTTP(S) URLs for multimodal requests sent to reAPI<sup><a href="#ref-9">\[9]</a></sup><sup><a href="#ref-10">\[10]</a></sup>                                                      |

Keeping `~/.hermes/config.yaml` strictly separate from `hermes gateway` gives **NousResearch Hermes Agent** a clean two-tier boundary: local memory, skills, and durable admission queues stay on `http://127.0.0.1:8642/v1`, while upstream token spend bills through one credential from [API Keys](/settings/apikeys) against `https://api.reapi.ai/v1`.<sup><a href="#ref-3">\[3]</a></sup><sup><a href="#ref-5">\[5]</a></sup><sup><a href="#ref-8">\[8]</a></sup> Route routine tasks through [DeepSeek V4.1 Flash](/models/deepseek-v4-1-flash) or discounted [GPT-6.2 Sol](/models/gpt-6-2-sol), escalate hard architecture work to [Claude Opus 5.5](/models/claude-opus-5-5) via `/model claude-opus-5-5:claude-0.5`, and run `hermes doctor` before exposing port 8642 to browser clients.<sup><a href="#ref-5">\[5]</a></sup><sup><a href="#ref-8">\[8]</a></sup><sup><a href="#ref-9">\[9]</a></sup><sup><a href="#ref-10">\[10]</a></sup>

## References

1. <span id="ref-1" />Nous Research. *NousResearch/hermes-agent GitHub Repository.* Checked December 3, 2026 from [github.com/NousResearch/hermes-agent](https://github.com/NousResearch/hermes-agent)
2. <span id="ref-2" />Nous Research. *Hermes Agent Quickstart Documentation.* Checked December 3, 2026 from [hermes-agent.nousresearch.com/docs/getting-started/quickstart](https://hermes-agent.nousresearch.com/docs/getting-started/quickstart)
3. <span id="ref-3" />Nous Research. *Hermes Agent API Server Documentation.* Checked December 3, 2026 from [hermes-agent.nousresearch.com/docs/user-guide/features/api-server](https://hermes-agent.nousresearch.com/docs/user-guide/features/api-server)
4. <span id="ref-4" />Nous Research. *API Server Source Specification (api-server.md).* Checked December 3, 2026 from [github.com/NousResearch/hermes-agent/blob/main/website/docs/user-guide/features/api-server.md](https://github.com/NousResearch/hermes-agent/blob/main/website/docs/user-guide/features/api-server.md)
5. <span id="ref-5" />Aiberm API Documentation. *Hermes Agent Setup.* Checked December 3, 2026 from [aiberm.com/docs/en/hermes](https://aiberm.com/docs/en/hermes/)
6. <span id="ref-6" />Tom Langridge (Fastio). *Hermes Agent API Server: OpenAI-Compatible Endpoints and Setup.* Checked December 3, 2026 from [fast.io/resources/hermes-agent-api-server-guide](https://fast.io/resources/hermes-agent-api-server-guide/)
7. <span id="ref-7" />Kenji Tanaka (Kie AI). *What Is Hermes Agent? Nous Research's Learning-Loop Agent.* Checked December 3, 2026 from [kie.ai/blog/what-is-hermes-agent](https://kie.ai/blog/what-is-hermes-agent)
8. <span id="ref-8" />reAPI. *Claude Opus 5.5 API Pricing and Endpoint Reference.* Checked December 3, 2026 from [reapi.ai/models/claude-opus-5-5](https://reapi.ai/models/claude-opus-5-5)
9. <span id="ref-9" />reAPI. *GPT-6.2 Sol API Pricing and Endpoint Reference.* Checked December 3, 2026 from [reapi.ai/models/gpt-6-2-sol](https://reapi.ai/models/gpt-6-2-sol)
10. <span id="ref-10" />reAPI. *DeepSeek V4.1 Flash API Pricing and Endpoint Reference.* Checked December 3, 2026 from [reapi.ai/models/deepseek-v4-1-flash](https://reapi.ai/models/deepseek-v4-1-flash)
