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
/v1at the end. Hermes adds/chat/completionsto it.A model ID exactly as
GET /v1/modelslists it, for examplez-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.
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bashsource ~/.zshrc # or: source ~/.bashrciex (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
Start the wizard
Run it from a terminal, not inside a chat session, and choose Custom endpoint.
- 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 modelhermes 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
Save the key
This writes the key to Hermes's
.envfile, not toconfig.yaml.Terminal hermes config set REALRELAY_API_KEY sk-*** - 2
Add RealRelay.ai as a provider
Open the file with
hermes config editand merge in these blocks. Replace anymodel: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
apiis the base URL.key_envnames the variable that holds the key; Hermes finds it in your shell or in its.envfile.transport: chat_completionsis the default for custom endpoints. Writing it down stops Hermes from guessing from the URL.models.<id>.context_lengthis the total window for that model, input and output together. Hermes uses it to decide when to compress the conversation.provider: custom:realrelaypoints the default model at therealrelayentry. The model ID is quoted because it contains a slash and dots.OPENAI_BASE_URLin.envdoes not affect a custom endpoint. Hermes only reads the URL fromconfig.yaml.
Verify
- 1
Call the endpoint directly
Run this with your key. A JSON reply with a
choicesarray 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
Check Hermes's settings and send one message
hermes doctorreports config problems.hermes config get modelshould show the model ID and thecustom:realrelayprovider. The last command sends one message and exits.Terminal hermes doctorhermes config get modelhermes chat -q "Reply with OK" - 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.
/model custom:realrelay:z-ai/glm-5.2Give every model you switch to its own entry under models with its context window, so Hermes does not fall back to a guess:
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_lengthfor the model, or choose a model with a larger window.401. Hermes cannot find the key. Check that the name in
key_envmatches the variable you saved withhermes 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/modelsexactly. Keep the prefix before the slash.RealRelay.ai does not appear in
/model. It has not been set up yet. Exit the session and runhermes model, or check theprovidersblock inconfig.yaml.The context window is wrong after switching models. A top-level
model.context_lengthis dropped when you switch. Put the window underproviders.realrelay.modelsinstead, one entry per model.Settings in
.envseem ignored. Hermes reads the model and URL only fromconfig.yaml..envis for keys.
