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

# Connect with Hermes Agent

> Set up Hermes Agent to use Modular Cloud models

This page explains how to run models from Modular Cloud on your [Hermes
Agent](https://hermes-agent.nousresearch.com/).

## Before you begin

Make sure you have:

* A Modular Cloud [account](https://console.modular.com/signup).
* A Modular Cloud [API key](/administration/api-keys).
* [Hermes Agent](https://hermes-agent.nousresearch.com/) installed.

## Hermes CLI or TUI

To configure Modular Cloud as a provider in Hermes in the terminal:

1. Start Hermes with the command:

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

   <Note>
     The `model` option automatically runs the first time you run Hermes.
     Use the same steps to complete that initial process.
   </Note>

2. Select **Custom endpoint**.

3. Paste the base URL. Use `https://api.modular.com/v1` for testing.

4. Paste your API key now, or skip if you want to configure it later.

5. Select the **Auto-detect** API mode.

6. Choose a model to become your default model. Hermes automatically
   integrates all available Modular Cloud models for you to switch to later.

7. Click **Enter** to auto-detect the context length.

8. Enter a display name for the provider, such as `Modular Cloud`.

After you establish the connection, run the `/model` command and select the
Modular Cloud model to use.

## Hermes Desktop

To configure Modular Cloud as a provider in Hermes Desktop:

1. Open the Hermes Desktop app.

2. Click the **gear** icon to open Settings.

3. Open **Providers > Custom Endpoints** from the left navigation bar.

4. In the **Add Endpoint** form, fill out the following:

   * **Name**: `Modular`
   * **Provider ID**: `modular`
   * **Endpoint URL**: The base URL, such as `https://api.modular.com/v1`
   * **Default Model**: A Modular Cloud model you have access to. Example:
     `minimax/minimax-m3`
   * **API Key**: Your Modular Cloud API key

5. Click **Test** to test the connection, then **Save**.

This connects you to all the Modular Cloud models you have access to. Open a new
chat and pick any model from the selector.

## Update the config file

Both the Hermes CLI and Desktop share the same config file. To update settings
for both:

1. Open the `~/.hermes/config.yaml` config file.
2. Update the Modular Cloud custom provider section:

   ```yaml theme={null}
   model:
     provider: "custom"
     model: "minimax/minimax-m3"
     base_url: "https://api.modular.com/v1"
   ```

You can also use the shortcut CLI command `hermes config set`. For example:

```bash theme={null}
hermes config set api_key "your_api_key"
```

<Note>
  To see the complete list of provider configuration options, see [LLM and Model
  Providers](https://hermes-agent.nousresearch.com/docs/integrations/providers)
  in the Hermes Agent documentation.
</Note>
