Nous ResearchHermes Agent
Deploy Now

Use Hermes Agent with OpenRouter — Multi-Model Access

Connect Hermes Agent to OpenRouter for access to 100+ models including Claude, GPT-4, and Llama.

OpenRouter gives you access to 200+ models — Claude, GPT-4, Llama, Mistral, and more — through a single API key. It's the fastest way to try different models with Hermes and add automatic fallback when your primary model is down.

Before you start:

  • Hermes Agent installed
  • An OpenRouter account at openrouter.ai (free to sign up)
  • An OpenRouter API key from the dashboard
  • Credit added to your OpenRouter account (most models cost fractions of a cent per request)

Steps

  1. 1

    Get an OpenRouter API key

    Sign up at openrouter.ai and generate an API key from the dashboard

  2. 2

    Configure Hermes

    Set model: provider: openrouter and model: apiKey: your-key in config.yaml

  3. 3

    Choose your model

    Set model: name: to any supported model like nousresearch/hermes-3-llama-3.1-405b

  4. 4

    Set fallback models

    Configure model: fallback: with backup models in case primary is unavailable

  5. 5

    Start Hermes

    hermes start — requests route through OpenRouter to your chosen model

Pro Tips

  • 💡Set a spending limit in OpenRouter's dashboard to prevent unexpected bills — Hermes can be chatty with tools
  • 💡Use 'nousresearch/hermes-3-llama-3.1-405b' as your primary model for best tool-use performance with Hermes Agent
  • 💡Configure fallback models in config.yaml in case your primary is down or rate-limited

Troubleshooting

API key works in curl but fails in Hermes

Check for invisible characters or newlines in config.yaml. Use 'hermes config set model.apiKey YOUR_KEY' instead of editing the file directly.

Models return 402 Payment Required

Your OpenRouter balance is depleted. Add credits at openrouter.ai/credits. Some models like large Claude variants have higher per-token costs.

Rate limit errors during heavy use

Set 'model: rateLimit: 20' in config.yaml to limit requests per minute, or upgrade your OpenRouter tier for higher rate limits.

Related Guides