- Confidential API
- Router (Beta)
Use the local Confidential Proxy for sensitive model traffic. Go to the confidential setup.
Confidential API
How the connection works
Before you start
You need:- Hermes Agent installed. See the Hermes Agent repository.
- A Prem API key. See API Keys.
- A 32-byte client KEK encoded as 64 hexadecimal characters.
- The current Prem gateway and enclave endpoints.
- A chat model returned by the Prem model-list endpoint.
0.20.0 using a one-shot response and a local file-reading tool call.
1. Set your secrets
PREM_API_KEY out of config.yaml. Hermes resolves it from the environment variable named by key_env.
2. Start the Confidential Proxy
3. Select an enabled model
id. This example uses qwen36-27b:
4. Configure Hermes
Add this provider to~/.hermes/config.yaml:
transport: chat_completions explicit.
The keyed providers format is Hermes’ current custom-provider schema. See the Hermes custom-provider documentation.
Check the configuration:
5. Run Hermes
Start with a bounded one-shot request:Tool, memory, and gateway boundary
Hermes can connect to messaging channels and run scheduled work. Review sender allowlists, approval rules, toolsets, hooks, and outbound network access before enabling those surfaces.
Agent limits
The encrypted chat endpoint permits one active stream for each API key. Parallel Hermes sessions, delegation, fallback attempts, or messaging workers that share one key can receive429 responses.
Begin with one session and no delegation. Serialize turns or use a separate Prem API key per concurrent worker. Do not configure a non-Prem fallback if every model turn must use Prem’s encrypted path.
Troubleshooting
Hermes calls /v1/responses
Hermes calls /v1/responses
The session is using the wrong provider. Set
model.provider to custom:prem-confidential and keep transport: chat_completions in the named provider.Hermes reports a missing API key
Hermes reports a missing API key
Export
PREM_API_KEY in the process that starts Hermes. Confirm that key_env has the exact same name.The API returns model not found
The API returns model not found
Call
/v1/models. Use a returned ID in default_model, providers.prem-confidential.models, and model.default.A tool can read more than expected
A tool can read more than expected
Limit Hermes toolsets, workspace access, approval settings, hooks, and MCP servers. Model-path confidentiality does not restrict local tool permissions.
The API returns 429
The API returns 429
Wait for the active stream to finish. Reduce delegation and parallel workers or use distinct API keys.
Frequently asked questions
Is Hermes itself running inside the enclave?
No. Hermes runs locally. The Prem confidential boundary starts after the local proxy encrypts a supported model request.Why not use OPENAI_BASE_URL with the built-in OpenAI provider?
That route can use /v1/responses. The named custom provider fixes the protocol to /v1/chat/completions, which the Confidential Proxy supports.
Can Hermes tools use the encrypted connection?
The model can request a tool through the encrypted model channel. Hermes executes the tool outside the enclave. A tool’s own network traffic does not pass through Prem unless you configure that tool separately.Can Hermes use fallback providers?
Yes, but a non-Prem fallback leaves the Prem inference path. Omit those fallbacks when the encrypted route is a requirement.Router
Beta Hermes uses Router through a second named provider.kimi-k3 appears in GET /v1/models for this key. Otherwise, use
an exact returned model ID. See Router models.
Use the prem-router configuration in the Router Hermes configuration:
Run
hermes config check after switching. Do not reuse PREM_API_KEY or the client KEK for Router.
Related
Confidential Proxy
Review proxy modes, routes, keys, and daemon controls.
OpenAI-compatible clients
Understand the protocol used by Hermes.
Agents & Automation
Review concurrency, retries, and unattended operation.
Security Model
Review the protected and unprotected parts of the flow.

