Hermes Agent

Prerequisites

ItemValue
Hermes Agent version0.15.2
Config file~/.hermes/config.yaml
Env file~/.hermes/.env
Providerjoytoken
Model nameauto
JoyToken Base URLJOY_TOKEN_OPENAI_BASE_URL from Environments
API key envJOY_TOKEN_API_KEY

Step 1: Install

$pipx install hermes-agent==0.15.2
$hermes --version

Step 2: Write the API key

Replace jt_xxx with your JoyToken API key, then run:

Write ~/.hermes/.env
$JOY_TOKEN_API_KEY="jt_xxx"
$JOY_TOKEN_OPENAI_BASE_URL="https://api-dev.joytokens.ai/openai/v1"
$
$mkdir -p ~/.hermes
$printf '%s\n' "JOY_TOKEN_API_KEY=\"${JOY_TOKEN_API_KEY}\"" > ~/.hermes/.env
$chmod 600 ~/.hermes/.env

The command writes this file content with the concrete value from JOY_TOKEN_OPENAI_BASE_URL:

~/.hermes/.env
$JOY_TOKEN_API_KEY="jt_xxx"

Step 3: Configure provider

Run this command to write the Hermes provider config:

Write ~/.hermes/config.yaml
$JOY_TOKEN_OPENAI_BASE_URL="${JOY_TOKEN_OPENAI_BASE_URL:-https://api-dev.joytokens.ai/openai/v1}"
$mkdir -p ~/.hermes
$cat > ~/.hermes/config.yaml <<EOF
$model:
$ provider: joytoken
$ default: auto
$
$providers:
$ joytoken:
$ name: JoyToken
$ base_url: $JOY_TOKEN_OPENAI_BASE_URL
$ key_env: JOY_TOKEN_API_KEY
$ default_model: auto
$ transport: chat_completions
$EOF

The command writes this file content:

~/.hermes/config.yaml
1model:
2 provider: joytoken
3 default: auto
4
5providers:
6 joytoken:
7 name: JoyToken
8 base_url: <JOY_TOKEN_OPENAI_BASE_URL>
9 key_env: JOY_TOKEN_API_KEY
10 default_model: auto
11 transport: chat_completions

Step 4: Verify

$hermes config check

Run one request:

$hermes chat \
> -q "Reply with exactly: pong" \
> --provider joytoken \
> -m auto \
> -Q \
> --ignore-rules

A successful response includes pong.

Hermes may also print Python package or security scanner warnings before the response. If the output includes pong, the JoyToken request succeeded.

JoyToken Check

PlaceExpected result
LogsRequest path is /openai/v1/chat/completions
API keyRequest is attributed to the key used by Hermes
UsageTokens and credits are recorded
ModelRequested model is auto

Common Errors

ErrorFix
401 UnauthorizedCheck JOY_TOKEN_API_KEY in ~/.hermes/.env
Hermes still calls another providerCheck model.provider: joytoken in ~/.hermes/config.yaml
Config check failsCheck that providers.joytoken.key_env is JOY_TOKEN_API_KEY
No JoyToken logsCheck that base_url is the JoyToken OpenAI-compatible URL

Resources