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:
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bashWindows PowerShell:
iex (irm https://hermes-agent.nousresearch.com/install.ps1)Reopen your terminal and verify the installation:
hermes --version2. 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:
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:
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:
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:
hermes modelChoose 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:
hermes config checkStart Hermes after the check passes:
hermesSend a message such as “Introduce ModelGo in three sentences.” A model response confirms the connection.
ModelGo values
| Setting | Value in ModelGo |
|---|---|
| Provider | custom |
| Base URL | https://api.modelgo.ai/v1 |
| API mode | chat_completions |
| API key | A ModelGo API key created in the Console |
| Model ID | A 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:
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
- First call: create an API key, find a model, and verify a ModelGo request.
- Authentication: learn how to use and protect ModelGo API keys.
- Hermes Agent documentation: see the latest installer, configuration, and CLI reference.