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

# Hermes Agent BetterToken setup guide

> Connect BetterToken to Hermes Agent with Codex group model IDs.

Hermes Agent supports custom model providers. External tools should now use the Codex group with an OpenAI-style protocol.

## Prerequisites

* BetterToken API Key (register here (`https://www.bettertoken.ai/register`))
* macOS, Linux, or Windows WSL2

## Install Hermes Agent

```bash theme={null}
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash
```

## Setup

<Steps>
  <Step title="Run the model selector">
    ```bash theme={null}
    hermes model
    ```
  </Step>

  <Step title="Choose the OpenAI or OpenAI Compatible provider">
    Select **OpenAI** or **OpenAI Compatible** from the provider list.
  </Step>

  <Step title="Fill in the BetterToken config">
    Enter:

    * **Base URL**: `https://www.bettertoken.ai/v1`
    * **API Key**: your BetterToken API Key
    * **Model**: a **Codex group** model ID copied from the model plaza (`https://www.bettertoken.ai/pricing`)
  </Step>

  <Step title="Only configure extra headers when the official docs explicitly require them">
    We did not find an official Hermes Agent setup requirement that makes `User-Agent` mandatory for BetterToken. Start with the `Base URL`, API key, and model ID shown on this page.

    If you are also using a custom gateway, tenant routing, observability, or caching layer, add headers only according to that upstream service's official docs.
  </Step>

  <Step title="Restart Hermes Agent">
    After updating the config, quit the current Hermes Agent session and start it again.
  </Step>

  <Step title="Start Hermes Agent">
    ```bash theme={null}
    hermes
    ```
  </Step>
</Steps>

<Note>
  If you need extra headers, follow the current Hermes Agent docs or your upstream gateway requirements instead of assuming `User-Agent` is mandatory for BetterToken.
</Note>
