# Hermes Agent

> Connect Hermes Agent to LMU AI — edit ~/.hermes/config.yaml with a base_url that includes /v1 and your sk- key to switch to any available model.

URL: https://docs.lmuai.ai/docs/tools/hermes



## Prerequisites [#prerequisites]

Before you start, make sure you have:

1. Registered and topped up an LMU AI account ([Quick Start](/docs/guide/getting-started))
2. An API key that starts with `sk-`
3. Installed Hermes Agent ([GitHub](https://github.com/nousresearch/hermes-agent))

## Configure LMU AI models [#configure-lmu-ai-models]

### Method 1 — Create the config with one command [#method-1--create-the-config-with-one-command]

Open a terminal and run the following command:

```bash
mkdir -p ~/.hermes
cat > ~/.hermes/config.yaml << 'EOF'
providers:
  lumai:
    name: lumai
    base_url: https://api.lmuai.ai/v1
    api_key: YOUR_API_KEY
    model: glm-5.2

model:
  provider: lumai
  model: glm-5.2
EOF
```

<Callout type="warn" title="Note">
  Replace `YOUR_API_KEY` with the actual `sk-` key you created in the LMU AI console.
</Callout>

### Method 2 — Edit the config file manually [#method-2--edit-the-config-file-manually]

If `~/.hermes/config.yaml` already exists, open it in an editor:

```bash
hermes config edit
```

Add or modify the following in the file:

```yaml
providers:
  lumai:
    name: lumai
    base_url: https://api.lmuai.ai/v1
    api_key: sk-your-actual-key
    model: glm-5.2

model:
  provider: lumai
  model: glm-5.2
```

Save and exit.

## Available models [#available-models]

In the `model` field, you can substitute any model name LMU AI supports. For the full model list, see the [Model Gallery](/docs/guide/models).

## Verify the config [#verify-the-config]

Run the following command to test whether the config works:

```bash
hermes chat -q 'Hello, please reply in one sentence' -Q
```

If you get a reply from the AI, the config is working.

## Common issues [#common-issues]

### 401 Unauthorized error [#401-unauthorized-error]

The API key is wrong or has expired. Check the key's status in the LMU AI console.

### 404 Not Found error [#404-not-found-error]

The `base_url` is wrong. Hermes uses the OpenAI protocol, so the address must include the `/v1` suffix:

```
https://api.lmuai.ai/v1    ✅ Correct
https://api.lmuai.ai       ❌ Wrong
```
