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

# Hermes Agent (Beta)

> Use models on Concentrate with Nous Research's Hermes Agent

> [!NOTE]
>
> Hermes integration is currently in **beta**. Some features may not work, some may only work with certain models.

## Why Use Concentrate with Hermes?

[Hermes Agent](https://github.com/NousResearch/hermes-agent) is an open-source agent from Nous Research that runs in your terminal, with tools for the shell, files, the web, MCP servers, subagents and computer use. It accepts any OpenAI- or Anthropic-compatible API as a custom provider. By routing Hermes through Concentrate, you use models from every provider in our [catalog](https://concentrate.ai/models) with one API key, and get centralized visibility and control over your team's usage: spend tracking, budget limits, and everything visible in your Concentrate dashboard in real time.

## What Works

| Feature | Status | Notes |
| - | - | - |
| **Chat and coding** | Supported | All models on Concentrate |
| **Tool calls** | Supported | Including several tool calls at once. Needs a model that supports tool use |
| **MCP servers** | Supported | Tools from MCP servers in your Hermes config |
| **Subagents** | Supported | `delegate_task` runs child agents in parallel |
| **Images** | Supported | Pasted images and images read by tools. Needs a model that accepts images |
| **Computer use** | Supported | Hermes' `computer_use` tool, with screenshots sent back to the model. Needs a model that accepts images |
| **Sessions** | Supported | Resume with `hermes chat --continue` or `--resume <session-id>` |
| **Switching models** | Supported | Switch with `/model` mid-session, including across providers |

## Prerequisites

* A Concentrate AI account with an active API key (starts with `sk-cn`)
* [Hermes Agent](https://github.com/NousResearch/hermes-agent#quick-install) installed:

  ```bash Bash theme={null}
  curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash
  ```

## Quick Setup

```bash Bash theme={null}
curl -fsSL https://concentrate.ai/scripts/setup-hermes.sh | bash
```

The script saves your API key to Hermes' own `~/.hermes/.env` as `CONCENTRATE_HERMES_API_KEY`, so it doesn't change your shell profile, and Hermes can use a different key from your other tools. If you already have `CONCENTRATE_API_KEY` set, it asks whether to reuse it. It adds a `concentrate` provider to `~/.hermes/config.yaml` that uses our Responses API (for the other API formats, see [Other API formats](#other-api-formats)), and makes Concentrate your default provider, asking first if you already have one. Your other settings are kept, and `config.yaml` is backed up first. Without a terminal (for example in CI), the script can't ask, so it keeps any default provider you already have, and uses a saved key or `CONCENTRATE_API_KEY`. If neither is set, pass the key with `--key <API_KEY>`.

Then start Hermes in a project directory:

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

## Manual Setup

If you prefer to configure Hermes manually or the script doesn't work for your environment:

**1. Save your API key**

Add this line to Hermes' `.env` file, `~/.hermes/.env` (create it if it doesn't exist):

```ini theme={null}
CONCENTRATE_HERMES_API_KEY=sk-cn-v1-...
```

Editing the file keeps the key out of your shell history.

**2. Add Concentrate to \~/.hermes/config.yaml**

Add a `concentrate` provider and make it the default. Keep any other settings already in the file. `key_env` is the name of the variable, not the key itself:

```yaml theme={null}
model:
  provider: concentrate
  default: anthropic/claude-sonnet-5-5
providers:
  concentrate:
    name: Concentrate
    base_url: https://api.concentrate.ai/v1
    key_env: CONCENTRATE_HERMES_API_KEY
    transport: codex_responses
```

`codex_responses` makes Hermes use our [Responses API](https://concentrate.ai/docs/api-reference/endpoint/create-response.md). Use any model from the [supported models](https://concentrate.ai/docs/api-reference/endpoint/supported-models.md) page with its `provider/model` ID.

**3. Verify the connection**

Send a one-off prompt, then start Hermes in a project directory:

```bash theme={null}
hermes chat --oneshot -q "Reply with exactly: hermes ok"
cd /path/to/project
hermes
```

## Switch models

Inside a session, name the model and the provider:

```text theme={null}
/model openai/gpt-6-luna --provider concentrate
```

To start a session on a different model, pass it on the command line:

```bash theme={null}
hermes chat --provider concentrate -m ai-studio/gemini-3.8-flash
```

> [!WARNING]
>
> Don't use the `provider:model` form (for example `/model concentrate:openai/gpt-6-luna`) with a custom provider. Hermes sends the whole string as the model ID, which Concentrate rejects.

## Other API formats

We recommend the Responses API (`codex_responses`) shown above. It gets the best prompt-cache hit rate, which keeps long agent sessions cheaper. Hermes can also use our Chat Completions and Messages APIs, which are in beta. To use them, add them under `providers:` in the same file:

```yaml theme={null}
  concentrate-chat:
    name: Concentrate (Chat Completions)
    base_url: https://api.concentrate.ai/v1
    key_env: CONCENTRATE_HERMES_API_KEY
    transport: chat_completions
  concentrate-messages:
    name: Concentrate (Messages)
    base_url: https://api.concentrate.ai
    key_env: CONCENTRATE_HERMES_API_KEY
    transport: anthropic_messages
```

Then select one with `--provider`, for example `hermes chat --provider concentrate-messages -m anthropic/claude-haiku-4-5`.

> [!WARNING]
>
> Claude models on Chat Completions don't use prompt caching yet, so every turn pays the full input price. In a long agent session that can cost several times more than Responses or Messages. Use Responses or Messages for Claude.

## Tips

* **Context window.** Hermes needs a model with a context window of at least 64K tokens, because its tools and system prompt take up a large part of every request. Check a model's context window on the [supported models](https://concentrate.ai/docs/api-reference/endpoint/supported-models.md) page.
* **Images on text-only models.** If you send an image to a model that can't read images, Hermes first describes it with a vision model and passes the description on. That extra call is billed like any other request.
* **Side requests.** Besides your conversation, Hermes makes short side requests, for example to title sessions or describe images. They appear in your Concentrate dashboard alongside the main requests.
* **Costs.** The Concentrate dashboard is the source of truth for spend.

## Remove Concentrate AI

```bash Bash theme={null}
curl -fsSL https://concentrate.ai/scripts/uninstall-hermes.sh | bash
```

This removes the `concentrate` provider and `CONCENTRATE_HERMES_API_KEY`. Remove any providers you added by hand yourself. Other settings are kept. If Concentrate was your default provider, run `hermes model` afterwards to choose a new one.

## Troubleshooting

> **401 Invalid API key**
>
> 1. Check the key is saved: `hermes config get CONCENTRATE_HERMES_API_KEY` shows its first and last characters. To replace it, re-run the setup script or edit the line in `~/.hermes/.env`.
> 2. Check `key_env` in `config.yaml` is the variable's name (`CONCENTRATE_HERMES_API_KEY`), not the key itself.

> **400 Invalid request: model**
>
> The model ID isn't one Concentrate knows. Use the exact `provider/model` ID from the [supported models](https://concentrate.ai/docs/api-reference/endpoint/supported-models.md) page, and switch with `/model <model> --provider concentrate`, not `concentrate:<model>`.

> **402 Insufficient funds**
>
> Your balance is empty. Add funds on the [billing page](https://concentrate.ai/personal/billing).
