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

# Set Up Hermes Agent 

This guide walks you through installing Hermes Agent, connecting it to GMI Cloud as your model provider, and setting up Telegram so you can chat with your agent from your phone.

**What you will need:**

* A Mac or Linux machine (or a VPS)
* A GMI Cloud account: [https://console.gmicloud.ai](https://console.gmicloud.ai)
* A Telegram account: [https://telegram.org](https://telegram.org)
* About 10 minutes

## Watch the Video

If you prefer to follow along visually, the full setup is recorded below.

<iframe src="https://www.youtube.com/embed/XN0CTr36j6Y" title="YouTube video player" frameborder="0" className="w-full aspect-video rounded-xl" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen />

## Step 1: Install Hermes Agent

Open your terminal and run the one-line installer.

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

Or the one-line from the Hermes Website: [https://hermes-agent.nousresearch.com/](https://hermes-agent.nousresearch.com/)

The installer will automatically detect and install any dependencies it needs, including Python, Node, and Git. The whole thing takes about a minute.

<Frame>
  <img src="https://mintcdn.com/gmicloud/snZR1PHJrQo0A5RF/images/Screenshot-2026-05-01-at-3.34.35-PM.png?fit=max&auto=format&n=snZR1PHJrQo0A5RF&q=85&s=01702a52a3480874d759fe129d0d8612" alt="Screenshot 2026 05 01 At 3 34 35 PM" width="1037" height="661" data-path="images/Screenshot-2026-05-01-at-3.34.35-PM.png" />
</Frame>

Once it finishes, reload your shell:

```text theme={null}
source ~/.bashrc   # or source ~/.zshrc on Mac
```

Verify the install worked:

```text theme={null}
hermes --version
```

## Step 2: Run the Setup Wizard

Start the configuration wizard:

```text theme={null}
hermes setup
```

Press Enter to begin. The wizard walks you through the following steps.

## Step 3: Select GMI Cloud as Your Provider

When the wizard asks you to select a provider, scroll down and choose **GMI Cloud**.

<Frame>
  <img src="https://mintcdn.com/gmicloud/snZR1PHJrQo0A5RF/images/Screenshot-2026-05-01-at-3.35.18-PM.png?fit=max&auto=format&n=snZR1PHJrQo0A5RF&q=85&s=5c7ac6dab14ed088f541b7267693117f" alt="Screenshot 2026 05 01 At 3 35 18 PM" width="1062" height="725" data-path="images/Screenshot-2026-05-01-at-3.35.18-PM.png" />
</Frame>

The wizard will then ask for your GMI Cloud API key.

## Step 4: Get Your GMI Cloud API Key

Go to: [https://console.gmicloud.ai/user-setting/api-keys](https://console.gmicloud.ai/user-setting/api-keys)

<Frame>
  <img src="https://mintcdn.com/gmicloud/snZR1PHJrQo0A5RF/images/Screenshot-2026-05-01-at-3.35.59-PM.png?fit=max&auto=format&n=snZR1PHJrQo0A5RF&q=85&s=6153437c0a29ca99078bc20b6a6deaad" alt="Screenshot 2026 05 01 At 3 35 59 PM" width="631" height="422" data-path="images/Screenshot-2026-05-01-at-3.35.59-PM.png" />
</Frame>

If you are not already logged in, sign in with your credentials. Once you are in, click **Create API Key**, give it a name like `hermes-01`, and copy the key.

<Frame>
  <img src="https://mintcdn.com/gmicloud/snZR1PHJrQo0A5RF/images/Screenshot-2026-05-01-at-3.36.16-PM.png?fit=max&auto=format&n=snZR1PHJrQo0A5RF&q=85&s=7f80f62d6f32e56c6c1fa9b5fb2b4d44" alt="Screenshot 2026 05 01 At 3 36 16 PM" width="648" height="371" data-path="images/Screenshot-2026-05-01-at-3.36.16-PM.png" />
</Frame>

Head back to your terminal and paste the key when prompted. Note that the terminal will not show any characters when you paste. That is normal. Just paste and press Enter.

## Step 5: Set the Base URL

After the API key, the wizard will ask for a base URL. **You do not need to change anything here.** Just press Enter to use the default GMI Cloud endpoint:

```text theme={null}
https://api.gmi-serving.com/v1
```

## Step 6: Select Your Model

GMI Cloud gives you access to a wide range of models. During setup, you can pick the one you want to use. If you are not sure, a strong general-purpose choice is one of the Claude or DeepSeek models available in your GMI account.

<Frame>
  <img src="https://mintcdn.com/gmicloud/snZR1PHJrQo0A5RF/images/Screenshot-2026-05-01-at-3.37.47-PM.png?fit=max&auto=format&n=snZR1PHJrQo0A5RF&q=85&s=3652f553bfbbe42530b0dec7df2b7e55" alt="Screenshot 2026 05 01 At 3 37 47 PM" width="791" height="712" data-path="images/Screenshot-2026-05-01-at-3.37.47-PM.png" />
</Frame>

You can also set or change your model at any time after setup:

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

Or permanently in `~/.hermes/config.yaml`:

```text theme={null}
model:
  provider: "gmi"
  default: "your-model-id-here"
```

To see all available models on your GMI account, check the model catalog at: [https://console.gmicloud.ai](https://console.gmicloud.ai)

Once you are done, just type in your terminal to start and test Hermes:

```text theme={null}
hermes
```

<Frame>
  <img src="https://mintcdn.com/gmicloud/snZR1PHJrQo0A5RF/images/Screenshot-2026-05-01-at-3.41.06-PM.png?fit=max&auto=format&n=snZR1PHJrQo0A5RF&q=85&s=2b46741d4a89bc2ce2f2ab94bbf10377" alt="Screenshot 2026 05 01 At 3 41 06 PM" width="1147" height="716" data-path="images/Screenshot-2026-05-01-at-3.41.06-PM.png" />
</Frame>

## Step 7: Choose Telegram as Your Messaging Platform

When the wizard asks which messaging platform to use, select **Telegram**.

<Frame>
  <img src="https://mintcdn.com/gmicloud/snZR1PHJrQo0A5RF/images/Screenshot-2026-05-01-at-3.42.01-PM.png?fit=max&auto=format&n=snZR1PHJrQo0A5RF&q=85&s=2684a39a3a50e2b29904e60b339025e6" alt="Screenshot 2026 05 01 At 3 42 01 PM" width="892" height="580" data-path="images/Screenshot-2026-05-01-at-3.42.01-PM.png" />
</Frame>

## Step 8: Create a Telegram Bot

Go to Telegram and open a chat with **@BotFather**: [https://t.me/BotFather](https://t.me/BotFather)

<Frame>
  <img src="https://mintcdn.com/gmicloud/snZR1PHJrQo0A5RF/images/Screenshot-2026-05-01-at-3.55.17-PM.png?fit=max&auto=format&n=snZR1PHJrQo0A5RF&q=85&s=eb5e6ae3c1dada4386599ef67604fd56" alt="Screenshot 2026 05 01 At 3 55 17 PM" width="432" height="826" data-path="images/Screenshot-2026-05-01-at-3.55.17-PM.png" />
</Frame>

Click Start, then type:

```text theme={null}
/newbot
```

Follow the prompts to give your bot a name and a username. BotFather will reply with a bot token that looks like this:

```text theme={null}
7123456789:AAH1bG...
```

Copy that token. You will need it in the next step.

## Step 9: Configure Your Telegram Settings

Open your Hermes environment file:

```text theme={null}
nano ~/.hermes/.env
```

Find the Telegram section and fill in the following two values. Remove the `#` from the front of each line if they are commented out:

```text theme={null}
TELEGRAM_BOT_TOKEN=your_token_from_botfather
TELEGRAM_ALLOWED_USERS=your_numeric_telegram_id
```

**To get your numeric Telegram user ID**, open Telegram and message **@userinfobot**: [https://t.me/userinfobot](https://t.me/userinfobot)

<Frame>
  <img src="https://mintcdn.com/gmicloud/snZR1PHJrQo0A5RF/images/Screenshot-2026-05-01-at-3.56.33-PM.png?fit=max&auto=format&n=snZR1PHJrQo0A5RF&q=85&s=67e869a86cac5803fecd0187ee809bcb" alt="Screenshot 2026 05 01 At 3 56 33 PM" width="285" height="558" data-path="images/Screenshot-2026-05-01-at-3.56.33-PM.png" />
</Frame>

Click Start, and it will instantly reply with your numeric ID. Copy that number and paste it in as your `TELEGRAM_ALLOWED_USERS` value.

<Frame>
  <img src="https://mintcdn.com/gmicloud/snZR1PHJrQo0A5RF/images/Screenshot-2026-05-01-at-3.57.31-PM.png?fit=max&auto=format&n=snZR1PHJrQo0A5RF&q=85&s=e5e3a87828c8ea09927f8b78a58ee32f" alt="Screenshot 2026 05 01 At 3 57 31 PM" width="1036" height="689" data-path="images/Screenshot-2026-05-01-at-3.57.31-PM.png" />
</Frame>

Save the file with `Ctrl+O`, then exit with `Ctrl+X`.

## Step 10: Start the Gateway

Start the Hermes gateway so your agent can receive messages from Telegram:

```text theme={null}
hermes gateway
```

<Frame>
  <img src="https://mintcdn.com/gmicloud/snZR1PHJrQo0A5RF/images/Screenshot-2026-05-01-at-3.58.03-PM.png?fit=max&auto=format&n=snZR1PHJrQo0A5RF&q=85&s=b8e1a0f0ae525117b4187689717dff5e" alt="Screenshot 2026 05 01 At 3 58 03 PM" width="1200" height="838" data-path="images/Screenshot-2026-05-01-at-3.58.03-PM.png" />
</Frame>

You should see confirmation that Telegram is connected and the gateway is running.

## Step 11: Send Your First Message

Open Telegram and search for your bot by the username you created in BotFather. Click **Start**.

Send it a message. You should get a response within a few seconds.

## Step 12: Try a Real Task

Here is an example to see the self-improving skill system in action. Send your bot this message:

```text theme={null}
Every morning at 9am, find the top 3 AI news stories, summarize them, and send me a briefing here on Telegram.
```

Hermes will set up a scheduled cron job, run it, and confirm. The next morning, your briefing arrives automatically. And because Hermes saved what it learned as a reusable skill, similar scheduling tasks will be faster next time.

## Troubleshooting

**Gateway shows "No messaging platforms enabled"**

This means your `TELEGRAM_BOT_TOKEN` is missing or commented out in `~/.hermes/.env`. Open the file and make sure the line does not start with a `#` and that the token is pasted correctly.

**API key rejected (401 error)**

Run `hermes setup` again to re-enter your GMI Cloud API key. Double-check that you have added credits to your GMI account at [https://console.gmicloud.ai](https://console.gmicloud.ai) before generating the key.

**Hermes crashes on launch with an OSError**

This usually means Hermes is being launched from a non-standard terminal, such as VS Code's integrated terminal. Try running it from a plain Terminal window instead.

**Wrong API key or want to change it**

Edit `~/.hermes/.env` directly and update the `GMI_API_KEY` value, or run `hermes setup` to go through the wizard again.
