Skip to content
Connect a clientHermes Agent

Hermes Agent

Set up the Hermes terminal agent for Guard API models.

Set up with your own AI
Model protocol

Claude, Kimi, Composer and Grok

Hermes Agent is the terminal agent from Nous Research. Its documentation puts a single requirement on a third-party address: the server must serve POST /v1/chat/completions. Guard serves that address for every family; for Claude, Kimi, Composer and Grok the setup below is the same, and only the exact model id changes.

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

On Windows the same installer runs from PowerShell: iex (irm https://hermes-agent.nousresearch.com/install.ps1).

Settings live in ~/.hermes/config.yaml, keys in ~/.hermes/.env. The quick path: run hermes model, pick Custom endpoint, then answer the address, key and model name. The same thing by hand:

yaml
# ~/.hermes/config.yaml
model:
  provider: custom
  base_url: https://api.guardrelay.ai/v1
  api_key: gd-your-key-from-bot
  default: claude-sonnet-5
yaml
# ~/.hermes/config.yaml
model:
  provider: custom
  base_url: https://api.guardrelay.ai/v1
  api_key: gd-your-key-from-bot
  default: k3
yaml
# ~/.hermes/config.yaml
model:
  provider: custom
  base_url: https://api.guardrelay.ai/v1
  api_key: gd-your-key-from-bot
  default: cursor-grok-4.7-high
  context_length: 256000

model_overrides:
  custom:
    cursor-grok-4.7-low:
      supports_reasoning: false
    cursor-grok-4.7-low-fast:
      supports_reasoning: false
    cursor-grok-4.7-medium:
      supports_reasoning: false
    cursor-grok-4.7-medium-fast:
      supports_reasoning: false
yaml
# ~/.hermes/config.yaml
model:
  provider: custom
  base_url: https://api.guardrelay.ai/v1
  api_key: gd-your-key-from-bot
  default: composer-2.5

The address is written with /v1 at the end. Hermes does not append the version itself: in its own examples for OpenAI-compatible addresses /v1 sits inside the base_url value.

Several addresses are kept under the providers: section of the same file. An entry takes api (the base address), key_env or api_key, transport, default_model and context_length. For Guard use transport: chat_completions.

yaml
# ~/.hermes/config.yaml
providers:
  guard:
    api: https://api.guardrelay.ai/v1
    key_env: GUARD_API_KEY
    transport: chat_completions

After that the model is switched inside the session: /model custom:guard:<exact id>. With no named providers the short form /model custom:<exact id> works.

GLM 5.3 in Hermes Agent

Install Hermes

Use the official Hermes guide. Use the first block on macOS/Linux/WSL2, or the second on Windows PowerShell.

bash
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash
hermes --version
powershell
iex (irm https://hermes-agent.nousresearch.com/install.ps1)
hermes --version

Get a Guard key

Get a universal gd-… key from the direct API link in @guardapi and choose an API package. Do not put the key in a project, repository, task prompt, or screenshot. Balance and usage are available in your Guard account.

Create a separate GLM profile

  1. Create ~/.hermes-guard-glm/config.yaml (Windows: %USERPROFILE%\.hermes-guard-glm\config.yaml) and save the example below there. HERMES_HOME attaches it only to the GLM launch.
  2. Create a neighboring .env containing GUARD_GLM_API_KEY=gd-your-key; do not share this file or change the normal .hermes profile.
  3. Use provider: custom, api_mode: codex_responses, and an endpoint without a trailing /responses.
dotenv
# ~/.hermes-guard-glm/.env
GUARD_GLM_API_KEY=gd-your-key
yaml
_config_version: 45
model:
  provider: custom
  name: glm-5.3
providers:
  custom:
    name: Guard GLM
    base_url: https://api.guardrelay.ai/glm/v1
    key_env: GUARD_GLM_API_KEY
    api_mode: codex_responses
    default_model: glm-5.3
    discover_models: false
    models:
      glm-5.3: {}
      glm-5.3-flash: {}
agent:
  reasoning_effort: none

Check and continue

macOS / Linux:

sh
export HERMES_HOME="$HOME/.hermes-guard-glm"
hermes config check
hermes --provider custom --model glm-5.3 --reasoning none
# After exit, continue the last session:
hermes --continue

Windows PowerShell:

powershell
$env:HERMES_HOME = Join-Path $env:USERPROFILE ".hermes-guard-glm"
hermes config check
hermes --provider custom --model glm-5.3 --reasoning none
# Continue the last session after exit:
hermes --continue
  1. After config check, start Hermes in a separate test folder.
  2. Send Reply with exactly GLM_OK and remember the word PINE.
  3. Ask for the remembered word in the same window; after exit, return with hermes --continue.

Models and confirmed capabilities

Model IDWhen to use it
glm-5.3Default model; text and coding tasks.
glm-5.3-flashFast model; at API level it accepts PNG and PDF through all three protocols, and MP4 through Chat Completions only.
  • Responses, the terminal toolset, and continuing the last Hermes session are confirmed.
  • The client itself executes file, edit, and terminal tools. This profile does not connect Z.AI tools or MCP automatically.
  • This version was checked with text tasks; its attachment button was not checked. Flash capability at API level does not prove that this particular UI can send a file.
  • The profile uses Custom OpenAI Responses (codex_responses). The GLM server prompt is off by default for ordinary API access; client setup does not enable it.
  • Native TXT, DOCX, and XLSX are outside the confirmed GLM contract. Use PDF for documents, or PNG with glm-5.3-flash for images.

If the connection fails

SymptomWhat to check
401 invalid_api_keyThe client received the complete active gd-… key; the variable is set in the same process that starts the client.
404 model_not_foundThe model ID is exactly glm-5.3 or glm-5.3-flash; old GLM IDs, aliases, Turbo, and FlashX are unsupported.
404 or incorrect pathBase URL is https://api.guardrelay.ai/glm/v1. The client appends /responses; do not add it twice.
400 invalid_requestThe documented API format is selected; reasoning, temperature, MCP, or other unconfirmed fields were not copied from an older profile.
402 insufficient_balanceCheck available balance and unfinished reservations in your Guard account.
/model does not list GLMCheck model.provider: custom, providers.custom.models, discover_models: false, and restart Hermes.
Hermes asks for another authentication methodDo not select built-in openai-codex; use the custom provider and key_env.

Gemini in Hermes Agent

Install Hermes

Use the official Hermes guide. Use the first block on macOS/Linux/WSL2, or the second on Windows PowerShell.

bash
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash
hermes --version
powershell
iex (irm https://hermes-agent.nousresearch.com/install.ps1)
hermes --version

Get a Guard key

Get a universal gd-… key from the direct API link in @guardapi and choose an API package. Do not put the key in a project, repository, task prompt, or screenshot. Balance and usage are available in your Guard account.

Create a separate Gemini profile

  1. Create ~/.hermes-guard-gemini/config.yaml (Windows: %USERPROFILE%\.hermes-guard-gemini\config.yaml) and save the example below there. HERMES_HOME attaches it only to the Gemini launch.
  2. Create a neighboring .env containing GUARD_GEMINI_API_KEY=gd-your-key; do not share this file or change the normal .hermes profile.
  3. Use provider: custom, api_mode: codex_responses, and an endpoint without a trailing /responses.
dotenv
# ~/.hermes-guard-gemini/.env
GUARD_GEMINI_API_KEY=gd-your-key
yaml
_config_version: 45
model:
  provider: custom
  name: gemini-4-argon
providers:
  custom:
    name: Guard Gemini
    base_url: https://api.guardrelay.ai/v1
    key_env: GUARD_GEMINI_API_KEY
    api_mode: codex_responses
    default_model: gemini-4-argon
    discover_models: false
    models:
      gemini-4-argon: {}
      gemini-3.8-flash: {}

Check and continue

macOS / Linux:

sh
export HERMES_HOME="$HOME/.hermes-guard-gemini"
hermes config check
hermes --provider custom --model gemini-4-argon
# After exit, continue the last session:
hermes --continue

Windows PowerShell:

powershell
$env:HERMES_HOME = Join-Path $env:USERPROFILE ".hermes-guard-gemini"
hermes config check
hermes --provider custom --model gemini-4-argon
# Continue the last session after exit:
hermes --continue
  1. After config check, start Hermes in a separate test folder.
  2. Send Reply with exactly GUARD_GEMINI_OK and remember the word PINE.
  3. Ask for the remembered word in the same window; after exit, return with hermes --continue.

Gemini models and capabilities

Model IDInput and window
gemini-4-argonText, images, PDF; 1,048,576-token window, shared by input and answer.
gemini-3.8-flashText, images, PDF; 1,048,576-token window for input.
  • Hermes itself executes the terminal toolset; hermes --continue continues the last session.
  • The Guard catalog takes text, images, and PDF as input and returns text. How to send a file or an image depends on the client's interface; this guide does not describe attachments.
  • The profile uses Custom OpenAI Responses (codex_responses). The server prompt is a separate setting of the Gemini family: it applies only when the key has the entitlement and the option is on; client setup does not enable it.

If the connection fails

SymptomWhat to check
401 invalid_api_keyThe client received the complete active gd-… key; the variable is set in the same process that starts the client.
404 model_not_foundThe model ID is an exact ID from the table above or the short name gemini; other spellings are unsupported.
404 or incorrect pathBase URL is https://api.guardrelay.ai/v1. The client appends /responses; do not add it twice.
400 invalid_requestThe documented API format is selected; extra settings from an older profile were not copied: reasoning, temperature, MCP, and others.
402 insufficient_creditCheck available balance and unfinished reservations in your Guard account.
/model does not list GeminiCheck model.provider: custom, providers.custom.models, discover_models: false, and restart Hermes.
Hermes asks for another authentication methodDo not select built-in openai-codex; use the custom provider and key_env.

Muse in Hermes Agent

Install Hermes

Use the official Hermes guide. Use the first block on macOS/Linux/WSL2, or the second on Windows PowerShell.

bash
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash
hermes --version
powershell
iex (irm https://hermes-agent.nousresearch.com/install.ps1)
hermes --version

Get a Guard key

Get a universal gd-… key from the direct API link in @guardapi and choose an API package. Do not put the key in a project, repository, task prompt, or screenshot. Balance and usage are available in your Guard account.

Create a separate Muse profile

  1. Create ~/.hermes-guard-muse/config.yaml (Windows: %USERPROFILE%\.hermes-guard-muse\config.yaml) and save the example below there. HERMES_HOME attaches it only to the Muse launch.
  2. Create a neighboring .env containing GUARD_MUSE_API_KEY=gd-your-key; do not share this file or change the normal .hermes profile.
  3. Use provider: custom, api_mode: codex_responses, and an endpoint without a trailing /responses.
dotenv
# ~/.hermes-guard-muse/.env
GUARD_MUSE_API_KEY=gd-your-key
yaml
_config_version: 45
model:
  provider: custom
  name: muse-wonder-1.0
providers:
  custom:
    name: Guard Muse
    base_url: https://api.guardrelay.ai/v1
    key_env: GUARD_MUSE_API_KEY
    api_mode: codex_responses
    default_model: muse-wonder-1.0
    discover_models: false
    models:
      muse-wonder-1.0: {}
      muse-spark-1.3: {}
      muse-spark-1.2: {}

Check and continue

macOS / Linux:

sh
export HERMES_HOME="$HOME/.hermes-guard-muse"
hermes config check
hermes --provider custom --model muse-wonder-1.0
# After exit, continue the last session:
hermes --continue

Windows PowerShell:

powershell
$env:HERMES_HOME = Join-Path $env:USERPROFILE ".hermes-guard-muse"
hermes config check
hermes --provider custom --model muse-wonder-1.0
# Continue the last session after exit:
hermes --continue
  1. After config check, start Hermes in a separate test folder.
  2. Send Reply with exactly GUARD_MUSE_OK and remember the word PINE.
  3. Ask for the remembered word in the same window; after exit, return with hermes --continue.

Muse models and capabilities

Model IDInput and window
muse-wonder-1.0Text, images, PDF; 1,048,576-token window.
muse-spark-1.3Text, images, PDF; 1,048,576-token window.
muse-spark-1.2Text, images, PDF; 1,048,576-token window.
  • Hermes itself executes the terminal toolset; hermes --continue continues the last session.
  • The Guard catalog takes text, images, and PDF as input and returns text. How to send a file or an image depends on the client's interface; this guide does not describe attachments.
  • The profile uses Custom OpenAI Responses (codex_responses). The server prompt is a separate setting of the Muse family: it applies only when the key has the entitlement and the option is on; client setup does not enable it.

If the connection fails

SymptomWhat to check
401 invalid_api_keyThe client received the complete active gd-… key; the variable is set in the same process that starts the client.
404 model_not_foundThe model ID is an exact ID from the table above or the short name muse; other spellings are unsupported.
404 or incorrect pathBase URL is https://api.guardrelay.ai/v1. The client appends /responses; do not add it twice.
400 invalid_requestThe documented API format is selected; extra settings from an older profile were not copied: reasoning, temperature, MCP, and others.
402 insufficient_creditCheck available balance and unfinished reservations in your Guard account.
/model does not list MuseCheck model.provider: custom, providers.custom.models, discover_models: false, and restart Hermes.
Hermes asks for another authentication methodDo not select built-in openai-codex; use the custom provider and key_env.

Install Hermes Agent

Install the CLI using the official Hermes instructions. Use the first command on macOS, Linux, or WSL2; use the second in Windows PowerShell. Open a new terminal and check hermes --version.

bash
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash
hermes --version
powershell
iex (irm https://hermes-agent.nousresearch.com/install.ps1)
hermes --version

Get a Guard key

Open @guardapi → Categories → API, choose a package, and save the gd-… key. The same key works with Codex models; see all seven exact IDs in Models.

Create a separate provider

  1. Open ~/.hermes/.env and ~/.hermes/config.yaml in a text editor. If either file does not exist, the installer creates the ~/.hermes folder; create the missing file. On native Windows, the data folder is %LOCALAPPDATA%\hermes.
  2. Add GUARD_API_KEY=gd-your-key to .env. If that line already exists, update it instead of creating a duplicate. Keep the key file accessible only to your user account.
  3. In config.yaml, update the single model: mapping with provider: custom, the exact default, address, key_env, api_mode, and context_length shown below. Keep the file’s other sections.
  4. Set api_mode: codex_responses; base_url must end in /codex/v1, without /responses. Restart Hermes after saving.
dotenv
# ~/.hermes/.env
GUARD_API_KEY=gd-your-key
yaml
# ~/.hermes/config.yaml
_config_version: 45
model:
  default: gpt-6-astra
  provider: custom
  base_url: https://api.guardrelay.ai/codex/v1
  key_env: GUARD_API_KEY
  api_mode: codex_responses
  context_length: 872000
agent:
  reasoning_effort: medium

model.context_length is the client budget for the selected model; update it from the table below when changing models. It controls Hermes history compaction, not a hard server cap.

The latest saved Guard native catalog declares these maximum-window values for client-side budgeting. They are not verified hard input caps; the client may compact history sooner. In the Guard connection, all seven models accept and preserve max_output_tokens (Responses), max_completion_tokens (Chat), and max_tokens (Messages) as advisory, without guaranteeing a hard managed Codex output limit; billing follows actual tokens and the key's money rules.

Model IDContext value for client setup
gpt-6-astra872000
gpt-6.1-sol872000
gpt-6-sol872000
gpt-6-luna872000
gpt-5.6-sol872000
gpt-5.6-terra872000
gpt-5.6-luna872000

Select a model and send a request

  1. Run hermes in your project folder.
  2. Run hermes --provider custom --model gpt-6-astra --reasoning medium. For another model, check its effort and context under Models first.
  3. Send Reply with exactly OK as a normal chat message and wait for the answer.
  4. Your next message in the same chat continues it. After exiting, return to the latest CLI conversation with hermes --continue.
bash
hermes --provider custom --model gpt-6-astra --reasoning medium
# Continue the same session:
hermes --continue

If connection fails

SymptomCheck
/model cannot find the modelThe single model: mapping has provider: custom, the exact default, and api_mode: codex_responses; restart Hermes after editing.
401.env contains exactly one active GUARD_API_KEY; the provider entry has no old api_key field that takes precedence.
404 or protocol errorbase_url is https://api.guardrelay.ai/codex/v1, api_mode is codex_responses, and /responses was not appended manually.
402Check the key balance and limits in your Guard account.

Sections

On this page