Run Hermes Agent on Any of 20,000+ Models — One Command, Zero Copy-Paste
·6 min read
🪽

Run Hermes Agent on Any of 20,000+ Models — One Command, Zero Copy-Paste

Hermes is one of the fastest-growing open-source coding agents — and like most agents it ships hardwired to a single provider. One command points it at Antbase and it inherits automatic cross-provider failover, prompt caching, cost routing, and a routing trace for every request across 20,000+ models. Here's the 30-second setup.

Coding AgentsHermesDevelopersGuide

Hermes has quietly become one of the biggest open-source coding agents out there — autonomous, terminal-native, and growing fast. But like almost every agent, it ships wired to a single provider: no failover when that provider rate-limits mid-run, no cost routing, no visibility into what each request actually cost. Point Hermes at Antbase instead and none of that is your problem anymore.

One command, nothing to paste

The installer runs a secure browser device-authorization flow, mints a CLI key, hands it straight back to your terminal, and writes your Hermes config for you. There is no key to copy, no file to edit.

bash
curl -fsSL https://antbase.ai/hermes.sh | bash

It opens your browser to approve, then writes ~/.hermes/config.yaml automatically. Run hermes and you are on Antbase — routing across 20,000+ models across 30+ providers.

What it writes

Hermes is OpenAI-compatible, so Antbase is a drop-in at the /v1 endpoint. The config it generates looks like this:

yaml
# ~/.hermes/config.yaml
model:
  default: ant:coder
  provider: custom
  base_url: https://antbase.ai/v1
  api_key: ant_your_key_here
  context_length: 200000

One detail matters: always set base_url. When base_url is present, Hermes calls that endpoint directly and ignores the provider field. Leave it out with provider: custom and Hermes can silently fall through to OpenRouter if OPENROUTER_API_KEY happens to be set in your environment — a common source of "why is it billing the wrong place?" confusion. The install script always sets it for you.

What you get the moment you switch

  • •Automatic cross-provider failover — a rate-limit or error mid-run is retried on another provider; Hermes never sees it.
  • •Prompt caching passthrough — long agent context is cached at the provider where supported, so tool loops cost a fraction of full re-reads.
  • •Cost-based routing — Antbase picks the cheapest provider that clears the quality bar for each request.
  • •A routing trace for every request — model, provider, latency, tokens, and cost, in your dashboard.
  • •$5 in free credits on signup, and truly-free models via ant:free.

Pick how every request routes

Change one line — model.default — to switch routing strategy. ant:coder is tuned for coding agents and is the recommended default, but you can point Hermes at any of these virtual models, or pin a specific model id:

  • •ant:coder — coding-tuned, strong tool-use models, balanced cost (recommended).
  • •ant:auto — Antbase classifies each request and routes to the best fit.
  • •ant:best — always the strongest available model, cost secondary.
  • •ant:fast — lowest-latency models for snappy interactive edits.
  • •ant:free — runs entirely on the free-tier pool, zero cost.
  • •ant:reasoning — routes to reasoning models for planning-heavy tasks.

See every decision

Because Hermes now runs through Antbase, every request lands in your dashboard with the model and provider that served it, how long it took, how many tokens it used, what it cost, and — when a provider failed — which fallback caught it. No more guessing what your agent is spending or why a run stalled.

Get started

Grab a key from your dashboard (or just run the one-liner, which mints one for you), and Hermes is on 20,000+ models with failover on every request. Kick the tires on the routing in the playground first if you like:

Try ANT routing today

Drop-in OpenAI-compatible API. Change your base URL and every request gets intelligent routing across 30+ providers.