Hermes API Server for OpenAI-Compatible Clients

The Hermes API server presents the agent through OpenAI-compatible HTTP endpoints. Approved clients such as Open WebUI, LobeChat, LibreChat, and custom applications can use Hermes as a backend while the agent retains its configured tools, memory, and skills.

Official documentation: https://hermes-agent.nousresearch.com/docs/user-guide/features/api-server

Local-first architecture

The safest starting point is a loopback listener protected by a dedicated API server key. Enable only the origins that must call the server directly from a browser. Remote exposure is a separate design decision requiring strong authentication, network controls, rate limits, and log review.

Chat Completions requests carry their full message history. The Responses-style API can chain turns with a prior response identifier or a named conversation so tool calls and session history remain connected.

Integration checklist

  • Configure a model provider before enabling the server.
  • Generate and store a dedicated API server credential outside source control.
  • Bind to loopback for the first rollout.
  • Allow only known browser origins when CORS is required.
  • Choose whether each client flow is stateless or chained.
  • Keep each profile's port, credential, tools, and memory isolated.
  • Apply request-size and rate controls before remote access.
  • Review tool permissions as part of the API threat model.

Treat clients as capability callers

An authenticated client can submit text that reaches a tool-equipped agent. The API key identifies the client; it does not make prompt content trustworthy. Public or shared frontends should receive the smallest practical toolset and should not inherit owner-level file, shell, messaging, or administrative access.

Pitfalls

  • Binding broadly during a local test.
  • Reusing a provider credential as the API server credential.
  • Allowing every browser origin for convenience.
  • Assuming a stateless endpoint remembers earlier turns.
  • Exposing a powerful owner profile to a shared frontend.
  • Verifying the model list but never testing a real tool call and stream.

Verification steps

  1. Start the gateway and confirm the API listener is on the intended address.
  2. Request the model list with the configured client credential.
  3. Send a harmless non-streaming completion.
  4. Repeat with streaming and confirm progress events render correctly.
  5. Test one low-risk tool call through the client.
  6. Verify an invalid credential and disallowed origin are rejected.
  7. Inspect sessions and logs for the expected profile, conversation, and redaction behavior.