← Home

Guide

Hermes Agent + Claude: Use Anthropic's Claude Models with Hermes

Claude — Anthropic's model family — is one of the strongest choices for Hermes Agent. Opus 4.6 handles deep research and long-running tasks, Sonnet 4.6 is the everyday workhorse, and Haiku 4.5 delivers fast, low-cost responses.

What Is Claude?

Claude is Anthropic's family of large language models, known for nuanced reasoning, precise instruction-following, strong writing quality, and honest, helpful behavior. Unlike some competitors that optimize primarily for benchmark scores, Claude is designed with safety and usefulness together — qualities that matter a lot for agent workloads where the model makes decisions autonomously.

Hermes Agent supports Claude through two paths: the Anthropic API directly (via ANTHROPIC_API_KEY) or via OpenRouter (which routes to Claude with a single key that covers 200+ other models too).

Claude Model Lineup for Hermes

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 — recommended default200K tokens~$3/M tokens
Claude Haiku 4.5Fast responses, daily chat, high-volume messaging200K tokens~$0.80/M tokens

For most Hermes users, Claude Sonnet 4.6 is the right starting point. It handles tool calls reliably, produces high-quality responses at conversational speed, and costs roughly $3 per million input tokens. Upgrade to Opus when you need its reasoning depth; drop to Haiku when volume and speed matter more than depth.

Option 1: Hermes Agent on OpenClaw Launch (Easiest)

The fastest path to a Claude-powered Hermes Agent. No API key required, no Docker setup, no config file editing.

  1. Go to openclawlaunch.com/hermes-hosting and start a Hermes deploy.
  2. Select Claude Sonnet 4.6 (or Opus / Haiku) from the model dropdown.
  3. Connect your messaging channel — Telegram, Discord, WhatsApp, or others.
  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 in every Hermes plan — no separate Anthropic billing required unless you bring your own key.

Option 2: Anthropic API Direct (Self-Hosted)

If you're running Hermes on your own server with a direct Anthropic API key, set the environment variable and tell Hermes to use the anthropic provider:

# Hermes reads ANTHROPIC_API_KEY, ANTHROPIC_TOKEN,
# or CLAUDE_CODE_OAUTH_TOKEN — all three are accepted
export ANTHROPIC_API_KEY=sk-ant-...

# Set provider and default model via CLI
hermes inference set anthropic
hermes model set claude-sonnet-4.6

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

Get your API key from the Anthropic Console. Usage-based billing, no monthly minimum.

Option 3: Claude via OpenRouter (Self-Hosted)

OpenRouter lets you reach every Claude model with a single key, alongside GPT, Gemini, DeepSeek, Grok, and 200+ others. Useful when you want the flexibility to switch models without managing multiple API keys.

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

When to Choose Each Claude Model

Choose Claude Sonnet 4.6 for everyday agent use: answering questions, writing, research, coding, and multi-step tool calls. It handles complex requests well without the cost of Opus.

Choose Claude Opus 4.6 for demanding tasks that require sustained deep reasoning: long-horizon planning, multi-document analysis, complex code architecture decisions. Its 1M context window makes it especially powerful for tasks that involve large bodies of text.

Choose Claude Haiku 4.5 when speed and cost per message matter most — support bots with high message volume, quick Q&A, or fast triage workflows where responses don't need maximum depth.

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:

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

On OpenClaw Launch, the picker lists all curated Claude options alongside GPT, Gemini, Grok, DeepSeek, GLM, Kimi, MiniMax, and others.

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 routes through your account, with usage and billing under your direct control.

Hermes also accepts the CLAUDE_CODE_OAUTH_TOKEN env var, which lets a container authenticate using the same OAuth token issued to Claude Code subscribers — no separate API key needed if you already have a Claude paid plan.

Claude Direct vs OpenRouter for Hermes

FeatureAnthropic DirectOpenRouter
LatencyLowest (one hop)Slightly higher (proxy hop)
Models availableAnthropic Claude family only200+ models across all major providers
BillingAnthropic ConsoleUnified OpenRouter billing
Switching via /modelNeed separate keys for other providersOne key covers everything

Use the Anthropic API direct if you stay on Claude long-term and want the lowest latency. Use OpenRouter if you want to switch freely between Claude, GPT, Gemini, DeepSeek, and others through Hermes's /model command.

What's Next?

Deploy Hermes with Claude

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

Deploy Hermes