Agent setup guide
Connect Hermes Agent to relay.fast with a custom endpoint
Hermes Agent works with a relay.fast API key and the address https://relay.fast/v1 as a custom endpoint. One key covers GPT, Claude, DeepSeek and other chat models. Each request is billed per token to your relay.fast balance, and no subscription is needed.
What you need
Hermes Agent is an open-source AI agent by Nous Research, according to its documentation as of 27 November 2026. It works in the terminal and also has a desktop application. It keeps its settings in config.yaml and .env, in ~/.hermes/ on macOS and Linux and in %LOCALAPPDATA%\hermes on Windows. The steps on this page follow that documentation.
- Install Hermes Agent as its documentation describes.
- Create an API key in the relay.fast dashboard.
- Pick a model with a context window of at least 64,000 tokens. Hermes Agent refuses to start with a model whose window is smaller.
Copy model ids exactly from the model catalog. The models named on this page have a context window of 1,000,000 tokens.
One-command setup
The script configures Hermes Agent for relay.fast. It stores the key in the Hermes Agent .env file, adds relay.fast providers with every chat model your key can use and selects the model. It asks for the API key inside the script, so the key never appears in the command or shell history. Every downloaded file is checked against a published SHA-256 checksum, and running it again can restore the previous settings.
Windows (PowerShell):
powershell -NoProfile -ExecutionPolicy Bypass -Command "irm https://relay.fast/downloads/setup/install-hermes-en.ps1 | iex"macOS and Linux:
curl -fsSL https://relay.fast/downloads/setup/install-hermes-en.sh | bashYou can read the script before running it by opening the same URL in a browser.
What the script writes
The script finds the active files with hermes config path and hermes config env-path. It puts the key into the active .env file as the variable RELAY_FAST_API_KEY. It adds relay.fast providers to the providers block of config.yaml. Each provider lists the models the key can use and the context windows the script knows.
relayfastserves GPT models with transportcodex_responses.relayfast-anthropicserves Claude models with transportanthropic_messages.relayfast-geminiserves Gemini models with transportchat_completions.relayfast-compatibleserves the other chat models, such as DeepSeek and Kimi, with transportchat_completions.
Here is one provider entry as the script writes it.
providers:
relayfast-anthropic:
name: relay.fast (Claude / Messages)
base_url: https://relay.fast/v1
key_env: RELAY_FAST_API_KEY
transport: anthropic_messages
models:
claude-sonnet-5-5:
context_length: 1000000
supports_vision: true
default_model: claude-sonnet-5-5The script selects the provider and the model with these commands and sets the reasoning level to medium.
hermes config set model.provider custom:relayfast-anthropic
hermes config set model.default claude-sonnet-5-5
hermes config set model.base_url https://relay.fast/v1
hermes config set model.api_mode anthropic_messages
hermes config set agent.reasoning_effort mediumThe same script can remove these settings and restore the previous ones when you run it again.
Hermes Agent custom endpoint in the wizard
The Hermes Agent documentation as of 27 November 2026 describes these wizard steps.
- Run
hermes model. - Choose "Custom endpoint (self-hosted / VLLM / etc.)".
- Enter the API base URL
https://relay.fast/v1, your API key and a model name such asdeepseek-v4.1-flash.
This path sends requests in the Chat Completions format, which works for every chat model in the catalog.
Hermes Agent API key in the files
- Add this line to the
.envfile of Hermes Agent and put your relay.fast key in it.RELAY_FAST_API_KEY=sk-your-api-key - Put this block into
config.yaml. In this block,defaultis the model id.provider: customtells Hermes Agent to use an address you supply.base_urlholds the relay.fast address.key_envnames the variable that holds the key.context_lengthgives the model's context window.model: default: deepseek-v4.1-flash provider: custom base_url: https://relay.fast/v1 key_env: RELAY_FAST_API_KEY context_length: 1000000 - Start Hermes Agent. To switch to a model from another provider entry in
config.yaml, such as one the script added, run a command like this inside a session./model custom:relayfast-anthropic:claude-sonnet-5-5
According to the Hermes Agent documentation as of the same date, the agent reads OPENAI_BASE_URL only for its openai-api provider. For your own address, use hermes model or the model.base_url setting.
Troubleshooting
- Hermes Agent refuses the model at startup with a message about context. Hermes Agent does not know the model's context window, or the window is under 64,000 tokens. Set
context_lengthfor the model. - A 401 error with the text
Invalid tokenmeans the key is wrong, disabled or pasted with spaces. It also appears when the edited.envfile is not the active one. Runhermes config env-pathto see the active file. - A 404 error or a "model not found" message means the address or the model id is wrong. Check that the address ends with
/v1and that the model id matches the catalog. - Run
hermes doctorandhermes statusto see the state of the installation.
Keep agent costs under control
An agent sends the conversation, file contents and tool results with every step, so input tokens make up most of the bill. Use a mid-priced model for routine work and a frontier model for hard tasks, prefer models with a cache-read price for long sessions, and watch the usage in the dashboard until you know what a typical task costs. Current prices are in the live pricing catalog.
Current prices of the models in this guide
Prices checked from the live catalog. "From" is the lowest price among the relay.fast sources that currently serve the model. The price you pay depends on the source your request uses and can change on any day. The pricing page always shows current values.
| Model | Model ID | Official input / output per 1M tokens | relay.fast from, input / output | Cache read from | Context |
|---|---|---|---|---|---|
| DeepSeek V4.1 Flash price depends on the time of day; the peak-hours price is shown | deepseek-v4.1-flash | $0.3 / $1.2 | $0.03 / $0.12 (−90%) | $0.0006 | 1M |
| GLM-5.3 | glm-5.3 | $1.4 / $4.4 | $0.035 / $0.11 (−97%) | $0.0065 | 1M |
| Claude Sonnet 5.5 | claude-sonnet-5-5 | $2 / $10 | $0.238 / $1.19 (−88%) | $0.0238 | 1M |
Frequently asked questions
Does Hermes Agent need a subscription?
No. Hermes Agent takes an API key, and each request is billed per token to the relay.fast balance.
What models work with Hermes Agent?
Any chat model in the relay.fast catalog works if its context window is at least 64,000 tokens. The setup script adds every chat model your key can use.
Can Hermes Agent use Claude and GPT models?
Yes. The setup script uses the Messages format for Claude models and the Responses format for GPT models. The wizard setup sends both through Chat Completions, which also works for them.
Where does Hermes Agent store the API key?
The key stays in the .env file of Hermes Agent on your computer, in the variable RELAY_FAST_API_KEY. The config.yaml file only names that variable.
Is Hermes Agent affiliated with relay.fast?
No. Hermes Agent is a separate product of Nous Research. This page shows how to connect it to relay.fast.