Coding agents

Hermes Agent

Connect Nous Research Hermes Agent to RealRelay.ai as a custom endpoint: install it, add RealRelay.ai with hermes model or config.yaml, set the context window, check the connection and switch models.

Protocol
OpenAI Chat Completions
Base URL
https://www.realrelay.ai/v1
Official docs
github.com
Checked against the tool’s docs
2026-10

Overview

Hermes Agent is an open-source agent from Nous Research that runs on your own machine. You use it from the terminal, its desktop app or chat apps, and it keeps memory and skills between sessions. RealRelay.ai is not one of its built-in providers, so you add it as a custom endpoint that uses the OpenAI Chat Completions API (/v1/chat/completions).

  • An API key from the API keys page of the console.

  • The base URL with /v1 at the end. Hermes adds /chat/completions to it.

  • A model ID exactly as GET /v1/models lists it, for example z-ai/glm-5.2. Pick one that supports tool calling.

Hermes needs a context window of at least 64,000 tokens and refuses to start below that. It normally reads the window from the endpoint's model list, but RealRelay.ai's list does not include it, so set the window yourself for each model, as shown under Configure.

Install

Use the Nous Research installer for the command-line version. It sets up its own Python and tools, and Windows is supported natively as well as through WSL2. A desktop app for Apple Silicon Macs and Windows is also available from the Hermes website.

macOS · Linux · WSL2
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bashsource ~/.zshrc   # or: source ~/.bashrc
Windows PowerShell
iex (irm https://hermes-agent.nousresearch.com/install.ps1)

The installer puts Hermes in %LOCALAPPDATA%\hermes and adds it to your user PATH. Open a new PowerShell window before running hermes.

The installer may start a setup wizard when it finishes. You can skip the provider step there and follow Configure below.

Configure

Hermes keeps its settings in config.yaml and secrets in .env, both in ~/.hermes/, or %LOCALAPPDATA%\hermes\ on native Windows. Use the wizard or edit the file; both end up in config.yaml.

  1. 1

    Start the wizard

    Run it from a terminal, not inside a chat session, and choose Custom endpoint.

  2. 2

    Answer the prompts

    Enter these values when asked. The wording of the prompts can differ between versions. Use the model's real context window from its catalog page; the value shown is a safe lower bound.

    Terminal
    hermes model
    hermes model → Custom endpoint
    1API base URL:    https://www.realrelay.ai/v12API key:         sk-***3Model name:      z-ai/glm-5.24API mode:        chat_completions5Context length:  200000
  1. 1

    Save the key

    This writes the key to Hermes's .env file, not to config.yaml.

    Terminal
    hermes config set REALRELAY_API_KEY sk-***
  2. 2

    Add RealRelay.ai as a provider

    Open the file with hermes config edit and merge in these blocks. Replace any model: block that is already there.

    ~/.hermes/config.yaml
    1providers:2  realrelay:3    name: RealRelay.ai4    api: https://www.realrelay.ai/v15    key_env: REALRELAY_API_KEY6    transport: chat_completions7    models:8      "z-ai/glm-5.2":9        context_length: 2000001011model:12  default: "z-ai/glm-5.2"13  provider: custom:realrelay
  • api is the base URL. key_env names the variable that holds the key; Hermes finds it in your shell or in its .env file.

  • transport: chat_completions is the default for custom endpoints. Writing it down stops Hermes from guessing from the URL.

  • models.<id>.context_length is the total window for that model, input and output together. Hermes uses it to decide when to compress the conversation.

  • provider: custom:realrelay points the default model at the realrelay entry. The model ID is quoted because it contains a slash and dots.

  • OPENAI_BASE_URL in .env does not affect a custom endpoint. Hermes only reads the URL from config.yaml.

Verify

  1. 1

    Call the endpoint directly

    Run this with your key. A JSON reply with a choices array means the address, key and model work.

    Terminal
    1curl -sS "https://www.realrelay.ai/v1/chat/completions" \2  -H "Authorization: Bearer sk-***" \3  -H "content-type: application/json" \4  -d '{"model": "z-ai/glm-5.2", "max_tokens": 16, "messages": [{"role": "user", "content": "Reply with OK"}]}'
  2. 2

    Check Hermes's settings and send one message

    hermes doctor reports config problems. hermes config get model should show the model ID and the custom:realrelay provider. The last command sends one message and exits.

    Terminal
    hermes doctorhermes config get modelhermes chat -q "Reply with OK"
  3. 3

    Start a session

    Run hermes. The welcome banner shows the model and its context window. A reply to your first message confirms the whole path, and the request appears in the console's usage logs.

Models

Inside a session, switch to another RealRelay.ai model with /model, the provider name and the model ID. Hermes saves the choice, so it is still selected after a restart.

Hermes session
/model custom:realrelay:z-ai/glm-5.2

Give every model you switch to its own entry under models with its context window, so Hermes does not fall back to a guess:

~/.hermes/config.yaml → providers.realrelay.models
1"z-ai/glm-5.2":2  context_length: 2000003"<another-model-id>":4  context_length: 200000

/model only switches between providers you have already set up. To add a provider, leave the session and run hermes model. Side tasks such as summaries and image reading use your main model unless you configure them separately. Models that work well for coding agents are listed under Choosing a model.

Troubleshooting

  • Hermes refuses to start because the context is too small. The model's window is under 64,000 tokens, or Hermes could not find it and guessed. Set context_length for the model, or choose a model with a larger window.

  • 401. Hermes cannot find the key. Check that the name in key_env matches the variable you saved with hermes config set, and that the key has no spaces.

  • 404. The base URL is missing /v1. Add it.

  • Model not found. The model ID does not match GET /v1/models exactly. Keep the prefix before the slash.

  • RealRelay.ai does not appear in /model. It has not been set up yet. Exit the session and run hermes model, or check the providers block in config.yaml.

  • The context window is wrong after switching models. A top-level model.context_length is dropped when you switch. Put the window under providers.realrelay.models instead, one entry per model.

  • Settings in .env seem ignored. Hermes reads the model and URL only from config.yaml. .env is for keys.