Hermes
Nous Research's open-source terminal AI Agent · HAI Gateway integration
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:
- Website: hermes-agent.nousresearch.com
- Documentation: Quickstart
- GitHub: NousResearch/hermes-agent
Prerequisites
Hermes officially supports Linux / macOS / WSL2 / Termux only. Windows users must install WSL2 first, then run all installation steps inside the WSL2 terminal.
| Dependency | Version | Required | Notes |
|---|---|---|---|
| bash | 4.0+ | Yes | Built into macOS / Linux / WSL2 |
| curl | 7.0+ | Yes | Used to download the install script |
| Git | v2.23+ | Recommended | Used 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 | bashStep 2: Reload your shell environment
# zsh
source ~/.zshrc
# bash
source ~/.bashrcStep 3: Launch the configuration wizard
hermes modelIn the wizard, select Custom endpoint (self-hosted / VLLM / etc.). See the HAI Gateway configuration section below for full details.
Step 4: Verify installation
hermes --versionA 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 --installThis 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 | bashStep 3: Reload your shell and launch the wizard
source ~/.bashrc
hermes modelThe 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
| Field | Value |
|---|---|
| Base URL | https://api.hai.network/openai/v1 |
| API Key | sk-pat-YOUR_ACCESS_TOKEN |
| Model name | gpt-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)
| Field | Value |
|---|---|
| Base URL | https://api.hai.network/compatible-preview/openai/v1 |
| API Key | sk-pat-YOUR_ACCESS_TOKEN |
| Model name | qwen3-max / qwen3.6-plus / glm-4.6 / glm-5.1, etc. |
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-maxProtocol Support
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
| Command | Description |
|---|---|
hermes | Start a CLI conversation |
hermes --tui | Launch the modern terminal UI |
hermes --continue | Resume the most recent session (persistent memory) |
hermes model | Re-select / switch the model provider |
hermes setup | Full configuration wizard (tools, keys, message style, etc.) |
hermes doctor | Diagnose installation and configuration issues |
Troubleshooting
| Issue | Solution |
|---|---|
command not found: hermes | Reload your shell (source ~/.bashrc), or confirm ~/.local/bin is on PATH |
| 401 / Invalid API Key | Verify the token starts with sk-pat- and hasn't expired or been revoked |
| Context length too short | Hermes requires at least 64K context — switch to gpt-5.5-2026-04-23 / qwen3-max or another large-context model |
| No network inside WSL2 | Run wsl --shutdown from PowerShell to restart WSL2, or check Windows firewall / proxy settings |
| Want to change Base URL / Model | Re-run hermes model, or edit ~/.hermes/config.yaml directly |
Uninstall & reset
Full uninstall:
rm -rf ~/.hermes ~/.local/bin/hermesReset config only (keep binary):
rm -rf ~/.hermes
hermes model # re-enter the wizard