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

# Hermes Agent

> Run Hermes Agent through a Dari Router.

Install the [Dari CLI](https://docs.dari.dev/install-cli.md), then launch Hermes Agent through your organization's default router:

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

Hermes runs its chats, messaging platforms, and scheduled tasks through a shared gateway that reads `config.yaml`, so a single launch cannot route only itself. `dari hermes` writes Dari into the config that `hermes config path` reports (it follows `HERMES_HOME` and the active profile), then starts the installed `hermes` executable with every following argument. Your other providers, platforms, and settings are kept. New sessions use Dari; run `hermes gateway restart` to move messaging sessions that are already open.

Setup adds a `dari` entry under `providers` that offers your router's models and makes it the main model: `model.provider: dari` and `model.default: dari/routing` (or your router's first model, without Autorouting). It removes the main model's own `base_url`, `api_key`, `api_mode`, and `context_length`, which would otherwise steer Dari's route, and saves what it replaced in `dari-setup.json` beside `config.yaml`. To set up without launching, or to undo it and restore your previous main model:

```bash theme={null}
dari hermes --setup
dari hermes --remove-setup
```

On first use, Dari signs you in if needed and creates and privately caches a Routing key, which setup writes as the entry's `api_key`. Gateway includes personal subscriptions, Dari managed billing, and bring-your-own provider keys; the \$20/month individual Autorouting plan unlocks the `dari/routing` router. Gateway serves any model enabled on your router: switch between them with `/model custom:dari:dari/model/<model>`. To subscribe, run `dari hermes --connect` and choose **Get Autorouting** (or press `a` in the setup model picker).

On first launch, setup opens an **Accounts** page where you can connect one or more ChatGPT subscriptions, connect an API key (Vercel AI Gateway, OpenRouter, or direct provider keys), or choose Dari managed billing. Run `dari hermes --connect` to open it again. Each launch refreshes the entry, so run `dari hermes` or `dari hermes --setup` again after changing the router's models.

Hermes sends Chat Completions requests through the router at `/v1`. Setup configures a one-million-token context window and sends Hermes's session id in `x-session-affinity`, which groups all requests from one Hermes session under the same conversation in **Activity**.

## Manual Configuration

If you do not want to use the launcher, create a [Routing API key](https://docs.dari.dev/api-keys.md#create-a-routing-key) and add this to `~/.hermes/config.yaml`:

```yaml theme={null}
model:
  provider: dari
  default: dari/routing
providers:
  dari:
    name: Dari
    base_url: https://routing.dari.dev/v1
    api_key: dari_...
    transport: chat_completions
    default_model: dari/routing
    context_length: 1000000
    session_affinity_header: x-session-affinity
    models:
      dari/routing: {}
```

To use a different model set, edit the default router or [Create A Router](https://docs.dari.dev/router/create-a-router.md). To launch `dari hermes` on that router, add **Hermes Agent** to its card on the **Routers** page or run `dari router assign-agent <router_id> hermes`; the **X** on the card moves it back to the default router. With manual configuration instead, point `base_url` at `https://routing.dari.dev/{router_id}/v1`.


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