Hermes Agent Setup Guide
Hermes Agent is a terminal-based AI agent. With a custom provider, it calls models through ModelGo's OpenAI-compatible API. You need an API key from the ModelGo Console and a logical model name from the Model Catalog.
1. Install
bash
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash
hermes --versionIn Windows PowerShell, run iex (irm https://hermes-agent.nousresearch.com/install.ps1).
2. Configure ModelGo
bash
export MODELGO_API_KEY="mgk_your_api_key"
export MODELGO_MODEL="your-model-id"
hermes config set MODELGO_API_KEY "$MODELGO_API_KEY"
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.key_env MODELGO_API_KEY
hermes config set model.default "$MODELGO_MODEL"hermes config set writes UPPER_SNAKE names such as MODELGO_API_KEY to ~/.hermes/.env and dotted settings to ~/.hermes/config.yaml. model.key_env stores only the variable name, so the API key itself never appears in config.yaml. Do not share or commit files under ~/.hermes/ that contain credentials.
3. Verify
bash
curl https://api.modelgo.ai/v1/models \
-H "Authorization: Bearer $MODELGO_API_KEY"
hermes config check
hermesSend a message; a model response confirms the connection.
Troubleshooting
- 401: make sure the key has not been revoked or expired, write it again with
hermes config set MODELGO_API_KEY "$MODELGO_API_KEY", and confirmmodel.key_envisMODELGO_API_KEY. - 403: check that
model.defaultis a logical model allowed by the policy attached to your API key. - 404: set
model.base_urltohttps://api.modelgo.ai/v1; do not append/chat/completions.