# Hermes Agent

Source: https://docs.aicentos.com/en/clients/hermes-agent

Language: en

> Use aicentos in Hermes Agent — point at an OpenAI-compatible endpoint through environment variables

Hermes Agent reads model service connection details from environment variables. Point the Base URL at aicentos and all of the agent's inference requests go through the models aicentos offers.

## Prerequisites

First create a dedicated key for Hermes Agent on the console's "API Keys" page (naming it `hermes-agent` makes usage easier to track).

* Console: [https://aicentos.com](https://aicentos.com)
* Create a key: [https://aicentos.com/keys](https://aicentos.com/keys)
* Wallet top-up: [https://aicentos.com/wallet](https://aicentos.com/wallet)
* Docs site: [https://docs.aicentos.com](https://docs.aicentos.com)

## Configuration to fill in

| Field             | Value                                              |
| ----------------- | -------------------------------------------------- |
| OPENAI\_BASE\_URL | `https://aicentos.com/v1`                          |
| OPENAI\_API\_KEY  | The key created in the console                     |
| Model             | A model name from the Model Gallery in the console |

## Setup steps

Set the variables in the same shell that runs the agent:

```bash
export OPENAI_BASE_URL="https://aicentos.com/v1"
export OPENAI_API_KEY="sk-your-Key"
export OPENAI_MODEL="gpt-4o"
```

Then start Hermes Agent the way you normally do. To persist the settings, put the `export` lines above into `~/.zshrc` or `~/.bashrc` and `source` the file again.

If Hermes Agent has its own configuration file, you can also specify base\_url / api\_key / model there with the same effect; when both exist, its own precedence rules apply (environment variables usually win).

## Test

After starting, trigger the simplest possible inference (for example, ask it a general-knowledge question) and confirm a reply comes back. Then check the console's usage page to confirm the request was actually recorded against the key you created for Hermes Agent.

## Notes

* The environment variables must be visible in the shell session that launches the agent; writing them into a different shell has no effect.
* If you deploy with Docker, pass the variables in with `-e` or compose's `environment` — defining them only on the host is not enough.
* Enter the Base URL only up to `/v1`.
* Some agent frameworks read `OPENAI_API_BASE` first; if the variables above have no effect, add the alternate spelling and try again.
* Create a separate key for the agent so its usage can be tracked per project.