Hermes Agent is a self-hosted, autonomous AI agent with built-in tools for terminal access, file operations, web search, memory, and skills. Open WebUI is a popular self-hosted chat interface. On its own, Hermes Agent runs from the command line — but it also exposes an OpenAI-compatible API server, which means Open WebUI can be used as a polished, browser-based front end for it.
There are two separate connections involved, and it's easy to confuse them:
- Hermes Agent → LLM provider ("AI Credits"). This is where Hermes gets its actual reasoning power. You point Hermes at a model provider — a direct provider like OpenAI, Anthropic, or Google, a credit/routing service like OpenRouter or Hugging Face Inference, or a local model via Ollama/vLLM. "AI Credits" generally refers to the prepaid or metered balance you draw down with these providers as Hermes makes calls.
- Open WebUI → Hermes Agent. This is the front-end connection. Open WebUI talks to Hermes's built-in API server exactly the way it would talk to OpenAI's API — it doesn't need any Hermes-specific plugin.
This article assumes you already have Open WebUI + Hermes Agent running on a Bluehost Self-Managed VPS or Virtual Dedicated Server (VDS).
If you haven't installed Open WebUI + Hermes Agent yet, see:
- Purchase a Self-Managed VPS with Open WebUI + Hermes Agent Installation
- Purchase a Virtual Dedicated Server with Open WebUI + Hermes Agent Installation
- Reimage Your Server for Open WebUI + Hermes Agent Installation
Important: You will need an AI Credits API key and a Gateway endpoint. If you haven't created a key yet, see How to Manage Your Bluehost API Keys. For an overview of how the system works, see Understanding AI Credits. If you don't have a credit balance yet, see How to Purchase Bluehost AI Credits.
Prerequisites
- Hermes Agent installed and working from the command line. If it isn't installed yet, complete the official Hermes Agent quickstart before continuing.
- Open WebUI installed (Docker is the most common setup) or access to install it.
- An account and API key/credits with at least one LLM provider (see options below).
- If you're running Hermes on Windows, note that it generally expects a Unix-like environment; WSL2 may be required depending on your setup.
Step 1: Connect AI Credits to Hermes Agent
Hermes needs a configured model provider before it can do any actual reasoning. Run:
hermes model
This launches an interactive picker where you can choose how Hermes gets its "AI Credits":
- Direct provider keys — OpenAI, Anthropic, Google Gemini/Vertex AI, DeepSeek, xAI Grok, GitHub Copilot, and others. Good if your organization already has a billing relationship with a specific provider and wants a straightforward bill.
- Credit/routing services — OpenRouter (many models, explicit credit balance, easy fallback switching) or Hugging Face Inference (token-based, with a small free monthly credit before you need to add billing). Good if you want flexibility across many models under one balance.
- Nous Portal — a single subscription covering hundreds of models behind one OAuth login, useful if you'd rather not manage per-provider billing at all.
- Local models — Ollama, vLLM, LocalAI, or any other OpenAI-compatible endpoint running on your own hardware. No API credits are consumed at all; you trade cost for needing your own compute.
- Custom OpenAI-compatible endpoint — choose "Custom endpoint (self-hosted / vLLM / etc.)" and supply the base URL, API key, and model name directly.
Whichever option you pick, the corresponding key or token is written to Hermes's environment file (~/.hermes/.env by default, or a profile-specific .env if you're using profiles). You can find the exact paths with:
hermes config path hermes config env-path
Tip: If you want resilience against rate limits or an exhausted credit balance, Hermes supports fallback chains: configure a primary provider plus one or more fallback providers in your model settings, so Hermes automatically switches over rather than failing outright when the primary is unavailable or out of credits.
Once configured, verify the connection works before moving on:
hermes chat -q "Reply with exactly: provider ok"
If that returns the expected reply, your AI Credits/LLM provider is correctly wired into Hermes.
Step 2: Turn on Hermes's API Server
With a working provider in place, enable the built-in OpenAI-compatible API server so Open WebUI has something to talk to.
-
Open your Hermes environment file (
~/.hermes/.envfor the default profile) and set:API_SERVER_ENABLED=true API_SERVER_KEY=your-secret-key
Replace
your-secret-keywith any strong, random string — this becomes the API key you'll enter into Open WebUI later. Optional variables let you customize the host and port if you don't want the default. -
Start the gateway:
hermes gateway
Keep this process running — Open WebUI can't reach Hermes if the gateway isn't up. For anything beyond a quick test, run it inside
tmux/screenor as a system service.
Tip: If you use multiple Hermes profiles (for example, separate configurations per user or per project), each profile runs its own API server on its own port and automatically advertises the profile name as the model Open WebUI will see. API_SERVER_* values are environment variables set per profile's .env file, not YAML config keys.
Step 3: Connect Open WebUI to Hermes Agent
With the gateway running:
- Open Open WebUI in your browser.
- Go to Admin Settings → Connections → OpenAI.
- Click Add Connection.
-
Fill in:
- Base URL:
https://gateway.ai.bluehost.com/ - API Key: the same value you set for
API_SERVER_KEY.
- Base URL:
- Click the checkmark to verify the connection, then save.
Your agent should now appear in the model dropdown, named after its profile (or hermes-agent for the default profile). Select it and start chatting. Because Open WebUI is talking to a Hermes agent runtime rather than a plain LLM endpoint, you get Hermes's full toolset — terminal, file operations, web search, memory, skills — with brief inline progress indicators (for example, ls -la or searching...) shown as tools run, followed by the agent's final response.
Warning: One important nuance: tool calls run wherever the API server itself is hosted, not on the machine running the browser. If Open WebUI on your laptop points at a Hermes API server on a remote box, file operations, terminal commands, and local tools execute on that remote machine.
Step 4 (Optional): Permanent Deployment with Docker Compose
For a setup that comes back up pre-configured after a restart, run Open WebUI via Docker Compose pointed at your Bluehost AI gateway:
- Replace
your-secret-keywith your actual API Key. - OPENAI_API_BASE_URL:
https://gateway.ai.bluehost.com/
services:
open-webui:
image: ghcr.io/open-webui/open-webui:main
ports:
- "3000:8080"
volumes:
- open-webui:/app/backend/data
environment:
- OPENAI_API_BASE_URL= https://gateway.ai.bluehost.com/
- OPENAI_API_KEY=your-secret-key
extra_hosts:
- "host.docker.internal:host-gateway"
restart: always
volumes:
open-webui:
Keep in mind that Open WebUI only reads these environment variables on its very first launch; after that, connection settings live in its internal database. To change the base URL or key later, update it from Admin Settings → Connections in the UI, or delete the Docker volume to start fresh.
Troubleshooting
If something isn't working as expected, work through these common issues:
Model doesn't appear in the dropdown?
Confirm hermes gateway is still running and that the base URL/port in Open WebUI matches your API_SERVER settings.
Authentication errors
Double-check that the API_SERVER_KEY in Hermes exactly matches the API key saved in Open WebUI's connection settings. Since Open WebUI persists this in its own database, editing the environment file alone won't fix a previously-saved wrong key — update or delete the saved connection in the Admin UI.
Provider errors or unexpected spend
Run hermes doctor and /usage to check which profile and provider are actually active. It's possible for a gateway to be pointed at a different (and more expensive) model than you intended if the wrong profile is running.
Running low on AI Credits
Check your provider dashboard directly (OpenRouter, Hugging Face, etc.); Hermes can't make an exhausted balance disappear, but a configured fallback chain will let it continue working on a secondary provider.
Summary
Connecting AI Credits or an LLM to Open WebUI + Hermes Agent is really two connections: first give Hermes a working model provider with hermes model (direct provider keys, OpenRouter/Hugging Face credits, Nous Portal, or a local model), then expose Hermes's API server and point Open WebUI's OpenAI connection settings at it. Once both are in place, Open WebUI functions as a full-featured chat front end for your Hermes agent, complete with tool use, memory, and streaming responses.