Home›Developer Center›Hermes Agent macOS

Hermes Agent macOS

API DocumentationOpenAI ChatGPT APIAnthropic (Claude) APIGoogle Gemini APIGoogle Search APIGoogle News APIOpenRouter APIAPI Pricing
CLI & Agent Guidescc-switch macOScc-switch Windowscc-switch LinuxOpenCode macOSOpenCode WindowsOpenCode LinuxOpenClaw macOSOpenClaw WindowsOpenClaw LinuxHermes Agent macOSHermes Agent WindowsHermes Agent LinuxClaude Code CLI macOSClaude Code CLI WindowsClaude Code CLI LinuxCodex CLI macOSCodex CLI WindowsCodex CLI Linux
MYAI168 API & MCPMYAI168 MCP CLIMYAI168 MCP Web & App
No matching questions on this page.Search the whole site
Installation Overview (macOS)

Hermes Agent Installation and MYAI168 Setup Guide — macOS

Goal of this guide: install Hermes Agent (a local AI agent from Nous Research) on macOS and connect it to your own MYAI168 API, using Claude Opus 4.8.

Endpoints and Model

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)

Important Security Notes

  • Hermes is an agent with real system permissions: it can read and write files, run commands, and control the browser. Do not install it on a primary machine holding lots of sensitive data; early token usage can be high, so set a usage cap in the MYAI168 dashboard.
  • Treat your API key like a password and never share it. If it leaks, revoke it in the MYAI168 dashboard and issue a new one.

Config File Locations (macOS)

  • Config: ~/.hermes/config.yaml
  • Keys: ~/.hermes/.env
1. Install Hermes

Run the official one-line install script (it automatically installs uv and Python 3.11; no sudo needed):

curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash

After installation, make the command available:

source ~/.zshrc
hermes --version
2. Configure the Provider (wizard)

After installation the setup wizard starts:

  • How would you like to set up Hermes? → choose Full setup (use your own key); do NOT choose Nous Portal.
  • Select provider: scroll to the bottom and choose custom (direct API) / Custom endpoint, then enter in order:
    • Base URL: https://www.myai168.com/en/api/anthropic
    • API Key: your MYAI168 key
    • Model: claude-opus-4-8
    • api_mode: anthropic_messages
  • Messaging platforms → select none, just press Enter.
  • Tools → accept the defaults, or use SPACE to disable high-privilege tools.
  • The various "Choose a provider" prompts (browser / image / TTS / vision / search) → Skip them all.

If you previously installed OpenClaw, the wizard may detect it and offer to migrate; you can accept, but the migrated settings are often overwritten by defaults — be sure to do "2-B. Manually Verify / Fix the Settings" below.

2-B. Manually Verify / Fix the Settings (recommended)

The wizard may not have pointed the model at the correct endpoint; checking and editing the config file directly is the most reliable way.

First confirm the keys (add them if missing; replace with your real key):

cat ~/.hermes/.env
echo 'MYAI168_CLAUDE_API_KEY=your-key' >> ~/.hermes/.env
echo 'MYAI168_API_KEY=your-key' >> ~/.hermes/.env

Edit the config file:

hermes config edit

Change the model block at the top to the following:

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
  - name: myai168
    base_url: https://www.myai168.com/en/api/openai/v1
    key_env: MYAI168_API_KEY
    api_mode: chat_completions

providers: {}

★★ Paste carefully ★★ YAML is extremely sensitive to indentation. The leading spaces on each line above are exactly the indentation required. The three top-level items model: / custom_providers: / providers: must be flush-left (0 leading spaces); only their sub-items are indented. Do not add extra spaces in front of any line when copying, and never use Tab (spaces only).

Notes: provider refers to the entry below with the same name; key_env takes the environment variable NAME, not the key itself; the Anthropic endpoint base_url must end with .../anthropic (without /v1).

2-C. If the Config Breaks: Rewrite It in One Command (safest)

If hermes reports a YAML error like "Failed to parse config.yaml" after manual editing (usually broken indentation or extra pasted spaces), the safest fix is to rewrite the whole file with one command — copy the entire block below, paste it into the terminal, and press Enter (the heredoc takes care of the formatting, so there are no indentation problems). Note: this overwrites the entire config.yaml — any custom model / toolsets / terminal / TTS / compression settings you had will be wiped and reset to defaults. Only use it when the file is already unparseable and beyond rescue; if you have custom settings to keep, fix the indentation by hand instead (touch only the model / custom_providers / providers blocks and leave the other blocks untouched).

cat > ~/.hermes/config.yaml << 'EOF'
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
  - name: myai168
    base_url: https://www.myai168.com/en/api/openai/v1
    key_env: MYAI168_API_KEY
    api_mode: chat_completions

providers: {}
EOF

(This is exactly why cat > is less error-prone than manual editing — just paste the whole block; no need to fix the indentation line by line.)

3. Verify and Launch (macOS)

Check the settings and start:

hermes doctor
hermes

(If doctor only reminds you to "Run hermes setup to configure missing API keys for full tool access", that refers to the tools you skipped and has nothing to do with the model — ignore it, and do NOT rerun hermes setup, or it may overwrite your settings.)

Once inside the interactive UI, 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.)

4. Quick Troubleshooting
  • hermes command not found → run source ~/.zshrc or reopen the terminal. (On Windows: open a new PowerShell window so PATH takes effect.)
  • Interactive chat reports unrecognized arguments (Chinese input) → the Chinese IME turned the quotes into full-width ones. Just type hermes to enter the interactive UI and type inside it.
  • Cannot paste into nano → write the file directly with commands (echo / cat >) — see "2-C".
  • Replies fail with 404 / not found → change the base_url of myai168_claude from .../anthropic to .../anthropic/v1 and try again.
  • Replies fail with 401 / unauthorized → MYAI168_CLAUDE_API_KEY in .env is missing or wrong.
  • No inference provider configured (even though you configured it) → the model block in config.yaml is still the default values and was not changed to custom:myai168_claude.
  • Auxiliary title generation failed: HTTP 404 → a minor auxiliary-model feature failing; it does not affect the main conversation and can be ignored.
  • Switch models → use /model inside a conversation; to add a provider, exit the session and run hermes model.
5. Maintenance

Update to the latest version:

hermes update

Rotate the API Key (after a leak, or periodically)

  1. Revoke the old key in the MYAI168 dashboard and issue a new one.
  2. Update MYAI168_CLAUDE_API_KEY / MYAI168_API_KEY in ~/.hermes/.env. (On Windows: %LOCALAPPDATA%\hermes\.env.)
  3. Restart Hermes.

Official docs: https://hermes-agent.nousresearch.com/docs

‹ Previous page: OpenClaw LinuxNext page: Hermes Agent Windows ›
↑
Question link copied.

Other FAQ pages

API Documentation

  • OpenAI ChatGPT API
  • Anthropic (Claude) API
  • Google Gemini API
  • Google Search API
  • Google News API
  • OpenRouter API
  • API Pricing

CLI & Agent Guides

  • cc-switch macOS
  • cc-switch Windows
  • cc-switch Linux
  • OpenCode macOS
  • OpenCode Windows
  • OpenCode Linux
  • OpenClaw macOS
  • OpenClaw Windows
  • OpenClaw Linux
  • Hermes Agent Windows
  • Hermes Agent Linux
  • Claude Code CLI macOS
  • Claude Code CLI Windows
  • Claude Code CLI Linux
  • Codex CLI macOS
  • Codex CLI Windows
  • Codex CLI Linux

MYAI168 API & MCP

  • MYAI168 MCP CLI
  • MYAI168 MCP Web & App