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 5.5.
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-5-5 (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 any custom_providers: block in the file), 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-5-5
context_length: 200000
providers:
myai168_claude:
api: https://www.myai168.com/en/api/anthropic
key_env: MYAI168_CLAUDE_API_KEY
transport: anthropic_messages
default_model: claude-opus-5-5
myai168:
api: https://www.myai168.com/en/api/openai/v1
key_env: MYAI168_API_KEY
transport: chat_completions
default_model: gpt-6.1-sol
★★ Paste carefully ★★ YAML is extremely sensitive to indentation. The two top-level items model: / providers: must be flush-left (0 leading spaces); only their sub-items are indented. After pasting into Notepad, check that these two 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.
api of the Anthropic endpoint must end with .../anthropic (without /v1).providers: dictionary format. The custom_providers: list used by older guides is still read, and hermes update converts it to this format automatically (base_url becomes api, api_mode becomes transport) — a rewritten config file is expected.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 two 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-5-5, 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
api of myai168_claude from .../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.Official docs: https://hermes-agent.nousresearch.com/docs
Everything below is optional; the config file is %LOCALAPPDATA%\hermes\config.yaml and keys live in %LOCALAPPDATA%\hermes\.env.
You can switch between the two configured providers at any time. Inside a conversation use the three-part form "custom:provider:model":
/model custom:myai168:gpt-6.1-sol
/model custom:myai168_claude:claude-opus-5-5
Or choose when starting:
hermes chat --provider custom:myai168 -m gpt-6.1-sol
hermes chat -Q -q "List the five largest files in this folder"
-q passes the prompt and -Q is quiet mode (no banner, only the answer).
Type /reasoning low, /reasoning medium or /reasoning high in a conversation, or start with hermes --reasoning high. Higher effort means more output and usage.
To let Hermes use this site's AI modules as tools, add the block below to the config file (mcp_servers: must also be flush-left) and a line MYAI168_API_KEY=your-key to .env:
mcp_servers:
myai168:
url: "https://www.myai168.com/en/mcp/"
headers:
Authorization: "Bearer ${MYAI168_API_KEY}"
timeout: 600
After saving, run hermes mcp test myai168 to test the connection; in an open conversation type /reload-mcp to reload. The tool list and arguments are on the MYAI168 MCP CLI page.
hermes config show
hermes doctor
hermes config show prints the active model and the locations of the config and key files; hermes doctor checks the installation and dependencies.