> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dreamto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Hermes Agent

> Configure DreamTo as a custom endpoint in ~/.hermes/config.yaml to power Hermes Agent with GPT, Claude and other models.

[Hermes Agent](https://hermes-agent.nousresearch.com/docs) is an open-source agent from Nous Research. It can connect to any OpenAI-compatible or Anthropic-compatible custom endpoint.

## Prerequisites

* Hermes Agent installed per the [official docs](https://hermes-agent.nousresearch.com/docs).
* An API key created on the **API Keys** page of the [DreamTo console](https://www.dreamto.ai/console).

## Option 1: CLI wizard

Run:

```bash theme={null}
hermes model
```

Select **Custom endpoint** and fill in the prompts:

| Prompt | Value |
| - | - |
| API base URL | `https://api.dreamto.ai/v1` |
| API key | Your DreamTo API key (`sk-xxxx`) |
| Model name | e.g. `deepseek-v4.1-flash-1017` or `gpt-6.2-sol` |

The wizard uses the OpenAI Chat Completions protocol, which works for GPT, DeepSeek, Kimi, GLM, Grok and similar models.

## Option 2: Edit the config file

**1. Default model (Chat Completions)**

Edit `~/.hermes/config.yaml` and merge in the following:

```yaml ~/.hermes/config.yaml theme={null}
model:
  default: deepseek-v4.1-flash-1017
  provider: custom
  base_url: https://api.dreamto.ai/v1
  key_env: DREAMTO_API_KEY
```

Put the key in `~/.hermes/.env`:

```bash ~/.hermes/.env theme={null}
DREAMTO_API_KEY=sk-xxxx
```

You can also put `api_key: "sk-xxxx"` directly under `model`, but this is not recommended.

**2. Add named endpoints such as Claude (Anthropic Messages)**

To use several protocols at once, define named endpoints under `providers` and set the protocol with `transport`:

```yaml ~/.hermes/config.yaml theme={null}
providers:
  dreamto-claude:
    api: https://api.dreamto.ai
    key_env: DREAMTO_API_KEY
    transport: anthropic_messages
  dreamto-gpt:
    api: https://api.dreamto.ai/v1
    key_env: DREAMTO_API_KEY
    transport: chat_completions
```

| `transport` | Protocol | `api` URL |
| - | - | - |
| `chat_completions` | OpenAI Chat Completions | `https://api.dreamto.ai/v1` |
| `anthropic_messages` | Anthropic Messages | `https://api.dreamto.ai` (no `/v1`) |

**3. Switch and verify**

Restart Hermes and send a test message. You can switch models within a session:

```text theme={null}
/model custom:deepseek-v4.1-flash-1017
/model custom:dreamto-claude:claude-sonnet-5-5
```

The first uses the default endpoint under `model`; the second uses the named endpoint `dreamto-claude`.

> [!NOTE]
>
> Older Hermes versions use a top-level `custom_providers:` list (fields `name`, `base_url`, `api_key`, `api_mode`). Newer versions still read it and migrate it to `providers:` on `hermes update`. `api_mode` takes the same values as `transport` (`chat_completions`, `anthropic_messages`); note the underscores.

## FAQ

> [accordion] 401
>
> Check that the variable name in `~/.hermes/.env` matches `key_env`; running `hermes setup` cleans up stale `.env` entries. Note that `OPENAI_BASE_URL` only affects the built-in `openai-api` provider and does not change a custom endpoint's URL.

> [accordion] 404 / model not found
>
> * The Chat Completions endpoint includes `/v1`; the Anthropic endpoint does not.
> * The model name must match the model ID in the [Model Marketplace](https://www.dreamto.ai/models).

> [accordion] Wrong context length
>
> Hermes detects context length automatically. If detection is wrong, set `context_length` under `model` manually.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.