Hermes Agent

Hermes Agent is a terminal-based AI agent. With a custom provider, Hermes can use ModelGo's OpenAI-compatible API to call models.

Before you start

  • Install Node.js 22 or newer.
  • Create an API key in the ModelGo Console.
  • Confirm the ModelGo logical model name you want to use in the Model Gallery.

1. Install Hermes Agent

macOS or Linux:

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

Windows PowerShell:

powershell
iex (irm https://hermes-agent.nousresearch.com/install.ps1)

Reopen your terminal and verify the installation:

bash
hermes --version

2. Configure ModelGo

Put your API key in an environment variable for the current shell. Never commit a real key to a repository or public script:

bash
export MODELGO_API_KEY="your-ModelGo-API-key"
export MODELGO_MODEL="your-ModelGo-logical-model-name"

If you are not sure which model name to use, query the models available to the current API key:

bash
curl https://api.modelgo.ai/v1/models \
  -H "Authorization: Bearer $MODELGO_API_KEY"

Use hermes config set to create a custom provider. Replace <model> with a logical model name from the Model Gallery or the GET /v1/models response:

bash
hermes config set model.provider custom
hermes config set model.base_url https://api.modelgo.ai/v1
hermes config set model.api_mode chat_completions
hermes config set model.api_key "$MODELGO_API_KEY"
hermes config set model.default "$MODELGO_MODEL"

If your Hermes version includes the interactive setup wizard, you can run:

bash
hermes model

Choose Custom endpoint, enter the ModelGo Base URL, API key, and model name, and select Chat Completions as the protocol.

3. Check the configuration and start a session

Check the Hermes configuration:

bash
hermes config check

Start Hermes after the check passes:

bash
hermes

Send a message such as “Introduce ModelGo in three sentences.” A model response confirms the connection.

ModelGo values

SettingValue in ModelGo
Providercustom
Base URLhttps://api.modelgo.ai/v1
API modechat_completions
API keyA ModelGo API key created in the Console
Model IDA ModelGo logical model name, not the upstream provider's raw model ID

Hermes stores non-sensitive settings in ~/.hermes/config.yaml and API keys and other secrets in ~/.hermes/.env. Do not share or commit files under ~/.hermes/ that contain credentials.

Troubleshooting

401 or authentication failed

Make sure the API key is valid and has not been revoked or expired, then run:

bash
hermes config set model.api_key "$MODELGO_API_KEY"

403 or model unavailable

Check that model.default is a ModelGo logical model allowed by the policy attached to your API key.

404 or endpoint not found

Use https://api.modelgo.ai/v1 as the Base URL. Do not append /chat/completions; Hermes adds the request path itself.

Related docs