Configure Hermes Agent with AnRouter
Add AnRouter as a custom endpoint through Hermes Desktop or the CLI, then verify it works.
The recommended setup uses hermes model to add a custom endpoint. Current Hermes documentation uses the top-level custom_providers list for named custom endpoints; the manual example below follows that documented schema.
1. Hermes Desktop visual setup
- Open model/provider setup during first launch, or reopen it later from the model settings.
- Choose Local / custom endpoint, set Endpoint to
https://api.anrouter.com/v1, and enter the AnRouter API key. - Use an exact model ID such as
glm-5.3. If API mode appears, choosechat_completions. - Save, start a new session, and send a short test message.
https://api.anrouter.com/v1 in Endpoint. Enter your own AnRouter key on the next line and never publish a screenshot containing it. Open the image at full size for detail.2. Install the CLI
# macOS / Linux / WSL2
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash
hermes --version
hermes doctor
Windows PowerShell: iex (irm https://hermes-agent.nousresearch.com/install.ps1)
3. CLI recommended: interactive setup
hermes model
| Provider | Custom endpoint |
| API Base URL | https://api.anrouter.com/v1 |
| API Key | AnRouter API key |
| Model | glm-5.3 |
| API Mode | chat_completions |
| Context length | Leave blank for endpoint discovery when possible; otherwise use the model catalog |
4. Optional: named provider configuration
# ~/.hermes/config.yaml
custom_providers:
- name: anrouter
base_url: https://api.anrouter.com/v1
key_env: ANROUTER_API_KEY
api_mode: chat_completions
model:
provider: custom:anrouter
default: glm-5.3
# ~/.hermes/.env
ANROUTER_API_KEY=your_anrouter_api_key
5. Verify
- Run
hermes doctorto check the installation and configuration. - Start
hermesand send a short prompt first. - Use
/model custom:anrouter:glm-5.3in a session. Exit and runhermes modelto add or change a provider.
Context requirement: Hermes requires at least 64,000 tokens for agent tool workflows. Leave the wizard field blank when endpoint discovery is available; only add
context_length manually when it matches the current AnRouter model catalog and actual endpoint behavior.References: Hermes Desktop · Hermes custom endpoints