Hermes Agent

Installation Overview (macOS)

Hermes Agent Installation and Custom API 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.

It covers two scenarios:

  • Path A: first-time install (you have never installed OpenClaw).
  • Path B: you already installed OpenClaw and want to migrate the settings over.

Difference between Hermes and OpenClaw: OpenClaw is built on Node / npm; Hermes is built on Python. Its install script automatically installs uv and Python 3.11, requires no sudo, and avoids the npm global-directory permission problems.

Before You Start: Security Notes and Prerequisites

Important Security Notes (please read first)

  • Hermes is an agent with real system permissions: it can read and write files, run terminal commands, control the browser, and even control the macOS desktop in the background. It is not recommended to install it on your main machine that syncs a lot of sensitive data; if possible, use a dedicated machine or a clean account.
  • Token usage can be high during the early stage. Remember to set a usage limit in the MYAI168 console.

Configuration File Locations

  • Config file: ~/.hermes/config.yaml
  • Keys: ~/.hermes/.env
  • Data: ~/.hermes/ (sessions, logs, cron, etc.)
  • Source code: ~/.hermes/hermes-agent

Prerequisite: Prepare your MYAI168 API Key

Have your key ready before installing. MYAI168 offers two endpoints:

OpenAI-compatible endpoint    https://www.myai168.com/en/api/openai/v1
Anthropic native endpoint     https://www.myai168.com/en/api/anthropic

To use Claude Opus 4.8, use the Anthropic native endpoint.

1. Install Hermes (common to both paths)

Run the official one-line install script:

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

This automatically installs uv, Python 3.11, clones the project, and completes setup, without sudo.

After installation, make the hermes command available in the current window:

source ~/.zshrc
2. Configure the Provider (Path A: first-time install)

After installation, the setup wizard starts. Path A applies when you have never installed OpenClaw.

The wizard will not show any OpenClaw migration screen (because it cannot detect ~/.openclaw) and goes straight into setup. Choose as follows:

  • How would you like to set up Hermes? → choose Full setup (configure each provider yourself with your own key). Do not choose Quick Setup (Nous Portal); that is Nous's own subscription service.
  • Select provider: scroll to the very bottom of the list and choose custom (direct API) or Custom endpoint (enter URL manually). Then enter the following in order:
    • Base URL: https://www.myai168.com/en/api/anthropic
    • API Key: your MYAI168 key
    • Model: claude-opus-4-8
    • api_mode: choose anthropic_messages (Anthropic protocol)
  • Messaging platforms (Telegram / Slack / Discord…) → select none, just press Enter.
  • Tools → you can accept the defaults; to be conservative, use SPACE to disable Computer Use (macOS), Browser Automation, and Code Execution, the high-permission tools. Core chat is unaffected.
  • The subsequent Choose a provider prompts (browser, image, TTS, vision, search) → choose Skip for all; set them up later if needed.

After setup, it is still recommended to do the "Manually Verify / Fix the Settings" section before validating.

2. Configure the Provider (Path B: migrate from OpenClaw)

If OpenClaw was installed on the machine and configured with MYAI168, the wizard automatically detects it and asks about migration.

  • OpenClaw Installation Detected: Would you like to see what can be imported? → press Y.
  • Migration Preview (it lists items such as provider-keys, custom_providers[myai168]) → confirm the key and provider are in the "will import" list → press y to continue.
  • How would you like to set up Hermes? → choose Full setup (not Nous Portal).
  • The wizard then shows "imported from OpenClaw" section by section and asks whether to reconfigure: the general rule is to press N for everything (keep), and run the wizard to the end. Select no messaging platforms, and Skip every tool provider.

Note: after the wizard finishes, the model block may be overwritten by defaults (OpenRouter / official Anthropic), and the migrated key may not be kept either. So for the migration path, "you must do the manual verification in the next section after it finishes."

Manually Verify / Fix the Settings (recommended for both paths)

Regardless of the path, the setup wizard may fail to point the model at the correct custom endpoint. The most reliable approach is to inspect and edit the config file directly.

First check that the key is present

cat ~/.hermes/.env

It should contain the following (if not, add the two lines below, replacing with your real key):

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

(If the OpenAI and Anthropic endpoints share one key, fill both lines with the same value.)

Then edit the config file

hermes config edit

Change the model block at the top to the following (use spaces for YAML indentation, not Tab; leave the existing fallback_providers, toolsets, agent and other blocks below 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
  - name: myai168
    base_url: https://www.myai168.com/en/api/openai/v1
    key_env: MYAI168_API_KEY
    api_mode: chat_completions

providers: {}

Notes

  • provider is written as custom:myai168_claude, which corresponds to the entry named myai168_claude below and uses the Anthropic protocol.
  • key_env points to the variable name in .env, not the key itself.
  • The Anthropic endpoint's base_url ends with .../anthropic (without /v1); in anthropic_messages mode Hermes appends /v1/messages itself.
  • context_length is explicitly set to 200000; Hermes requires the agent to have at least 64,000 tokens.

How to save (depends on which editor hermes config edit opens)

  • nano → Ctrl + O then Enter, then Ctrl + X to exit.
  • vim → press Esc first, type :wq then Enter.
  • GUI editor → Cmd + S to save, then close.
3. Verify and Launch

Check the configuration:

hermes doctor

(If it only warns "Run hermes setup to configure missing API keys for full tool access", that refers to the tools you skipped that still have no key. It is unrelated to the model and can be ignored. Do not re-run hermes setup because of it, to avoid overwriting your settings.)

Start chatting — the simplest way is to type hermes to enter the interactive interface:

hermes

Once in the chat screen, just type and press Enter to send. (If you want a single-line test, note that you must use straight quotes: hermes chat "hello".)

What success looks like: the model replies normally, and the status bar at the bottom shows claude-opus-4-8 with a 200K context limit. This means MYAI168 + Claude Opus 4.8 is connected.

4. Quick Troubleshooting
  • hermes command not found → run source ~/.zshrc, or open a new terminal window.
  • hermes chat replies with 404 / not found → an endpoint path issue. Change myai168_claude's base_url from .../anthropic to .../anthropic/v1 and try again.
  • reply with 401 / unauthorized → MYAI168_CLAUDE_API_KEY in .env is missing or wrong; check the key.
  • want to switch models → use /model within a conversation to switch to an already-configured model; to add a provider, leave the session and run hermes model.
  • want to connect a messaging app later → hermes gateway setup.
5. Maintenance

Update to the latest version:

hermes update

Difference between the two model-management commands

  • hermes model: run in the terminal (outside a session), the full provider setup wizard.
  • /model: run within a conversation; can only switch between already-configured providers / models.

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

Other FAQ pages

  • FAQ
  • Account
  • Features
  • Privacy
  • OpenAI ChatGPT API
  • Anthropic Claude API
  • Google Gemini API
  • Google News API
  • OpenRouter API
  • API Pricing
  • OpenCode
  • OpenClaw
  • Claude Code CLI
  • Codex CLI
  • MYAI168 MCP CLI
  • MYAI168 MCP Web & App