Hermes Agent
Hermes Agent vLLM setup and tool calling
Updated 30 November 2026
Hermes Agent can use a model you serve with vLLM. On the same machine, point Hermes’s custom provider at http://localhost:8000/v1 and select the model ID that vLLM returns. For the agent to start and use tools, check the served context window and give vLLM a parser that matches the model.
This guide uses the Hermes Agent 0.23.5 source and provider documentation, the vLLM 0.34.0 quickstart, serve reference and tool-calling guide, the vLLM API reference, and NVIDIA’s DGX playbook for the test prompts. Sources and ReadyHermes product notes were read on 30 November 2026. NVIDIA lists Hermes Agent 0.18.0 for its installer walkthrough and vLLM 0.31.0 for its DGX Station validation.
What vLLM does for Hermes Agent
vLLM loads the model and serves it over an OpenAI-compatible HTTP API. For a text-generation model with a chat template, Hermes sends requests to /v1/chat/completions. When the model asks to use a tool, vLLM’s parser converts the model’s output into a structured tool_callsresponse. Hermes reads that response, runs the requested tool and sends the result back to the model.
The example runs both programs on the same machine. If you still need the client, follow the Hermes Agent installation guide and check the installed version with hermes --version.
Install vLLM and serve a model
For this example, use Linux and an NVIDIA GPU with CUDA compute capability 7.5 or higher. Install uv, then run the following on the serving machine. The quickstart uses Python 3.12 and leaves the vLLM version unpinned. It gives separate instructions for other platforms.
uv venv --python 3.12 --seed
source .venv/bin/activate
uv pip install vllm --torch-backend=auto
vllm download-kernelsThe tool-calling quickstart uses meta-llama/Llama-3.1-8B-Instruct. On Meta’s model page, accept the Llama 3.1 Community License and agree to share your Hugging Face account information to request access. Once approved, run hf auth login on the serving machine and follow the prompts with the approved account. If the CLI is already signed in to a different account, run hf auth login --force instead. If you sign in with a token, use a User Access Token from the approved account with read access to the model.
Download or check out the vLLM source at tag v0.34.0. Keep the virtual environment active and run the command from the source directory containing examples, where vLLM provides the Llama 3.1 JSON template.
vllm serve meta-llama/Llama-3.1-8B-Instruct \
--host 127.0.0.1 \
--enable-auto-tool-choice \
--tool-call-parser llama3_json \
--chat-template examples/tool_chat_template_llama3.1_json.jinjaThe host flag keeps this example reachable only from the same machine. To enable vLLM’s API key check, use --api-key or VLLM_API_KEY and give Hermes the same key. This check requires a Bearer token on routes including /v1/models and /v1/chat/completions.
If Hermes runs on another machine, keep the vLLM port private. Use an authenticated HTTPS reverse proxy that exposes only the routes you need. Routes such as /invocations need separate protection. See the vLLM security guide.
Match the tool-call parser to the model
--enable-auto-tool-choice lets a supported model decide when to call an available tool. --tool-call-parser selects how vLLM reads the model’s tool output. Use the matching chat template where the model recipe calls for one. The parser name hermes refers to a model output format. Hermes Agent uses the custom provider with every parser in this table.
| Model | Parser and template |
|---|---|
| Llama 3.1 and 3.2, JSON format | llama3_json with examples/tool_chat_template_llama3.1_json.jinja or examples/tool_chat_template_llama3.2_json.jinja for the respective version. |
| Llama 4, recommended Python-style format | llama4_pythonic with examples/tool_chat_template_llama4_pythonic.jinja. |
| Qwen2.5 and QwQ-32B | hermes. Qwen2.5 already includes the format in its tokenizer’s chat template. |
| Nous Hermes checkpoints listed by vLLM | hermes. vLLM reports weaker tool calling for Hermes 2 Theta. Hermes Agent warns that Hermes 3 and 4 lack reliable tool calling for agent workflows. |
| Qwen3-Coder 480B-A35B and 30B-A3B Instruct | qwen3_xml. |
| OpenAI gpt-oss-20b and gpt-oss-120b | openai. |
The Hermes 0.23.5 provider guide pairs hermes with meta-llama/Llama-3.1-70B-Instruct in its launch example, then lists llama3_json for Llama 3. For Llama 3.1, follow vLLM’s model-specific recipe above because it specifies both the JSON parser and its template. Start by testing a single tool call. vLLM lists parallel tool calls as unsupported for Llama 3 in this recipe and warns that the model can format arguments incorrectly, for example by sending a string where the tool expects an array.
Check that vLLM serves at least 64,000 tokens
Hermes Agent 0.23.5 refuses to start with a resolved context below 64,000 tokens for this provider. This is the shared budget for the prompt and the generated reply. Meta lists a 128k context for the example model. The window your vLLM server actually provides depends on its configuration and memory.
If vLLM fails to start because the model’s default context window exceeds available GPU memory, add --max-model-len 64k to the launch command and try again. If this model still needs more memory to serve 64,000 tokens, use a model and hardware combination that can serve that window.
With the example server running and API-key checking disabled, open a second terminal and run the vLLM quickstart check. If you enabled API-key checking, send an Authorization header with Bearer, a space and the configured key.
curl http://localhost:8000/v1/modelsIn the data array, find the served model’s id and check its max_model_len. Save the ID for the setup step. By default vLLM derives the limit from the model config. Lowercase k uses units of 1,000 and uppercase K uses units of 1,024. --max-model-len auto chooses the largest window that fits GPU memory, which can be below the Hermes minimum. Check the model list again after a restart.
Hermes can read max_model_len. If Hermes detects the wrong window, set model.context_length in ~/.hermes/config.yaml to the verified server value. That setting pins Hermes’s estimate. To increase the window itself, change it on the vLLM side. The provider guide gives a generic 128K fallback, while the tagged code’s final estimate for an unknown custom model is 256,000 after detection and catalogue lookup fail. Use the server’s reported value to decide whether the model fits. Hermes 0.23.5 no longer reads model.max_tokens. The server’s output limit is separate from the total context window.
Set the custom endpoint in Hermes
If a Hermes chat is open, exit it first. Run this command from your system terminal.
hermes model- Select Custom endpoint (enter URL manually). That is the 0.23.5 CLI label. The provider guide calls the same option Custom endpoint (self-hosted / VLLM / etc.).
- Enter
http://localhost:8000/v1when both programs run on the same machine. For a remote server, enter the proxy’s HTTPS base URL, including the API prefix. If the endpoint requires an API key, enter it. For the local example with checking disabled, leave the field blank. - Choose Chat Completions and select or type the model ID from
/v1/models. If vLLM uses--served-model-name, use a name the server advertises. - Leave context length blank for auto-detection and accept the display name or enter one of your own.
Start a new Hermes chat after saving the endpoint.
For manual setup, use this model block in ~/.hermes/config.yaml.
model:
provider: custom
base_url: http://localhost:8000/v1
default: meta-llama/Llama-3.1-8B-Instruct
api_mode: chat_completionsFor an authenticated endpoint, the wizard saves the key to .env and writes a reference in model.api_key. For manual setup with authentication, save the server key as MY_PROVIDER_API_KEY in ~/.hermes/.env and add key_env: MY_PROVIDER_API_KEY under model in config.yaml.
For the model ID, this example uses model.default because it is the field the 0.23.5 wizard writes. The Docker guide uses model.model, which the runtime accepts as an alias when model.default is unset. The Docker guide also asks for a non-empty key. For vLLM, follow its own authentication settings and supply the configured key when checking is enabled.
Test a reply and a real tool call
With vLLM still running, send NVIDIA’s one-shot test from the Hermes machine.
hermes -z "Reply exactly HERMES_OK"A reply of HERMES_OK confirms that Hermes received a chat response.
If the terminal tool is disabled, run hermes tools and enable it for the CLI. Then open the terminal UI with hermes --tui. Ask Hermes to run printf HERMES_TOOL_OK with the terminal tool and report the output. Check for HERMES_TOOL_OK in the tool result itself. The command preview and the assistant’s reply can both contain that text without confirming execution.
If you configured a fallback model, check the fallback notice or log for both tests to confirm that vLLM handled them.
NVIDIA reports a chat and terminal-tool round trip on DGX Station using DeepSeek V4 Flash 0731 and the vLLM 0.31.0 image. Its result applies to that hardware and recipe.
Fix plain-text tool calls, context errors and 404s
- Tool-call syntax appears in the reply. Check
--enable-auto-tool-choice, the parser for the exact checkpoint and any required template. Restart vLLM with the matching recipe and repeat the single-tool test. - Hermes refuses the context window. Check
max_model_lenon the server first. If it is below 64,000, serve a window that meets the floor or use a model and hardware setup that can. If the server is already serving enough, check the client’s context estimate. Even if an error mentionsmodel.ollama_num_ctx, start with vLLM’s own window and pin the verified value withmodel.context_lengthif detection is wrong. - HTTP 404. Confirm model discovery at
/v1/models. On stock vLLM the Hermes base URL ends with a single/v1. Hermes adds/chat/completionsfor chat requests. If the list works and chat still returns 404, comparemodel.defaultwith the served ID, including any alias. - Hermes in Docker can’t reach vLLM. Inside the Hermes container,
localhostpoints back to that container. If both containers share a private Docker bridge network and the vLLM service is namedvllm, start vLLM inside its container with--host 0.0.0.0and usehttp://vllm:8000/v1from Hermes. Leave the vLLM port unpublished on the host for this setup. On Linux, the Hermes Docker guide covers host networking, which exposes the container’s ports directly on the host.
Hermes Agent on ReadyHermes
ReadyHermes hosts your own always-on Hermes Agent and includes AI during the 30-minute free trial. We have not tested running vLLM on or with a ReadyHermes assistant.
Open Model key in your account. Choose Your own API key, then Other endpoint for an OpenAI-compatible API. Enter the endpoint’s key and a public HTTPS URL on port 443, with an optional path such as /v1. The panel rejects localhost, private addresses, bare IP addresses, non-443 ports, query strings and credentials in the URL. It sends the key as a Bearer token. You can’t add custom headers.
Select a model from /models when available or type its ID, then press Switch to my key. ReadyHermes sends a test to /chat/completions before restarting the assistant. Both paths are relative to the base URL. See the ReadyHermes model options.
Questions
How does Hermes Agent connect to vLLM?
Exit any active Hermes chat and run hermes model from your terminal. Select Custom endpoint (enter URL manually) and use http://localhost:8000/v1 if both programs run on the same machine. Enter the configured server key if checking is enabled, choose Chat Completions and select the model ID from /v1/models. Save the endpoint and start a new chat.
Which vLLM parser works with Hermes Agent?
Choose the parser for the model you serve. Use llama3_json and the matching JSON chat template for Llama 3.1. Qwen2.5 uses the hermes parser, and the documented Qwen3-Coder Instruct checkpoints use qwen3_xml. Enable automatic tool choice on the server.
How much context does Hermes Agent need with vLLM?
Hermes Agent 0.23.5 requires a resolved window of at least 64,000 total tokens for this setup. Check the server’s max_model_len in /v1/models. If detection is wrong, model.context_length can record the real served window in Hermes.
Why does Hermes Agent get a 404 from vLLM?
Check the API base and the model ID separately. For stock vLLM on the same machine the base is http://localhost:8000/v1. Confirm /v1/models responds, then use the ID it returns as model.default.
Has ReadyHermes tested vLLM?
ReadyHermes has not tested running vLLM on or with the hosted assistant. Its Other endpoint option accepts OpenAI-compatible APIs at public HTTPS URLs on port 443 and rejects localhost and private addresses.