Goal of this guide: install Hermes Agent (a local AI agent from Nous Research) on Windows and connect it to your own MYAI168 API, using Claude Opus 4.8.
The native Windows installer (no WSL needed) automatically installs uv, Python, Node, ripgrep, ffmpeg, and a portable Git — you do not need to install anything beforehand. Everything is done in PowerShell, and the config files are edited with Notepad.
Anthropic native endpoint https://www.myai168.com/en/api/anthropic (without /v1)
OpenAI-compatible endpoint https://www.myai168.com/en/api/openai/v1
Main model claude-opus-4-8 (via the Anthropic endpoint)
During installation (possibly at any step) a browser window opens automatically, and PowerShell shows something like:
To continue: 1. Open: https://portal.nousresearch.com/...
Waiting for approval (polling every 1s)...
That is Nous's own subscription service, not the MYAI168 we are going to use. When you see it: press Ctrl + C in PowerShell to interrupt, close the browser page, and do NOT log in or enter the code shown on screen. Skipping it does not affect the rest of the setup (see "2. Skip the Nous Portal Login").
%LOCALAPPDATA%\hermes\config.yaml%LOCALAPPDATA%\hermes\.envC:\Users\your-account\AppData\Local\hermes\)Open PowerShell (no administrator rights needed) and run:
iex (irm https://hermes-agent.nousresearch.com/install.ps1)
During installation it asks whether to install system packages:
The installer handles downloading and installing these dependencies automatically (the official docs state you do not need to install ripgrep / ffmpeg manually); no administrator rights are required and no password prompt appears.
Next (if the login step was not interrupted) the setup wizard starts; but usually you press Ctrl + C at the login step, and the wizard gets interrupted along with it — that is completely fine, because this guide does NOT rely on the wizard for the MYAI168 setup; it edits config.yaml manually in "3. Connect to MYAI168". Whether the wizard finished or not does not matter, and you do not need to reinstall.
(If the wizard does run through, the choices are: Terminal backend → Keep current (local); messaging platforms → select none; tools / other providers → Skip everything.)
As long as the following command prints a version number, Hermes itself is installed and you can go straight to "3. Connect to MYAI168" — open a NEW PowerShell window and check:
hermes --version
As noted in the Installation Overview: when the installer automatically shows "Not logged into Nous Portal / Starting login" and opens a browser asking you to log in — that is Nous's own subscription service, not MYAI168.
Ctrl + C in PowerShell to interrupt.Step 1: write the keys into .env (replace with your real key; paste each line once and press Enter):
echo 'MYAI168_CLAUDE_API_KEY=your-key' >> $env:LOCALAPPDATA\hermes\.env
echo 'MYAI168_API_KEY=your-key' >> $env:LOCALAPPDATA\hermes\.env
Step 2: open config.yaml with Notepad:
notepad $env:LOCALAPPDATA\hermes\config.yaml
The top of the file usually contains these 5 default lines:
model:
default: anthropic/claude-opus-4.6
provider: auto
base_url: https://openrouter.ai/api/v1
providers: {}
Select and delete these 5 lines, and replace them with the content below (keep everything else — the fallback_providers, toolsets, agent, etc. sections below them — untouched):
model:
provider: custom:myai168_claude
default: claude-opus-4-8
context_length: 200000
custom_providers:
- name: myai168_claude
base_url: https://www.myai168.com/en/api/anthropic
key_env: MYAI168_CLAUDE_API_KEY
api_mode: anthropic_messages
providers: {}
★★ Paste carefully ★★ YAML is extremely sensitive to indentation. The three top-level items model: / custom_providers: / providers: must be flush-left (0 leading spaces); only their sub-items are indented. After pasting into Notepad, check that these three items start at the very left edge with no spaces in front; indent with spaces only, never Tab.
Save with Ctrl + S (choose UTF-8 if asked about encoding) and close.
.../anthropic (without /v1).If hermes reports something like "Failed to parse config.yaml" after saving, it is almost always broken indentation or leading spaces before a top-level item — reopen Notepad, check that those three top-level items are flush-left, fix and save again.
Note: cc-switch writes for Hermes may silently fail (the settings never actually land in config.yaml), so for Hermes use the manual Notepad setup in this section and do not rely on cc-switch.
Open a new PowerShell and simply type:
hermes
Once inside, just type and send. If the status bar at the bottom shows claude-opus-4-8, you are done. (If "Auxiliary title generation failed: HTTP 404" appears, that is a minor auxiliary-model feature failing; it does not affect the main conversation and can be ignored.)
Confirm the settings were written (optional):
Get-Content $env:LOCALAPPDATA\hermes\config.yaml -TotalCount 12
.../anthropic to .../anthropic/v1 and try again./model inside a conversation; to add a provider, exit the session and run hermes model.Update to the latest version:
hermes update
%LOCALAPPDATA%\hermes\.env. (On macOS: ~/.hermes/.env.)Official docs: https://hermes-agent.nousresearch.com/docs