HAI Gateway Docs

Hermes

Nous Research's open-source terminal AI Agent · HAI Gateway integration

About Hermes

Hermes is Nous Research's open-source command-line AI Agent with persistent memory, supporting any OpenAI-compatible endpoint (/v1/chat/completions). With HAI Gateway, a single Access Token lets you call OpenAI's full model lineup as well as Chinese models (Tongyi QWEN / Zhipu GLM) — no need to manage separate keys per provider.

Official resources:

Prerequisites

Platform support

Hermes officially supports Linux / macOS / WSL2 / Termux only. Windows users must install WSL2 first, then run all installation steps inside the WSL2 terminal.

DependencyVersionRequiredNotes
bash4.0+YesBuilt into macOS / Linux / WSL2
curl7.0+YesUsed to download the install script
Gitv2.23+RecommendedUsed for persistent memory sync — git-scm.com

macOS / Linux Setup

Step 1: One-line install script

curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash

Step 2: Reload your shell environment

# zsh
source ~/.zshrc
 
# bash
source ~/.bashrc

Step 3: Launch the configuration wizard

hermes model

In the wizard, select Custom endpoint (self-hosted / VLLM / etc.). See the HAI Gateway configuration section below for full details.

Step 4: Verify installation

hermes --version
Installation complete

A version number means the install succeeded. Run hermes to start a CLI conversation.

Windows (WSL2) Setup

Step 1: Install WSL2

Open PowerShell as Administrator and run:

wsl --install

This installs WSL2 and the default Ubuntu distribution. Reboot when prompted, then open the WSL2 terminal.

Step 2: Run the install script inside WSL2

curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash

Step 3: Reload your shell and launch the wizard

source ~/.bashrc
hermes model
Why WSL2 is required

The Hermes install script and runtime rely on Linux system calls and won't work in native Windows / PowerShell. WSL2 provides a full Linux kernel environment and is the officially recommended path.

Configure HAI Gateway

Run hermes model and pick Custom endpoint (self-hosted / VLLM / etc.) from the provider list. Then, depending on which model family you want to use, fill in Base URL, API Key, and Model name.

Option A: OpenAI models

FieldValue
Base URLhttps://api.hai.network/openai/v1
API Keysk-pat-YOUR_ACCESS_TOKEN
Model namegpt-5.5-2026-04-23 / gpt-5.4-mini-2026-03-17 / gpt-5.4-2026-03-05, etc.

Option B: Chinese models (Tongyi QWEN / Zhipu GLM)

FieldValue
Base URLhttps://api.hai.network/compatible-preview/openai/v1
API Keysk-pat-YOUR_ACCESS_TOKEN
Model nameqwen3-max / qwen3.6-plus / glm-4.6 / glm-5.1, etc.
Tip

This channel is also OpenAI-compatible, so you can switch model names between Chinese and OpenAI models freely.

Full config.yaml example

You can also edit ~/.hermes/config.yaml directly:

model:
  default: gpt-5.5-2026-04-23
  provider: custom
  base_url: https://api.hai.network/openai/v1
  api_key: sk-pat-YOUR_ACCESS_TOKEN
 
# Chinese models: replace base_url / default
# base_url: https://api.hai.network/compatible-preview/openai/v1
# default:  qwen3-max

Protocol Support

Anthropic and Google Gemini models are not yet supported

Hermes calls custom endpoints in OpenAI format (/v1/chat/completions) only, so Claude / Gemini models cannot currently be reached through HAI Gateway's /anthropic and /google routes.

We are working on it — native protocol passthrough will be available in a future release.

Common Commands

CommandDescription
hermesStart a CLI conversation
hermes --tuiLaunch the modern terminal UI
hermes --continueResume the most recent session (persistent memory)
hermes modelRe-select / switch the model provider
hermes setupFull configuration wizard (tools, keys, message style, etc.)
hermes doctorDiagnose installation and configuration issues

Troubleshooting

IssueSolution
command not found: hermesReload your shell (source ~/.bashrc), or confirm ~/.local/bin is on PATH
401 / Invalid API KeyVerify the token starts with sk-pat- and hasn't expired or been revoked
Context length too shortHermes requires at least 64K context — switch to gpt-5.5-2026-04-23 / qwen3-max or another large-context model
No network inside WSL2Run wsl --shutdown from PowerShell to restart WSL2, or check Windows firewall / proxy settings
Want to change Base URL / ModelRe-run hermes model, or edit ~/.hermes/config.yaml directly
Uninstall & reset

Full uninstall:

rm -rf ~/.hermes ~/.local/bin/hermes

Reset config only (keep binary):

rm -rf ~/.hermes
hermes model   # re-enter the wizard