Hermes Agent Integration
Hermes Agent is an open-source autonomous coding CLI by Nous Research. It's OpenAI-compatible, so it drops straight onto ANT for intelligent routing across every coding task. For the full agent overview, see Agents > Hermes or the Hermes landing page.
Automatic Setup
Run this command in your terminal. It opens a browser device-auth flow, then writes your Hermes config automatically — the API key is delivered straight back to the CLI, so there's zero copy-paste.
curl -fsSL https://antbase.ai/hermes.sh | bashDone!
The installer writes ~/.hermes/config.yaml with ANT as the model provider. Run hermes to start.
Manual Configuration
Prefer to configure it yourself? Create an API key at antbase.ai/app (keys start with ant_), then write your ~/.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: 200000Always set base_url. When base_url is present, Hermes ignores the provider field and calls that endpoint directly. This is the robust path.
Without it, a bare provider: custom can fall through to OpenRouter if OPENROUTER_API_KEY is set in your environment — a known Hermes bug.
Antbase is OpenAI-compatible for Hermes — the endpoint is https://antbase.ai/v1 (Chat Completions).
Usage
Once configured, just start the agent — ANT handles routing transparently:
# Start Hermes Agent
hermesTo change which virtual model handles your requests, set a different model.default in ~/.hermes/config.yaml — for example ant:best for maximum quality or ant:free for zero-cost models.
Virtual Models
Set any of these as your model.default:
ant:coderRecommended default — tuned for coding tasks
ant:autoSmart routing — ANT picks the best model for each prompt
ant:bestMaximum quality — complex reasoning, architecture
ant:fastOptimized for speed — quick queries, autocomplete
ant:freeZero-cost — uses free-tier provider models only
ant:reasoningThinking tasks — extended reasoning models
Full list of virtual models, weights, and examples: Virtual Models. You can also create custom model groups with Nests.
Troubleshooting
Hermes calls OpenRouter instead of Antbase
Make sure base_url: https://antbase.ai/v1 is set in ~/.hermes/config.yaml. With base_url present, Hermes ignores the provider field and calls Antbase directly. If it still routes elsewhere, unset OPENROUTER_API_KEY in your environment.
401 Unauthorized errors
Check that your API key is correct in config.yaml and starts with ant_. You can regenerate keys from the dashboard.
Where do I see routing traces?
Every request is logged with a per-request routing trace in the dashboard — you can see which model handled each call and why.
For more, see the full Hermes agent guide.