Hermes Agent
Hermes Agent (by Nous Research) is a personal AI agent that runs across a CLI, a TUI, a desktop app, and ~20 messaging platforms (Telegram, Discord, Slack, …). It supports any OpenAI-compatible endpoint through custom providers, so it works with rout.my out of the box.
Quick setup (interactive)
The easiest path is the built-in wizard:
hermes modelPick "Custom endpoint" and enter:
| Field | Value |
|---|---|
| Base URL | https://api.rout.my/v1 |
| API key | your sk_... key from the dashboard |
| Model | any ID from /v1/models, e.g. anthropic/claude-fable-5 |
Hermes saves the endpoint to ~/.hermes/config.yaml and it survives restarts.
Manual config
Alternatively, edit ~/.hermes/config.yaml directly:
model:
default: anthropic/claude-fable-5
provider: custom:rout.my
base_url: https://api.rout.my/v1
custom_providers:
- name: rout.my
base_url: https://api.rout.my/v1
api_key: sk_YOUR_KEY_HERE
model: anthropic/claude-fable-5
prompt_caching: true # see the warning below — do not skip this
models:
anthropic/claude-fable-5:
context_length: 200000
openai/gpt-5.5:
context_length: 128000Start a session:
hermes chatIMPORTANT — enable prompt caching (saves ~75% on input tokens)
By default Hermes only sends Anthropic cache_control breakpoints to providers it knows about (OpenRouter, Nous Portal, native Anthropic). For a custom endpoint it sends none — and without explicit breakpoints from the client, our smart-cache system has to guess where to anchor the cache, which is significantly less efficient for agent workloads with huge tool outputs.
rout.my fully supports Anthropic-style cache_control markers on the OpenAI wire for Claude models, honors them verbatim (client markers always take priority over our automatic system), and bills cache reads at 0.1×.
How to enable it — pick one:
Config flag (if your Hermes build supports it): add
prompt_caching: trueto the rout.my entry undercustom_providers, as in the example above. Verify after starting a session — the usage line should showcached_tokensgrowing turn over turn.Ask the agent to wire it up itself. Hermes can patch its own provider policy. Paste this into a Hermes session:
Enable Anthropic prompt caching for my custom provider
rout.my(base_urlhttps://api.rout.my/v1). Findanthropic_prompt_cache_policyinagent/agent_runtime_helpers.pyand make it return(True, False)(envelope cache_control layout, same as the OpenRouter path) when the active provider is this custom endpoint and the model name contains "claude". The endpoint accepts Anthropic-stylecache_controlbreakpoints on the OpenAI-compatible wire and serves real cache hits. After the change, verify that responses report non-zerocached_tokensin usage on the second turn of a conversation.
Either way, you can confirm it works in the dashboard: open your request log and check the cache_read column — after the first couple of turns it should track your context size, not stay flat.
Which models to use
Everything from /v1/models works. Recommended for agent workloads:
| Role | Model | Why |
|---|---|---|
| Primary | anthropic/claude-fable-5 | strongest tool-calling, 200K context, prompt caching |
| Budget | z-ai/glm-5.2 | cheap, fast, good tool use |
| Long context | google/gemini-3.1-pro-preview | 1M context |
Test the key
curl https://api.rout.my/v1/chat/completions \
-H "Authorization: Bearer sk_YOUR_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{
"model": "anthropic/claude-fable-5",
"messages": [{ "role": "user", "content": "Hello!" }]
}'Notes
- Hermes keeps the conversation prefix byte-stable specifically so prompt caching works — pair that with
prompt_caching: trueand long agent sessions get dramatically cheaper. - Set
context_lengthper model in themodels:map (as in the example) so Hermes' context compressor uses the right window instead of a conservative default. - Prompt caching applies to
anthropic/*models. For other model families rout.my applies its own smart caching automatically where the upstream supports it (DeepSeek, Qwen, Gemini implicit caching) — no client action needed.