← Home

Guide

Hermes Agent + Anthropic: Use Claude Models with Hermes

Connect Hermes Agent to Anthropic's Claude family — Opus 4.6, Sonnet 4.6, and Haiku 4.5 — for strong reasoning, writing, and tool-calling across every messaging channel Hermes supports.

What Is Anthropic?

Anthropic is an AI safety company that builds the Claude family of large language models. Claude is widely regarded as one of the strongest models for instruction-following, long-context reasoning, and tool use — all qualities that matter for agent workloads.

Hermes Agent (built by Nous Research) supports Anthropic through three paths: the Anthropic API directly, via OpenRouter, or with zero configuration on OpenClaw Launch.

Available Anthropic Models

ModelBest ForContextCost (Input)
Claude Opus 4.6Complex reasoning, research, long-running agent tasks1M tokens~$15/M tokens
Claude Sonnet 4.6Best balance of speed and quality — default pick200K tokens~$3/M tokens
Claude Haiku 4.5Fast responses, daily chat, low cost200K tokens~$0.80/M tokens

Option 1: Hermes Agent on OpenClaw Launch (Easiest)

The fastest way to get a Claude-powered Hermes Agent. No API key, no Python install, no Docker config — just pick a model and click deploy.

  1. Go to openclawlaunch.com/hermes-hosting and start a Hermes deploy.
  2. Pick Claude Sonnet 4.6 (or Opus / Haiku) from the model dropdown.
  3. Connect Telegram, Discord, WhatsApp, or any other channel you want.
  4. Click Deploy. Your Claude-powered Hermes Agent is live in roughly 10 seconds.
Tip: OpenClaw Launch routes Claude requests through OpenRouter automatically. AI credits are included — no separate Anthropic billing required.

Option 2: Anthropic API Direct (Self-Hosted)

If you're running Hermes on your own server with the upstream hermes-agent install and have an Anthropic API key, you can wire Hermes directly to Anthropic. Hermes's built-in anthropic provider reads the standard env vars:

# Set the API key (use ANTHROPIC_API_KEY, ANTHROPIC_TOKEN,
# or CLAUDE_CODE_OAUTH_TOKEN — Hermes accepts all three)
export ANTHROPIC_API_KEY=sk-ant-...

# Tell Hermes which provider and model to use as default
hermes inference set anthropic
hermes model set claude-sonnet-4.6

# Or edit /opt/data/config.yaml directly:
# inference:
#   provider: anthropic
# model:
#   default: claude-sonnet-4.6

Get your API key from the Anthropic Console. Billing is usage-based with no minimum commitment.

Option 3: Anthropic via OpenRouter (Self-Hosted)

OpenRouter is a unified gateway to 200+ models, including every Anthropic Claude model. Useful when you want one API key that can switch between Claude, GPT, Gemini, DeepSeek, Grok, and more without rewiring providers.

export OPENROUTER_API_KEY=sk-or-...

hermes inference set openrouter
hermes model set anthropic/claude-sonnet-4.6

# config.yaml equivalent:
# inference:
#   provider: openrouter
# model:
#   default: anthropic/claude-sonnet-4.6

Get your OpenRouter key from openrouter.ai/keys. OpenRouter bills you in one place for all upstream providers.

Anthropic Direct vs OpenRouter for Hermes

FeatureAnthropic DirectOpenRouter
LatencyLowest (one hop)Slightly higher (proxy hop)
Models availableAnthropic only200+ models, all major providers
BillingAnthropic ConsoleUnified OpenRouter billing
Switching providers in /modelNeed separate keys per providerOne key covers everything
Rate limitsAnthropic tier-basedOpenRouter managed

Recommendation: use OpenRouter if you switch between models often or want one bill for everything. Use Anthropic direct if you stay on Claude long-term and want the lowest latency.

BYOK on OpenClaw Launch

On managed OpenClaw Launch deploys, you can use your own Anthropic or OpenRouter key instead of bundled AI credits. In the configurator, choose BYOK and paste your key — all Hermes inference will route through your account, with usage and billing under your direct control.

Hermes also supports auth-based flows beyond plain API keys. The CLAUDE_CODE_OAUTH_TOKEN env var lets a Hermes container authenticate against Claude using the same OAuth token issued to Claude Code subscribers, so users on the Claude paid plan can plug their existing token in without managing a separate API key.

Switching Models at Runtime

Hermes supports a built-in /model command in chat that switches the active model without restarting the gateway. From any connected channel (Telegram, Discord, web UI):

/model anthropic/claude-haiku-4.5
/model anthropic/claude-opus-4.6
/model anthropic/claude-sonnet-4.6

On OpenClaw Launch the picker lists all curated Anthropic options alongside GPT, Gemini, Grok, DeepSeek, GLM, Kimi, MiniMax, and others — the same model set the dashboard offers.

What's Next?

Deploy Hermes with Claude

Get a Claude-powered Hermes Agent running in 10 seconds on OpenClaw Launch.

Deploy Hermes