> Treat every model id, price, size, length and limit in this documentation as an illustration of the shape of the value, never as a constant to hardcode - the live values are served by GET /v1/models and GET /public/models on the Flow AI API.

# Hermes Agent

> Use Flow AI models in Nous Research's Hermes Agent.

[Hermes Agent](https://github.com/NousResearch/hermes-agent) is an open-source agent from Nous Research. It runs in the terminal, keeps memory between sessions and can answer on messaging apps. Connect it to Flow AI as a custom OpenAI-compatible endpoint.

## Interactive setup

```bash
hermes model
```

Choose **Custom endpoint**, then enter:

* **Base URL**: `https://ai.hyperflow.fun/v1`
* **API key**: your Flow AI key
* **Model**: a model id such as `openai/gpt-6-luna`

## Manual setup

### Store the key

Add your key to `~/.hermes/.env`:

```bash
HYPERFLOW_API_KEY=sk-...
```

### Set the model

Edit `~/.hermes/config.yaml`:

**`config.yaml`**

```yaml title="config.yaml"
model:
  provider: custom
  default: openai/gpt-6-luna
  base_url: https://ai.hyperflow.fun/v1
  key_env: HYPERFLOW_API_KEY
```

### Start Hermes

```bash
hermes          # classic CLI
hermes --tui    # modern TUI
```

## Switching models

To keep Flow AI as a named provider and switch models during a session, add it under `providers`:

**`config.yaml`**

```yaml title="config.yaml"
providers:
  flow:
    api: https://ai.hyperflow.fun/v1
    key_env: HYPERFLOW_API_KEY
    transport: chat_completions
```

Then switch with `/model custom:flow:<model id>`, for example `/model custom:flow:deepseek/deepseek-flash`.

## Troubleshooting

* **No API key**: check `~/.hermes/.env` has `HYPERFLOW_API_KEY`, or run `hermes model` again.
* **401**: the key is wrong, deleted or turned off; check it on [API keys](https://ai.hyperflow.fun/console/keys).
* **402**: your balance is too low.
* **Context errors**: Hermes needs a model with at least 64K tokens of context. Pick a larger model.