Hermes Agent Gemini 4 setup takes about five minutes. Hermes Agent from Nous Research supports Google Gemini natively, and its model list already includes all three Gemini 4 models: Hydrogen, Argon and Carbon. You add a Google API key, run one command to pick the model, and Hermes maps its reasoning settings onto Gemini 4's thinking levels for you. This guide covers the setup, which Gemini 4 model to pick, the costs and the common errors.
📺 Watch: Google Just Released Gemini 4 Hydrogen!
🔥 Get the Agent OS as a free bonus: AI Profit Boardroom members get the full Agent OS zip, prompt libraries, daily tutorials and weekly live coaching calls. → Get inside
Everything here comes from the official Hermes Agent Google Gemini guide and Google's AI Studio model and pricing pages.
Which Gemini 4 Model to Use in Hermes
| Model ID in Hermes | What it's for | Free tier | Price per 1M tokens (input / output) |
|---|---|---|---|
| gemini-4-hydrogen | Fast Gemini 4 for everyday coding and agent work; has an xhigh thinking level | Yes | $1.50 / $7.50 |
| gemini-4-argon | Efficient frontier reasoning; 1M shared window and long decode | No | $2 / $10 until 30 Nov 2026, then $4 / $20 |
| gemini-4-carbon | Google's strongest reasoning model; paid tier only | No | $2 / $10 until 30 Nov 2026, then $4 / $20 |
All three have a 1M token context window. For most Hermes users, Hydrogen is the right default. Agents make several model calls per turn, and Hydrogen is the cheapest Gemini 4 model, with a free tier for testing. Google reports it scores 51 on the Artificial Analysis Intelligence Index at default, slightly above Argon's 50. Move to Argon or Carbon for the hardest reasoning tasks.
How to Set Up Hermes Agent With Gemini 4
Step 1: Get a Google API key
Create a key in Google AI Studio. If you want Argon or Carbon, attach it to a billing-enabled Google Cloud project, because neither has a free tier. Hermes recommends billing even for Hydrogen, since agent sessions make several calls per turn and free-tier limits run out fast.
Step 2: Add the key to Hermes
Hermes reads either GOOGLE_API_KEY or GEMINI_API_KEY. Put the key in your Hermes env file at ~/.hermes/.env as a line starting with GOOGLE_API_KEY=. No extra Python package is needed.
Step 3: Pick the provider and model
Run hermes model, choose "More providers", then "Google AI Studio", and select gemini-4-hydrogen, gemini-4-argon or gemini-4-carbon. Hermes probes your key during setup and warns you if it's a free-tier key.
Step 4: Start chatting
Run hermes chat. To switch models mid-session, type /model gemini-4-argon or any other configured model. Use the native IDs like gemini-4-hydrogen, not google/gemini-4-hydrogen.
Your config ends up in ~/.hermes/config.yaml with the provider set to gemini and the base URL set to Google's native v1beta endpoint. If you had an old /openai base URL override, remove it, because Hermes uses Google's native API path.
Want Julian's ready-made Hermes setups, skills and workflows? They're all inside the AI Profit Boardroom, with the Agent OS and weekly live coaching calls.
📺 Watch: Hermes Agent OS Can Automate EVERYTHING?! 🤯
Thinking Levels: How Hermes Maps Reasoning to Gemini 4
Gemini 4 models always think. You set how hard with the /reasoning command or the agent.reasoning_effort config key. For Argon and Carbon, Hermes maps its effort levels like this:
| Hermes effort | Gemini thinkingLevel | Output budget |
|---|---|---|
| none | low, thoughts hidden | Normal per-request cap |
| minimal, low | low | Normal per-request cap |
| medium | medium, Google's default | Normal per-request cap |
| high | high | Normal per-request cap |
| xhigh | high | 262,144 tokens with long decode |
| max, ultra | high | About 1M tokens minus input, with long decode |
Hydrogen works a little differently. It has its own xhigh level, and on Hydrogen the xhigh, max and ultra settings all send xhigh. Google's default for Hydrogen is high.
What long decode means
Without long decode, a single request caps at 65,536 output tokens when streaming and 32,768 when not, thinking included. At xhigh or max, Hermes raises the output limit, and when Gemini replies with a continuation signal, Hermes keeps resending until the model finishes. That lets one answer run far longer. Long decode only works on the AI Studio and Vertex express native endpoints. It doesn't run through OpenRouter, the /openai path or the OAuth Vertex provider.
For Gemini 4 at xhigh and above, Hermes stores the interaction on Google's side. Stored interactions are kept 55 days on paid tiers and 1 day on free tiers.
📺 Watch: Stop Finding Leads Manually! Use Hermes Agent
Using Gemini 4 Through Vertex AI
If your company uses Google Cloud, you can run Gemini 4 in Hermes through Vertex AI express mode. Set GEMINI_BASE_URL to the Vertex AI host. Argon and Carbon only run in the global location, so for those use the v1beta1 projects path with locations/global and your project ID. Vertex express keys start with "AQ." and only work with the Vertex base URL. A mismatch between key and host returns a 403 permission error.
There's also a separate OAuth-based Vertex AI provider in Hermes that needs no API key at all.
What to Build With Hermes Agent and Gemini 4
- A messaging assistant: run
hermes gateway setupthenhermes gateway startto put your Gemini-powered agent in Telegram, Slack, Discord or WhatsApp. - Daily reports: use Hermes cron to run a Hydrogen agent every morning and send results to your chat app.
- Long document work: use Argon or Carbon with the 1M token window for big contracts, research papers or whole codebases.
- A mixed team: let a Carbon or Argon agent plan, and Hydrogen subagents do the routine steps. That keeps most of your token spend on the cheapest model.
To compare Gemini 4 with Claude and other models before you pick one, check Goldie Bench. To connect Hermes into a full agent system, follow the Agent OS guide.
Troubleshooting Hermes Agent Gemini 4
- "Gemini native client requires an API key": add GOOGLE_API_KEY or GEMINI_API_KEY to ~/.hermes/.env and run
hermes modelagain. - "This Google API key is on the free tier": enable billing on the project, regenerate the key if needed, and rerun
hermes model. This is required for Argon and Carbon. - 404 model not found: rerun
hermes modeland pick a model your account can use. Carbon access may still be limited on some accounts. - Tool call schema errors: update Hermes. Older builds don't clean up tool schemas for Gemini.
- Not sure what's wrong: run
hermes doctor. It checks whether your key is set and your credentials resolve.
Want to skip the trial and error? Join the AI Profit Boardroom to copy Julian's tested Hermes workflows, with daily tutorials and weekly coaching.
FAQ
Does Hermes Agent support Gemini 4?
Yes. The Hermes Gemini provider lists gemini-4-hydrogen, gemini-4-argon and gemini-4-carbon in its model list.
Which Gemini 4 model is best for Hermes Agent?
Hydrogen for most work, because it's the cheapest Gemini 4 model and has a free tier. Use Argon or Carbon for the hardest reasoning.
Can I use Gemini 4 in Hermes for free?
Only Hydrogen has a free tier. Argon and Carbon need a billing-enabled project. Hermes warns that free-tier limits run out quickly in agent sessions.
How do I change thinking level for Gemini 4 in Hermes?
Use the /reasoning command or set agent.reasoning_effort in your config. Hermes maps it to Gemini's thinkingLevel automatically.
Can I use Gemini 4 in Hermes through OpenRouter?
You can use OpenRouter as a provider, but long decode only works on Google's native AI Studio and Vertex express endpoints.
That's the full Hermes Agent Gemini 4 setup: add your key, run hermes model, start with Hydrogen, and move up to Argon or Carbon when a task needs deeper thinking.











