Skip to main content
Hermes Agent supports named custom providers that use the OpenAI Chat Completions protocol. Point one of those providers at Prem’s local Confidential Proxy.
Do not configure Prem under Hermes’ openai-api provider. That provider can select the OpenAI Responses API, which the Confidential Proxy does not expose. Use a named custom provider with transport: chat_completions.
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.
Check the installed version:
The configuration below has been exercised with Hermes Agent 0.20.0 using a one-shot response and a local file-reading tool call.

1. Set your secrets

Generate the KEK once if you do not have one:
Keep PREM_API_KEY out of config.yaml. Hermes resolves it from the environment variable named by key_env.

2. Start the Confidential Proxy

Do not use --no-attest. Keep attestation enabled for confidential inference.

3. Select an enabled model

Use a returned id. This example uses qwen36-27b:
Do not continue until this request succeeds.

4. Configure Hermes

Add this provider to ~/.hermes/config.yaml:
Replace the model ID and context length when you choose another enabled model. Keep 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:
Then start an interactive session:
Hermes can stream responses and perform tool calls through this provider. The model request and tool-call response use the encrypted model channel. Hermes runs the selected tool on your machine, then sends any resulting context in a later encrypted model 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 receive 429 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

The session is using the wrong provider. Set model.provider to custom:prem-confidential and keep transport: chat_completions in the named provider.
Export PREM_API_KEY in the process that starts Hermes. Confirm that key_env has the exact same name.
Call /v1/models. Use a returned ID in default_model, providers.prem-confidential.models, and model.default.
Limit Hermes toolsets, workspace access, approval settings, hooks, and MCP servers. Model-path confidentiality does not restrict local tool permissions.
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
Router is not confidential. Use this path only for non-sensitive prompts, memory, workspace context, and tool results.
Hermes uses Router through a second named provider.
Confirm that 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.

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.