Skip to main content

Hermes Agent

Hermes Agent is an open-source, terminal-native autonomous coding and task agent by Nous Research. It features persistent memory, agent-created skills, and a messaging gateway with 21 platform adapters (Telegram, Discord, Slack, Google Chat, WhatsApp, Signal, SMS, Email, and more).
AnyAPI is not a built-in provider in Hermes Agent. You configure it as a named custom OpenAI-compatible provider via the custom_providers: list.

Quick Start

1

Get your API key

Sign up at anyapi.ai and create an API key in the dashboard.
2

Store the key as a secret

Add the key to ~/.hermes/.env (Hermes keeps secrets separate from settings):
3

Run the provider wizard

When prompted:
  1. Select Custom endpoint (self-hosted / VLLM / etc.)
  2. Provider name: anyapi
  3. Base URL: https://api.anyapi.ai/v1
  4. API key env var: ANYAPI_API_KEY
  5. Default model: openai/gpt-4o (or any model from the AnyAPI catalog)
4

Start Hermes

Your agent now routes requests through AnyAPI.

Manual Configuration

For full control, edit the config files directly instead of using hermes model.

Set the API key

~/.hermes/.env:

Configure provider and model

~/.hermes/config.yaml:

Verify

Model Format

AnyAPI uses the vendor/model format. Always include the vendor prefix:
Browse all available models at anyapi.ai/ai-models or query the API:

Advanced Configuration

Set the context length for the default model:
For per-model overrides:
Hermes runs side LLM tasks (vision, compression, title generation, etc.) and lets you override the model per task:
Tasks not overridden inherit from the main model: block.
A list of backups Hermes tries when the primary model fails:
AnyAPI also exposes Anthropic’s /v1/messages format for Claude models:

Configuration Examples

Gateway Mode

When running Hermes as a messaging gateway (Telegram, Discord, Slack, etc.), the configuration is identical. Restart the service after changes:

Troubleshooting

Hermes can’t find your AnyAPI key.
  1. Verify the env file: grep ANYAPI ~/.hermes/.env
  2. Re-run the wizard: hermes model → Custom endpoint
  3. Confirm YAML uses key_env: ANYAPI_API_KEY (or the alias api_key_env:)
Your key is invalid, revoked, or has no credits.
  1. Validate the key at dash.anyapi.ai
  2. Check your balance/quota
  3. Reissue the key if needed
The model ID is unknown or missing the vendor prefix.
  1. List the live catalog: curl -H "Authorization: Bearer $ANYAPI_API_KEY" https://api.anyapi.ai/v1/models
  2. Use vendor/model form (e.g. openai/gpt-4o, not bare gpt-4o)
The endpoint must be exactly https://api.anyapi.ai/v1 — no trailing slash, no /chat/completions suffix (Hermes appends that automatically).
If Hermes warns about unknown YAML keys, check that you are using:
  • custom_providers: (plural list), not custom_provider:
  • auxiliary.<task>.provider, not auxiliary_providers:
  • model.context_length, not context_limits:
Check usage at dash.anyapi.ai, upgrade your plan, or route side tasks to cheaper models via auxiliary.*.

Best Practices

  1. Keep credentials in .env, never in config.yaml
  2. Configure fallbacks — AnyAPI gives you many providers behind one key, use them for resilience
  3. Route side tasks to small models — use auxiliary.* with cheaper models like openai/gpt-4o-mini
  4. Always use vendor/model format — bare model names will not resolve
  5. Monitor usage at dash.anyapi.ai

Support