Antbase/Documentation
Back to Agents

Hermes Agent

An open-source autonomous coding CLI by Nous Research. Hermes Agent is OpenAI-compatible and configured via a single YAML file — connect it to ANT for intelligent routing across every coding task, with automatic model selection, failover, and cost optimization.

Why route Hermes through ANT

Point Hermes at a single endpoint and get the whole model ecosystem behind it:

  • 20,000+ models across 30+ providers — one API key, no per-provider setup
  • Automatic cross-provider failover — if a provider errors, ANT re-routes to the next-best model
  • Anthropic-style prompt caching — cut cost and latency on repeated context
  • Cost-based routing — spend goes to the cheapest capable model for each task
  • Per-request routing traces in the dashboard — see which model ran, and why
  • $5 free credits on signup, plus truly-free models via ant:free

One-Command Install

Run this in your terminal. It opens a browser device-auth flow, then auto-writes your Hermes config — the API key is delivered back to the CLI automatically, so there's zero copy-paste.

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

Done!

The installer writes ~/.hermes/config.yaml with ANT as the model provider. Run hermes to start.

Configuration

Prefer manual setup? Create a key at antbase.ai/app (keys start with ant_) and write ~/.hermes/config.yaml:

# Antbase — intelligent AI routing (https://antbase.ai)
# base_url is set explicitly so Hermes calls Antbase directly.
model:
  default: ant:coder
  provider: custom
  base_url: https://antbase.ai/v1
  api_key: ant_your_key_here
  context_length: 200000

Always set base_url. When it's present, Hermes ignores the provider field and calls that endpoint directly. Without it, a bare provider: custom can fall through to OpenRouter if OPENROUTER_API_KEY is set — a known Hermes bug.

Then start the agent:

hermes

Model Recommendations

Set any of these virtual models as your model.default. We recommend ant:coder for day-to-day agentic coding:

ant:coder

Recommended default — tuned for coding tasks

ant:auto

Smart routing — ANT picks the best model for each prompt

ant:best

Maximum quality — complex reasoning, architecture

ant:fast

Optimized for speed — quick queries, autocomplete

ant:free

Zero-cost — uses free-tier provider models only

ant:reasoning

Thinking tasks — extended reasoning models

For the full list of virtual models, weight configurations, and usage examples, see Virtual Models.

Next Steps

For the step-by-step setup, config reference, and troubleshooting, see the Hermes integration guide. You can also learn more on the Hermes landing page.