Hermes Agent

Run Hermes Agent on AnyRouter with the provider plugin and one API key.

Hermes Agent (GitHub) is a terminal coding agent from Nous Research. Use the AnyRouter provider plugin to run it on any AnyRouter model with one key.

Set up

  1. Install and enable the plugin from the Hermes plugin catalog:

    bash
    hermes plugins install anyrouter --enable
  2. Add your key (from anyrouter.dev) to ~/.hermes/.env:

    bash
    ANYROUTER_API_KEY=sk-ar-your-anyrouter-key
  3. Pick a model, either interactively or per run:

    bash
    hermes model
    hermes --provider anyrouter -m anyrouter/hermes
  4. Or make it the default in ~/.hermes/config.yaml:

    yaml
    model:
      provider: anyrouter
      default: anyrouter/hermes
  5. Check it works: hermes plugins list shows anyrouter enabled, and your next hermes chat message appears in your request logs.

Without the catalog, install from git with hermes plugins install AnyRouterHQ/hermes-provider-anyrouter/anyrouter, or pip install git+https://github.com/AnyRouterHQ/hermes-provider-anyrouter.git.

Models

anyrouter/hermes is the agentic default. It is an AnyRouter routing model, not a Nous model: it routes to the best available tool-calling model and falls back automatically. It bills at the underlying model's rate.

ModelNotes
anyrouter/hermesBest tool-calling models, with fallback
anyrouter/autoTop-usage platform models; tools optional, so not for agent loops
anyrouter/latestLatest stable chat model
moonshotai/kimi-k31M context, agentic
deepseek/deepseek-v4-flashFast, reasoning-capable

The picker lists only routes with tool calling, read live from https://anyrouter.dev/api/v1/models. Switch mid-session with /model; this resets the prompt cache.

Provider routing

Hermes forwards its provider_routing block as extra_body.provider:

yaml
provider_routing:
  sort: throughput   # price (default) | throughput | latency
  # only: [anthropic]
  # ignore: [deepinfra]
  # data_collection: deny

See Provider Routing for all fields.

Optional settings

Set in ~/.hermes/.env:

  • ANYROUTER_BASE_URL: overrides https://anyrouter.dev/api/v1 (proxy or relay). The picker then stops filtering by tool support.
  • ANYROUTER_APP_ATTRIBUTION=1: credit Hermes traffic in public app rankings. Off by default.

AnyRouter MCP in Hermes

Add the MCP server to ~/.hermes/config.yaml to browse models, check credits and manage keys from the agent:

yaml
mcp_servers:
  anyrouter:
    url: https://anyrouter.dev/api/v1/mcp
    auth: oauth

Hermes opens a browser on first use. For headless agents, replace auth: oauth with a bearer key from ~/.hermes/.env:

yaml
    headers:
      Authorization: "Bearer ${ANYROUTER_MCP_KEY}"

An sk-ar-v1-* key from /dashboard/keys grants list_models only; an ak_* management key from /dashboard/settings#keys grants the scopes you assign. Run /reload-mcp after editing. The endpoint is remote HTTP only (no stdio).

Troubleshooting

SymptomFix
unknown provider: anyrouterRun hermes plugins list; enable the plugin, then start a new session.
Model 'x' not foundRun hermes model for the live list of tool-capable routes.
429Agent loops can burst past the per-key limit. Back off and retry; see Rate Limits.
402No credit left or upstream out of capacity. Check your balance or pick another model.

AnyRouter routes requests to third-party models. Models and outputs are provided as is, with no warranty; you use them at your own risk. Disclaimer