Field notes · AI agents, Hermes & Claude Code By Julian Goldie

Hermes Agent Gemini 4 Setup: Keys, Model Choice, Effort Mapping, Long Decode and Fallbacks

The complete operator setup for running Gemini 4 models inside Hermes Agent.

Get The AI Profit Stack Join AIPB →
  • 01 1,000+ done-for-you AI agent workflows
  • 02 5 live coaching calls / week with me
  • 03 7-day refund, cancel anytime
  • 04 3,400+ AI operators inside

Hermes Agent Gemini 4 setup takes about five minutes: add a Google AI Studio API key to ~/.hermes/.env, run hermes model, choose Google AI Studio and pick gemini-4-hydrogen, gemini-4-argon or gemini-4-carbon.

Get Your Backlink Gameplan →Try Polar Rank Free for 3 Days →

The details that matter for operators are which Gemini 4 model to default to, how Hermes maps its effort levels onto Gemini's thinking levels, and when long decode switches on.

If you want agents like this working on your SEO, get your Backlink Gameplan, or try Polar Rank free for 3 days.

Everything below follows the Hermes Google Gemini guide and Google's Gemini 4 model pages.

Before you start

  • A Google AI Studio API key, created at aistudio.google.com/apikey.
  • A billing-enabled Google Cloud project; the guide warns the free tier is too small for long agent sessions because Hermes can make several model calls per turn.
  • Hermes Agent installed; the native Gemini provider needs no extra Python package.
  • Note that you cannot sign in to Hermes with a consumer Gemini subscription; the provider takes an API key, or Vertex AI billing for Google Cloud projects.

Quick start

# 1. add your key (GEMINI_API_KEY also works)
echo "GOOGLE_API_KEY=your-key-here" >> ~/.hermes/.env

# 2. pick the provider and model
hermes model
#   More providers... -> Google AI Studio -> gemini-4-hydrogen

# 3. check it, then chat
hermes doctor
hermes chat

hermes model checks your key tier and lists the Gemini models it can reach.

If you prefer editing config by hand, this is what ends up in ~/.hermes/config.yaml:

model:
  default: gemini-4-hydrogen
  provider: gemini
  base_url: https://generativelanguage.googleapis.com/v1beta

Use Gemini's native IDs such as gemini-4-hydrogen, not OpenRouter-style IDs like google/gemini-4-hydrogen, when the provider is gemini.

Which Gemini 4 model to run

ModelHermes model IDRoleTier
Gemini 4 Hydrogengemini-4-hydrogenFast model for everyday coding and agent work; adds an xhigh thinking levelFree and paid
Gemini 4 Argongemini-4-argonFlagship reasoning; shared 1M input and output window, long decodePaid
Gemini 4 Carbongemini-4-carbonStrongest reasoning; more thinking per turn than Argon at the same pricePaid only

Google's changelog dates general availability as Argon on 13 October, Carbon on 10 November and Hydrogen on 12 November 2026.

Hydrogen costs less per token than Argon and Carbon, which share pricing, so it is the natural default for a busy gateway; promote hard turns to Argon or Carbon with /model.

Get Your Backlink Gameplan →Try Polar Rank Free for 3 Days →

🔥 Running Hermes with Gemini 4 across your business? Inside the AI Profit Boardroom you get step-by-step video trainings, the installable Agent OS, four coaching calls a week and 3,400+ members testing the newest models on real business work. → Join the AI Profit Boardroom

How Hermes effort maps to Gemini thinking

