---
title: "Hermes Agent custom provider for security-tuned models"
canonical: https://pentestllm.ai/guides/hermes-agent
generated: 2026-11-18T03:35:59.477Z
source: https://pentestllm.ai/guides/hermes-agent
base_url: https://api.pentestllm.ai/v1
---

# Hermes Agent on a security model that answers

Add this API to Hermes Agent as one providers entry in ~/.hermes/config.yaml: the api URL, a key_env name, the chat_completions transport and your model ids. The key stays in .env, /model switches builds mid-session, and the page prices an agent turn and decodes each error.

Steps checked November 6, 2026 · prices as of November 18, 2026

Hermes Agent will drive a shell, read files and spawn subagents, which is exactly what you want when triaging an authorized target, right up until the stock model behind it refuses. Hermes registers each OpenAI-compatible endpoint as a provider of its own under `providers` in `~/.hermes/config.yaml`. With that one entry a security-tuned or abliterated build runs the agent, tool calls included, billed per token. The same ids also work in [OpenClaw](https://pentestllm.ai/guides/openclaw) and [OpenCode](https://pentestllm.ai/guides/opencode).

## What you need

Hermes Agent installed, a key from the [console](https://app.pentestllm.ai/console), and two files under `~/.hermes/`: `config.yaml` for settings and `.env` for secrets. Precedence runs CLI flags, then `config.yaml`, then `.env`, then built-in defaults. A `providers` entry refers to its key by variable name through `key_env`, which keeps the key out of `config.yaml` entirely. Older write-ups use a `custom_providers` list; Hermes still accepts it and `hermes update` converts it, but new setups use the mapping below. To try a security build first, the home page prompt box gives a few free turns and [the playground](https://pentestllm.ai/playground) runs the same catalog.

## Shortest path to a first reply

1. Make a key just for Hermes, so its requests are easy to separate on the usage page when you bill an engagement, and write it into the env file as one line:

```
# ~/.hermes/.env
PENTESTLLM_API_KEY=sk-ptl-live-…
```

1. Add the entry to `config.yaml`. The ids under `models` are a first set; every id on the [models page](https://pentestllm.ai/models) fits the same mapping:

```
# ~/.hermes/config.yaml
model:
  default: glm-5.3-uncensored
  provider: custom:pentestllm

providers:
  pentestllm:
    api: https://api.pentestllm.ai/v1
    key_env: PENTESTLLM_API_KEY
    transport: chat_completions
    default_model: glm-5.3-uncensored
    models:
      glm-5.3-uncensored: {}
      glm-5.3-flash-uncensored: {}
      deepseek-v4.1-flash-abliterated: {}
      deepseek-v4-pro-uncensored: {}
      glm-5.3-abliterated: {}
      kimi-k3.1-pro-uncensored: {}
```

1. Start `hermes` and give it something in scope, such as turning a raw port scan into a host table. The request reaches the console’s usage page within seconds, token counts and charge included.

Prefer the shell? The same configuration as commands. A dotted path writes to `config.yaml`; an UPPER_SNAKE name writes to `.env`:

```bash
hermes config set PENTESTLLM_API_KEY sk-ptl-live-…
hermes config set providers.pentestllm.api https://api.pentestllm.ai/v1
hermes config set providers.pentestllm.key_env PENTESTLLM_API_KEY
hermes config set providers.pentestllm.transport chat_completions
hermes config set model.provider custom:pentestllm
hermes config set model.default glm-5.3-uncensored
```

Change builds during a session with `/model`. The switch holds for that session only, unless you add `--global`, which saves it to `config.yaml`:

```
/model custom:pentestllm:glm-5.3-flash-uncensored
/model custom:pentestllm:deepseek-v4.1-flash-abliterated --global
```

## Each field of the entry

- api: https://api.pentestllm.ai/v1 the endpoint including /v1; Hermes also accepts base_url for this field
- key_env: PENTESTLLM_API_KEY the .env variable holding the full sk-ptl- key
- transport: chat_completions the OpenAI chat format; every build in the catalog speaks it
- default_model: glm-5.3-uncensored the id this provider opens with
- models: id: {} per-id settings; put context_length beneath an id to override the value Hermes detects
- model.provider: custom:pentestllm picks this entry; model.default names the id Hermes launches with

## Which build to start with

Every file read, shell command and subagent in Hermes goes through a tool call. Before you hand a new id a long job, give it one small task and confirm a tool actually fires. Cost tracks the input rate, since each turn resends the conversation plus every tool result so far. The cost column below prices one turn of 30,000 tokens in and 1,000 out from the catalog as of 2026-11-18.

| Build | Single turn | Session of 30 turns |
| --- | --- | --- |
| [GLM-5.3 Uncensored](https://pentestllm.ai/models/glm-5.3-uncensored) | $0.0093 | $0.28 |
| [GLM-5.3 Flash Uncensored](https://pentestllm.ai/models/glm-5.3-flash-uncensored) | $0.0035 | $0.11 |
| [DeepSeek V4.1 Flash Abliterated](https://pentestllm.ai/models/deepseek-v4.1-flash-abliterated) | $0.03 | $0.81 |
| [DeepSeek V4 Pro Uncensored](https://pentestllm.ai/models/deepseek-v4-pro-uncensored) | $0.03 | $0.93 |
| [GLM-5.3 Abliterated](https://pentestllm.ai/models/glm-5.3-abliterated) | $0.07 | $2.10 |
| [Kimi K3.1 Pro Uncensored](https://pentestllm.ai/models/kimi-k3.1-pro-uncensored) | $0.04 | $1.22 |

| Model | Build | Input $/M | Output $/M |
| --- | --- | --- | --- |
| [GLM-5.3 Uncensored](https://pentestllm.ai/models/glm-5.3-uncensored) glm-5.3-uncensored | Uncensored | $0.282 | $0.846 |
| [GLM-5.3 Flash Uncensored](https://pentestllm.ai/models/glm-5.3-flash-uncensored) glm-5.3-flash-uncensored | Uncensored | $0.1053 | $0.3685 |
| [DeepSeek V4.1 Flash Abliterated](https://pentestllm.ai/models/deepseek-v4.1-flash-abliterated) deepseek-v4.1-flash-abliterated | Abliterated | $0.8488 | $1.6975 |
| [DeepSeek V4 Pro Uncensored](https://pentestllm.ai/models/deepseek-v4-pro-uncensored) deepseek-v4-pro-uncensored | Uncensored | $0.97 | $1.94 |
| [GLM-5.3 Abliterated](https://pentestllm.ai/models/glm-5.3-abliterated) glm-5.3-abliterated | Abliterated | $2.1825 | $4.365 |
| [Kimi K3.1 Pro Uncensored](https://pentestllm.ai/models/kimi-k3.1-pro-uncensored) kimi-k3.1-pro-uncensored | Uncensored | $1.164 | $5.82 |

Prices per million tokens, read from the live catalog on 2026-11-18.

If the agent’s job is mostly reviewing code for vulnerabilities, [the coding guide](https://pentestllm.ai/guides/uncensored-coding-ai) compares the code builds and prices a full day on each. [The AI red teaming page](https://pentestllm.ai/ai-red-teaming) covers what an agent should and should not do during an exercise.

## Confirm it works

`hermes status` prints the current model, the active provider and which providers hold a credential, without revealing any key. From that same shell, the key should return the model list:

```bash
hermes status
curl https://api.pentestllm.ai/v1/models -H "Authorization: Bearer $PENTESTLLM_API_KEY"
```

Then fire one request shaped like Hermes’. The `-i` flag shows the response headers, which carry a request id and, on a non-streamed reply, the charge in USD.

```bash
curl -i https://api.pentestllm.ai/v1/chat/completions \
  -H "Authorization: Bearer $PENTESTLLM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "glm-5.3-uncensored", "max_tokens": 16, "messages": [{"role": "user", "content": "Reply with the single word ok."}]}'
```

## When something fails

- `401 invalid_api_key`: bad key, revoked key, or a key that never made it into the request. Look for the line in `~/.hermes/.env`, make sure `key_env` names that exact variable, and copy a fresh key from the console if needed.
- `402 insufficient_balance`: the balance cannot cover this call; add credit in the console. A `402 monthly_limit_reached` instead means the key reached the monthly spend ceiling you gave it.
- `404 model_not_found`: `model.default` holds an id that is not on the models page. Paste the id from that page into `hermes config set model.default <id>`.
- `429 rate_limited`: the key is over its rate limit. Read `retry-after` on the response.
- `400` on the very first run: the Hermes FAQ attributes this to a model name that does not match. Compare the output of `hermes config show`, field `model.default`, with the models page.
- Hermes ignores every custom endpoint: a leftover `custom_providers` key in `config.yaml` is no longer read as a YAML list. Move the entry into the `providers` mapping shown here and run `hermes doctor`.

## Sources

Field names come from Hermes Agent’s [providers page](https://hermes-agent.nousresearch.com/docs/integrations/providers) and its [configuration guide](https://hermes-agent.nousresearch.com/docs/user-guide/configuration), read 2026-11-06. Prices come from the live catalog when the page renders.

## Questions

### Does Hermes Agent accept a custom OpenAI-compatible endpoint?

Yes. Hermes treats each OpenAI-compatible endpoint as its own named provider in ~/.hermes/config.yaml, declared with api, key_env and transport chat_completions. The entry on this page targets https://api.pentestllm.ai/v1, after which every build on the models page is reachable through it.

### How do I switch the model in Hermes Agent?

Either set model.default to the id and model.provider to custom:pentestllm, or type /model custom:pentestllm:<id> during a session. Append --global to that /model command to persist the choice in config.yaml. Paste the id from the models page instead of typing it from memory.

### Where does Hermes Agent keep the API key?

In ~/.hermes/.env, on a single PENTESTLLM_API_KEY=... line. hermes config set with an UPPER_SNAKE name lands in the same file. The providers entry picks it up via key_env, so config.yaml never holds the key.

### How much does a Hermes Agent session cost on this API?

You pay per token at the model’s listed price out of prepaid credit, with no subscription required. The table above prices a typical agent turn per build at the current rate. When a session repeats the same prefix, the cached input tokens are charged at that model’s discounted cache price.

Every model above is on the [uncensored model list](https://pentestllm.ai/models) with its live price per million tokens. [Per-token pricing](https://pentestllm.ai/pricing) sets the whole catalog side by side, and the [family directory](https://pentestllm.ai/uncensored) groups the builds by base model.

[Get a key](https://app.pentestllm.ai/console) Prepaid from $10, no subscription.

## New models and price changes, once a month.

New uncensored builds with their prices, price moves, and what the daily model check found.
