Run Hermes Agent on Stav
Point Nous Research's Hermes Agent at Stav with one config file — and keep its traffic on EU compute.
Hermes Agent is an open-source agent from Nous Research. It reads files, runs commands, uses tools and keeps memory. It can talk to any OpenAI-compatible API, so it runs on Stav with configuration only.
Point it at Stav and every agent turn is billed to your Stav credits, shows up in your request log, and follows your workspace policy. Pick an EU-served model and the work runs on EU compute.
Tested with Hermes Agent v0.21.7 (and v0.21.6) on the Chat Completions API.
Before you start
- A Stav API key. See Authentication.
- Hermes Agent installed. See the Hermes quickstart.
Set it up
Put your key in ~/.hermes/.env:
STAV_API_KEY=sk_stav_live_...
Add Stav as a provider in ~/.hermes/config.yaml:
model:
provider: custom:stav
default: zai-org/glm-5-2/scaleway-generative-apis
providers:
stav:
api: https://api.stav.ai/v1
key_env: STAV_API_KEY
transport: chat_completions
models:
zai-org/glm-5-2/scaleway-generative-apis: {context_length: 1048576}
mistral-ai/mistral-large-4: {context_length: 524288}
auto: {context_length: 200000}
Restart Hermes. It reads the config only at start.
- Keep
/v1inapi. Hermes adds/chat/completionsitself and does not add/v1. - Set
context_lengthfor every model you use. Hermes does not know Stav's model ids. Without a value it guesses, and it compacts your conversation at the wrong point. Copy the context window from the model's page in the catalogue.
Check it:
hermes -z "Reply with exactly: STAV OK"
Switch model in a session with /model custom:stav:<model id>, or for one run with --provider custom:stav -m <model id>.
Pick a model
| You send | What happens |
|---|---|
creator/model/provider, e.g. zai-org/glm-5-2/scaleway-generative-apis | One Provider Endpoint, here in Paris. Use this to know where the work runs |
creator/model, e.g. zai-org/glm-5-2 | Stav picks one of the model's Provider Endpoints. Without a region policy that can be outside the EU |
auto | Your default Router picks a model per request |
@your-workspace/router | A named Router you set up in Your workspace → Connect → Routers |
anthropic/…, openai/…, xai/… | Works, and is forwarded to that US provider. Stav adds governance, not EU compute |
To keep everything in the EU, set Compute region to EU only in Your workspace → Govern → Key policies → Reach. That applies to every request from every key, including auto and models you name. See Enforce a sovereignty floor.
Models that do not reason
Hermes sends reasoning_effort: medium to every model it does not know. On a model that cannot reason, Stav leaves the field out and names it in the X-Stav-Dropped-Params response header. The request is answered as usual. You do not need to change anything.
What works
| Feature | Status |
|---|---|
| Chat, streaming | Works |
| Tool calls (file edits, shell, the full agent loop) | Works |
| Session titles and context compression | Work. Each is a separate request on the same model and shows in your request log |
auto and named Routers | Work |
| Claude, GPT and Grok models | Work, forwarded to the US provider |
Reasoning level (/reasoning) | Works on models that reason. Left out, and named, on models that do not |
Traffic that does not go through Stav
Hermes has helpers that call other services directly. If your data must stay in the EU, check these in config.yaml:
- Web search falls back to free third-party search services. Turn that off with
web: {keyless_fallback: false}. - Text to speech defaults to Microsoft's online voice service (
tts.provider: edge). - Update check asks GitHub once a day. Turn it off with
updates: {check: false}.
Troubleshooting
| You see | Do this |
|---|---|
404 on every request | api must end in /v1: https://api.stav.ai/v1 |
HTTP 401: Invalid or revoked API key | Check STAV_API_KEY in ~/.hermes/.env, then restart Hermes |
404 on /api/tags, /props or /version in a debug log | Normal. Hermes probes for a local server first. It ignores the answer |
| A request ran outside the EU | Pin the endpoint (creator/model/provider) or set Compute region in Your workspace → Govern → Key policies → Reach |
More error codes: Errors.
Check it worked
Open Your workspace → Monitor → Request log. Each agent turn is one row, with the model, Inference Provider, country and cost. See Request log and prompt capture.