# Hermes Agent

Run Hermes Agent, Nous Research's terminal agent, on models you pay for in DA.

Hermes takes named providers in `~/.hermes/config.yaml`. OpenDunes goes in as one of them, and Hermes sends each request to [`POST /v1/chat/completions`](/docs/reference/chat-completions).

1. [Install Hermes Agent](#1-install-hermes-agent).
2. [Add OpenDunes as a provider](#2-add-opendunes-as-a-provider).
3. [Check the setup](#3-check-the-setup).
4. [Switch models in a chat](#4-switch-models-in-a-chat).

## 1. Install Hermes Agent

| On | Install line |
|---|---|
| macOS, Linux, WSL | `curl -fsSL https://hermes-agent.nousresearch.com/install.sh \| bash` |
| Windows, PowerShell | `iex (irm https://hermes-agent.nousresearch.com/install.ps1)` |

Create an API key for Hermes alone, and cap it on *API Keys* ([API keys](/docs/api-keys) shows how). Put it in your shell profile, `~/.zshrc` or `~/.bashrc`, as `export OPENDUNES_API_KEY="…"`.

## 2. Add OpenDunes as a provider

Open the file with `hermes config edit`, and add:

```yaml
providers:
  opendunes:
    api: https://opendunes.com/v1
    key_env: OPENDUNES_API_KEY
    transport: chat_completions

model:
  default: anthropic/claude-sonnet-4.5
  provider: custom:opendunes
```

| Key | Holds |
|---|---|
| `providers.opendunes.api` | the address, with `/v1` |
| `providers.opendunes.key_env` | the variable Hermes reads the key from: the key stays out of the file |
| `providers.opendunes.transport` | `chat_completions`, the shape Hermes sends |
| `model.default` | the model ID Hermes starts on, from [Models](/docs/models) |
| `model.provider` | `custom:opendunes`: the provider above |

## 3. Check the setup

```bash
hermes doctor
hermes -z "Name this project's main language in one word."
```

`hermes doctor` reads the file and names any setting it cannot use. `hermes -z` sends one task and prints the answer. Then open *Activity*, in the app on opendunes.com: the request is there, with its charge in DA.

Start a chat with `hermes`.

## 4. Switch models in a chat

`/model` takes the provider and a model ID, joined by colons:

```text
/model custom:opendunes:anthropic/claude-opus-5.5
```

The chat goes on with that model, on the same key. Each model is charged at its own rate, shown on its page in Models.

<div class="watch-out">
<p>Hermes runs a task in many requests, and each one reads the conversation so far. Watch <em>Activity</em> during your first long task, and set the key's cap to what one day of work may spend.</p>
</div>

## Errors

| Status | Means | Do |
|---|---|---|
| 401 | the key is missing, wrong, paused, revoked or expired | check `OPENDUNES_API_KEY` in the terminal Hermes starts from |
| 402 | the balance is at zero or below, cannot pay the request's hold, or the key's cap is spent | make a deposit, or raise the cap |
| 404 | the model ID is not on sale | copy the ID from Models |

Every other status: [Errors and retries](/docs/errors-and-retries). Other terminal agents: [Coding agents](/docs/coding-agents).

Next: [OpenClaw](/docs/cookbook/openclaw) · [Junie CLI](/docs/cookbook/junie-cli)