Hermes effortArgon / Carbon thinkingLevelHydrogenOutput budget
none, minimal, lowlowlowPer-request cap
mediummedium (Google's default)mediumPer-request cap
highhighhigh (Google's default)Per-request cap
xhighhighxhigh262,144 tokens with long decode
max, ultrahighxhigh1,048,576 minus input, long decode

Set effort with /reasoning in a session or agent.reasoning_effort in config.

Note the defaults differ: Google defaults Argon and Carbon to medium thinking but Hydrogen to high, so the same Hermes effort can cost noticeably different amounts across the three.

Long decode for very long outputs

Without long decode, one Gemini request stops at 65,536 output tokens when streaming and 32,768 when not, thinking included.

At xhigh or max, Hermes raises the output budget and, when a request hits the cap with budget left, resends it with Google's continuation token until the model finishes, joining the hops into one reply, as Google's long decode docs describe.

Two caveats: long decode only runs on the native AI Studio and Vertex AI express endpoints, not Google's OpenAI-compatible endpoint, OpenRouter or the OAuth Vertex provider; and those requests are stored by Google for its standard period, 55 days on paid and 1 day on free, because continuation needs a stored interaction.

Every other Gemini request goes through the Interactions API with store: false, so Google keeps no copy.

Vertex AI express keys and Argon

Google now issues AQ.-prefixed keys for both AI Studio and Vertex AI express, so Hermes no longer guesses from the key shape; the base URL decides.

For an express key, add GEMINI_BASE_URL=https://aiplatform.googleapis.com to ~/.hermes/.env; a 403 PERMISSION_DENIED usually means key and host are crossed.

Gemini 4 Argon is served only in the global location, so on express use the project-scoped URL ending /projects/<project>/locations/global.

Get Your Backlink Gameplan →Try Polar Rank Free for 3 Days →

Earlier Hermes builds rerouted AQ. keys automatically; that is gone, so existing express users must set the base URL once.

📞 Want agents growing your organic traffic? Get your Backlink Gameplan and we will map where Hermes and Gemini 4 fit into your SEO and AI search work, or try Polar Rank free for 3 days. Backlink Gameplan or try Polar Rank free for 3 days

Fallbacks so Gemini never stalls a session

fallback_providers:
  - provider: gemini
    model: gemini-4-argon
  - provider: anthropic
    model: claude-opus-5-5

Hermes tries fallback entries in order when the primary hits rate limits, overload, auth failures or connection drops, per its fallback docs.

Gemini entries accept gemini, google, google-gemini or google-ai-studio as the provider name.

Since v0.23.0, a Gemini safety block also moves the turn to the fallback model instead of ending it, and hermes fallback check --live sends one small request per entry to prove the chain works.

Messaging gateway

hermes gateway setup
hermes gateway start

Gemini works on every Hermes gateway platform, including Telegram, Discord, Slack and WhatsApp, reading the same config.yaml.

Troubleshooting

ErrorFix
"Gemini native client requires an API key"Add GOOGLE_API_KEY or GEMINI_API_KEY to ~/.hermes/.env, then rerun hermes model
"This Google API key is on the free tier"Enable billing on the key's Cloud project, regenerate if needed, rerun hermes model
404 model not foundModel not enabled for your account, region or key; pick another in hermes model
Tool calls fail with schema errorsUpgrade Hermes and rerun hermes model
Requests going to the /openai endpointSet GEMINI_BASE_URL to the native v1beta URL or remove it
403 PERMISSION_DENIEDKey and host crossed; match AI Studio keys to the default host and express keys to aiplatform

What the native adapter does for you

Hermes keeps its own agent loop in OpenAI-shaped messages and translates each request to Gemini's native schema: messages become contents, system prompts become systemInstruction, tool schemas become functionDeclarations and tool results become functionResponse parts.

Union types such as ["number", "null"] are rewritten into Gemini's scalar-plus-nullable form, and multi-type unions survive through anyOf, so MCP tools work without changes.

For Gemini 3 and later, Hermes preserves the thoughtSignature values on function-call parts and replays them on the next tool turn, which keeps multi-step tool loops valid.

Get Your Backlink Gameplan →Try Polar Rank Free for 3 Days →

Choosing the API per model

providers:
  gemini:
    gemini_api: auto              # default: Interactions for Gemini 3+
    models:
      gemini-4-hydrogen:
        gemini_api: interactions

Per the Hermes guide, AI Studio requests for Gemini 3 and later go through the Interactions API by default, while Gemini 2.x and Gemma use generateContent; a per-model setting wins over the provider-wide one and applies on the next request without a restart.

Vertex AI express and proxy base URLs always use generateContent, since Interactions only exists on the AI Studio host.

Billing quirks of long decode

Every long-decode hop re-reads the prompt plus the output so far, so the summed input count Google bills is far larger than the real context.

Hermes prices those summed counts but feeds the first hop's prompt size to context compaction and the context meter, so a long-decode turn does not trigger an early compaction.

Google's caching docs add that Gemini 4 supports implicit caching on prompts of 4,096 tokens or more, with a 95% discount on cache hits, but not explicit caching.

Keep stable instructions at the top of the system prompt so long agent sessions hit the implicit cache.

Resilience settings worth tuning

  • Credential pools rotate multiple keys for the same provider before any cross-provider fallback.
  • When a rate-limit response names a reset time, the primary is benched until exactly then; otherwise backoff runs from 60 seconds up to four hours.
  • fallback.min_switch_reset_seconds skips the switch when the primary reopens soon, avoiding pointless provider hops.
  • Auxiliary tasks such as vision and compression resolve providers independently, so they can stay on Gemini while chat falls back.

All four are documented in the fallback providers page.

Pricing window on Carbon

Google put Carbon on an introductory rate until 30 November 2026, per its model page; after that its per-token price matches Argon's.

If you are load-testing Carbon this month, re-check your cost model in December before rolling it out across a gateway.

Recommended operator setup

  1. Default to gemini-4-hydrogen at medium effort for gateway traffic.
  2. Escalate to gemini-4-carbon or gemini-4-argon with /model for hard reasoning.
  3. Reserve xhigh and max for jobs that genuinely need very long outputs, remembering they are stored by Google.
  4. Add at least one non-Google fallback and run hermes fallback check --live weekly.
  5. Run hermes doctor after every Hermes upgrade.

Members of the AI Profit Boardroom get the Agent OS on Hermes with model routing already set up.

Get Your Backlink Gameplan →Try Polar Rank Free for 3 Days →

FAQ: Hermes Agent Gemini 4 Setup

How do I use Gemini 4 in Hermes Agent?

Add GOOGLE_API_KEY to ~/.hermes/.env, run hermes model, choose More providers then Google AI Studio, and pick a Gemini 4 model.

Which Gemini 4 model should Hermes use by default?

Gemini 4 Hydrogen for everyday agent work; it is the fastest and lowest-priced Gemini 4 model. Use Argon or Carbon for hard reasoning.

Can I use the Gemini free tier with Hermes?

Hydrogen is on the free tier, but the Hermes guide warns free quotas run out after a handful of agent turns. Carbon is paid only.

Does long decode work through OpenRouter?

No. Long decode only runs on the native AI Studio and Vertex AI express endpoints.

Can I sign in with my Gemini subscription?

No. Hermes takes a Gemini API key, or Vertex AI credentials for Google Cloud billing.

📺 Video notes + links to the tools 👉

🎥 Learn how I make these videos 👉

🆓 Get a FREE AI Course + Community + 1,000 AI Agents 👉

About Julian

I'm Julian Goldie, an SEO entrepreneur, author and founder of the AI Profit Boardroom, which has 3,400+ members.

I help business owners scale with AI agents, automation and SEO.

  • I've built a 7-figure SEO and link building agency, Goldie Agency, with a team of 70+ SEO experts.
  • I've grown a YouTube channel to 400,000+ subscribers.
  • I wrote "Link Building Mastery".
  • My Udemy courses have taught over 29,000 students.

→ Get my best AI training inside the AI Profit Boardroom

Default to Hydrogen, escalate when needed and add a fallback, and Hermes Agent Gemini 4 runs smoothly; for SEO help, get your Backlink Gameplan, or try Polar Rank free for 3 days.

§ Member reviews

What members say about the AI Profit Boardroom

Read the member reviews on Skool →
Ahmad Bukhari: Julian doesn't gatekeep. That's why I'd recommend this group. He's extremely active here, sharing what's working right now and jumping in to help anyone who's stuck. If he can give it away, he does. He keeps the vibe positive and pushes everyone to help each other. His challenges reward members for getting people unstuck, so the whole room shares knowledge, not just him. Want a generous, positive place to learn AI and actually use it? This is it. Thanks Julian!
Ahmad Bukhari
Julian doesn't gatekeep. That's why I'd recommend this group. He's extremely active here, sharing what's working right now and jumping in to help anyone who's stuck. If he can give it away, he does. He keeps the vibe positive and pushes everyone to help each other. His challenges reward members for getting people unstuck, so the whole room shares knowledge, not just him. Want a generous, positive place to learn AI and actually use it? This is it. Thanks Julian!

Still a paying member after 1 month

Jay Parsons: There are so many helpful members in this amazing community ready to help out with suggestions and solutions whenever someone asks a question. I am amazed at the progress I have made in learning AI. I came here to learn how to use AI better and apply what I learned to my business. I am learning so much more than I even dreamed of. I have built an Agentic OS and use it every day, and I have no background in coding. There are an incredible amount of useful tutorials on everything AI.
Jay Parsons
There are so many helpful members in this amazing community ready to help out with suggestions and solutions whenever someone asks a question. I am amazed at the progress I have made in learning AI. I came here to learn how to use AI better and apply what I learned to my business. I am learning so much more than I even dreamed of. I have built an Agentic OS and use it every day, and I have no background in coding. There are an incredible amount of useful tutorials on everything AI.

Still a paying member after 11 months

Brian O'Connor: At 47, with 30 years in sales and finance, embracing AI was exciting but overwhelming. While building a business to help others adopt AI, I found myself chasing tools and fearing I was falling behind. Julian and the AI Profit Boardroom helped me refocus through practical, personalized advice and a supportive community. I now feel more confident adapting to change while staying focused on my goals. Thank you, Julian, for bringing this community together!
Brian O'Connor
At 47, with 30 years in sales and finance, embracing AI was exciting but overwhelming. While building a business to help others adopt AI, I found myself chasing tools and fearing I was falling behind. Julian and the AI Profit Boardroom helped me refocus through practical, personalized advice and a supportive community. I now feel more confident adapting to change while staying focused on my goals. Thank you, Julian, for bringing this community together!

Still a paying member after 2 months

Neil Martin: This is a truly amazing community, thanks in no small part to Julian's prodigious output and tireless efforts to provide value to his subscribers. Nothing is too much trouble for him. If you ask a question it gets answered in short order usually with a custom video. I have been in quite a few groups and this level of service is unparalleled. If you are serious about getting an AI education, you need to be in this group!
Neil Martin
This is a truly amazing community, thanks in no small part to Julian's prodigious output and tireless efforts to provide value to his subscribers. Nothing is too much trouble for him. If you ask a question it gets answered in short order usually with a custom video. I have been in quite a few groups and this level of service is unparalleled. If you are serious about getting an AI education, you need to be in this group!

Still a paying member after 7 months

Crystal Hill: AIPB has inspired me to go beyond learning AI as individual tools, skills, and prompts, and start thinking in terms of larger systems. What I really appreciate is how responsive Julian is and how quickly the material evolves with the technology. You’re being exposed to the right tools and ideas as they emerge. AIPB has given me the confidence to learn, experiment, build, and think much bigger about what’s really possible with AI.
Crystal Hill
AIPB has inspired me to go beyond learning AI as individual tools, skills, and prompts, and start thinking in terms of larger systems. What I really appreciate is how responsive Julian is and how quickly the material evolves with the technology. You’re being exposed to the right tools and ideas as they emerge. AIPB has given me the confidence to learn, experiment, build, and think much bigger about what’s really possible with AI.

Still a paying member after 5 months

Maurice Morrison: AI Profit Board Room has been a game-changer. The insights are practical, timely, and focused on turning AI into real business results—not just theory or hype. The community is supportive, the guidance is clear, and I leave every session with ideas I can actually apply. If you’re serious about using AI to grow smarter and move faster, this is absolutely worth joining.
Maurice Morrison
AI Profit Board Room has been a game-changer. The insights are practical, timely, and focused on turning AI into real business results—not just theory or hype. The community is supportive, the guidance is clear, and I leave every session with ideas I can actually apply. If you’re serious about using AI to grow smarter and move faster, this is absolutely worth joining.

Still a paying member after 2 months

Jeremy Murdock: I have truly enjoyed my experience here. The group of folks on the calls is quite diverse and I find it comforting to know that I am not the only one going through the changes that are happening at a faster and faster pace. I have chosen to embrace the change and go full force into integrating AI and what I have learned form the group and Julian. I am also impressed and appreciative that he actually takes the time to help with challenges I have along the way and get involved personally!
Jeremy Murdock
I have truly enjoyed my experience here. The group of folks on the calls is quite diverse and I find it comforting to know that I am not the only one going through the changes that are happening at a faster and faster pace. I have chosen to embrace the change and go full force into integrating AI and what I have learned form the group and Julian. I am also impressed and appreciative that he actually takes the time to help with challenges I have along the way and get involved personally!

Still a paying member after 10 months

Michael Lovitch: I have been a part of a million ai groups in Skool for years now. They are all okay and have helped, but usually they get out of date and don't offer real service to help you through especially at the beginning. This group is different, Julian actually answers questions which is crazy! And although ai marketing moves at the speed of light, they stay current and actually help you keep up… Highly recommended!
Michael Lovitch
I have been a part of a million ai groups in Skool for years now. They are all okay and have helped, but usually they get out of date and don't offer real service to help you through especially at the beginning. This group is different, Julian actually answers questions which is crazy! And although ai marketing moves at the speed of light, they stay current and actually help you keep up… Highly recommended!

Still a paying member after 3 months

Hoebing Lo: I don't know of any other community that is as active and sharing. Julian is a star and he answers so many questions in lightning speed. If you want a great place to start with AI here it is. No question too simple. No workflow too complicated. The community is about action and results not education so if you are looking to win at AI then come for the ride of a lifetime!
Hoebing Lo
I don't know of any other community that is as active and sharing. Julian is a star and he answers so many questions in lightning speed. If you want a great place to start with AI here it is. No question too simple. No workflow too complicated. The community is about action and results not education so if you are looking to win at AI then come for the ride of a lifetime!

Still a paying member after 5 months

Darren Wagstaff: Very responsive... great personal support (not an ai chat bot). Very clear straight forward trainings in easy to understand actionable language. I'm in numerous Skool groups but this one has the most human and real community by far. No question gets ignored. You never fell like just another number. It's great to see so many members getting great results with Ai.
Darren Wagstaff
Very responsive... great personal support (not an ai chat bot). Very clear straight forward trainings in easy to understand actionable language. I'm in numerous Skool groups but this one has the most human and real community by far. No question gets ignored. You never fell like just another number. It's great to see so many members getting great results with Ai.

Still a paying member after 2 months

Rod Martin: Julian is brilliant, and more prolific than I can keep up with (which is a great thing). His AgentOS is remarkable, and he is THE go-to guy for what you can really do (and not do) with the ever-increasing deluge of new AI upgrades and tools. HIGHLY recommend.
Rod Martin
Julian is brilliant, and more prolific than I can keep up with (which is a great thing). His AgentOS is remarkable, and he is THE go-to guy for what you can really do (and not do) with the ever-increasing deluge of new AI upgrades and tools. HIGHLY recommend.

Still a paying member after 5 months

Yosuke Sato: The best Skool course you get for AI! I have attended a few Skool courses before, but AI Profit Boardroom is the most active community and has great support from the management team, including Julian! You can get the most up-to-date information and practical implementations in this community. I highly recommend this!
Yosuke Sato
The best Skool course you get for AI! I have attended a few Skool courses before, but AI Profit Boardroom is the most active community and has great support from the management team, including Julian! You can get the most up-to-date information and practical implementations in this community. I highly recommend this!

Still a paying member after 19 months

⚑ Next step

Ready to run AI agents that actually do the work?

Join 3,400+ operators inside the AI Profit Boardroom. Get 1,000+ plug-and-play AI agent workflows, 5 coaching calls a week, and a community that holds you accountable.

Join The AI Agent Community →

7-day no-questions refund · Cancel anytime

Found this useful? Get more of this site in your Google.

One tap adds us as a preferred source — Google then shows you our posts more often in Search, Top Stories, and AI Overviews.

← Back to all posts