← Home

Guide

Hermes Agent + Grok: Use xAI Grok Models with Hermes

xAI's Grok models — Grok 4.6, Grok 4.20 and Grok 4.1 Fast — bring strong reasoning and real-time knowledge to Hermes Agent. Grok is built by Elon Musk's xAI team with a focus on wit, directness, and cutting-edge model capability.

What Is xAI Grok?

xAI is an AI lab founded by Elon Musk and a team of researchers focused on building advanced AI systems. Their Grok model family is known for strong reasoning capability, a direct communication style, and integration with X (Twitter) data for real-time knowledge. Grok 4.6, released on 12 August 2026, is xAI's current flagship — a 500K context window and, per xAI, the fastest model it has shipped. Grok 4.20 remains available, and Grok 4.1 Fast is the speed-optimized budget variant.

Hermes Agent supports Grok through its built-in xAI provider, which reads the XAI_API_KEY env var and routes to https://api.x.ai/v1. Grok models are also available via OpenRouter.

Available Grok Models

Model IDBest ForNotes
x-ai/grok-4.6Long agent runs, coding, research, STEMCurrent xAI flagship (12 Aug 2026). 500K context, $2 / $6 per 1M tokens
x-ai/grok-4.20Complex reasoning, research, demanding agent tasksOlder flagship, still available
x-ai/grok-4.3Everyday agents, long documents, cost-sensitive workCheapest capable Grok here, 1M-token context

For most Hermes agent tasks, Grok 4.6 is the recommended pick. xAI reports it matching GPT-5.6 Sol on the Artificial Analysis Intelligence Index and leading on CursorBench, DeepSWE and APEX-Agents, while trailing on Terminal-Bench. Grok 4.1 Fast trades some capability for significantly lower latency, which is useful for high-frequency chat or real-time response scenarios.

Option 1: Hermes Agent on OpenClaw Launch (Easiest)

Grok 4.6, Grok 4.20 and Grok 4.3 are available in the OpenClaw Launch model picker. No xAI account or API key required.

  1. Go to openclawlaunch.com/hermes-hosting and start a Hermes deploy.
  2. Select Grok 4.6 for the flagship, or Grok 4.3 if you are optimising for cost, from the model dropdown.
  3. Connect your channel and click Deploy. Your Grok-powered Hermes Agent is live in roughly 30 seconds.
Tip: switch between Grok 4.6 and Grok 4.3 at runtime with the /model command — useful for comparing quality vs latency on your specific tasks.

Option 2: xAI API Direct (Self-Hosted)

Hermes's built-in xAI provider reads XAI_API_KEY and routes to xAI's API:

export XAI_API_KEY=xai-...

# Pick the provider and default model (interactive wizard)
hermes model

# config.yaml equivalent:
# model:
#   provider: x-ai
#   default: grok-4.6

Get your xAI API key from the xAI Console. The API base URL is https://api.x.ai/v1 and the interface is OpenAI-compatible.

Option 3: Grok via OpenRouter (Self-Hosted)

Grok models are available on OpenRouter if you prefer a single key across all providers:

export OPENROUTER_API_KEY=sk-or-...

# Pick the provider and default model (interactive wizard)
hermes model

Grok vs Claude vs GPT for Hermes

ModelReasoning DepthReal-Time KnowledgeWriting StyleCost
Grok 4.20ExcellentStrong (X data access)Direct, wittyModerate
Claude Sonnet 4.6ExcellentTraining cutoff onlyNuanced, careful~$3/M
GPT-5.6 TerraExcellentTraining cutoff onlyClear, versatileHigher

Grok's differentiator is its connection to X (Twitter) data for more current information and its direct communication style. If your Hermes agent needs to discuss recent events or trending topics, Grok's real-time knowledge is a meaningful advantage over Claude and GPT.

Switching to Grok at Runtime

/model x-ai/grok-4.20
/model x-ai/grok-4.3

What's Next?

Deploy Hermes with Grok

Get a Grok-powered Hermes Agent running in 30 seconds on OpenClaw Launch.

Deploy Hermes