Skip to content

How to Configure Hermes Agent with DeepSeek, Ollama, or Claude: LLM Provider Setup Guide

A digital artwork depicting the synergy between the human brain and artificial intelligence

When I first started using Hermes Agent, I was confused by the model configuration. The documentation mentioned multiple providers but didn’t clearly explain how to switch between them. After some trial and error, I figured out the patterns. Let me share what I learned.

The Problem: Too Many LLM Providers, Confusing Configuration

Hermes Agent supports many LLM backends—DeepSeek, Ollama, Claude, OpenRouter, Alibaba DashScope, and more. But here’s the thing: each provider has different setup requirements, different API key locations, and different model name formats.

I made several mistakes:

  1. Put the API key in the wrong file
  2. Used incorrect model name prefixes
  3. Forgot to start Ollama before configuring it

These mistakes cost me hours of debugging. Let me save you that time.

Choosing the Right Provider

Your choice depends on what matters most to you:

ProviderBest ForCostPrivacy
DeepSeekChinese users, cost-conscious~$0.14/1M tokensCloud
OllamaPrivacy-first, offline workFreeLocal
ClaudeBest reasoning, coding~$15/1M tokensCloud
OpenRouterExperimentation, flexibilityPay-per-useCloud

I use Ollama for local experiments, DeepSeek for daily work, and Claude for complex reasoning tasks.

The easiest way is using the interactive wizard:

Terminal
hermes setup

This guides you through:

  1. Select model provider from a list
  2. Enter your API key
  3. Configure basic preferences

For quick model switching:

Terminal
hermes model

This is what I use most of the time. Simple and foolproof.

Method 2: Manual Configuration

Sometimes you need more control. Here’s how to configure manually.

First, open the config file:

Terminal
hermes config edit

Or directly edit ~/.hermes/config.yaml.

Important: Store API keys in ~/.hermes/.env, NOT in config.yaml. I learned this the hard way when I accidentally committed my API key to Git.

DeepSeek Configuration

DeepSeek is my go-to for cost-effective AI work:

Terminal
hermes config set model deepseek/deepseek-chat
hermes config set DEEPSEEK_API_KEY sk-your-key-here

Why DeepSeek?

  • Cheap: ~$0.14/1M tokens (Claude is ~$15/1M)
  • Good Chinese language support
  • Stable API in China

The tradeoff: reasoning quality isn’t as strong as Claude for complex tasks.

Ollama Local Model Configuration

For complete privacy, nothing beats local models:

Terminal
# Start Ollama server FIRST (I forgot this many times)
ollama serve
# In another terminal, configure Hermes
hermes config set model ollama/llama3

Benefits:

  • Zero cost - no API fees
  • Complete privacy - data never leaves your machine
  • Works offline - airplane coding sessions
  • No rate limits - run as much as you want

Tradeoffs:

  • Requires decent GPU/RAM
  • Smaller models = weaker reasoning
  • Setup complexity

Claude Configuration

When I need the best reasoning quality:

Terminal
hermes config set model claude/claude-3-5-sonnet-20241022
hermes config set ANTHROPIC_API_KEY sk-ant-your-key-here

Claude excels at:

  • Complex multi-step reasoning
  • Code generation and review
  • Following detailed instructions

The downside: cost. At ~$15/1M tokens, I reserve Claude for high-value tasks.

OpenRouter Configuration

OpenRouter is like a buffet—access to 200+ models:

Terminal
hermes config set model openrouter/anthropic/claude-3.5-sonnet
hermes config set OPENROUTER_API_KEY sk-or-your-key-here

Why I love OpenRouter:

  • Switch models without changing API keys
  • Experiment with new models easily
  • Pay-per-use across all providers

Auxiliary Models: The Hidden Cost Saver

Here’s something I discovered later: Hermes uses separate models for “side tasks”:

  • Vision/image analysis
  • Web content extraction
  • Skill matching

These don’t need premium models. By default, Hermes auto-detects and uses Gemini Flash (free tier available). But you can customize:

~/.hermes/config.yaml
auxiliary:
vision:
model: gemini/gemini-1.5-flash
api_key: ${GOOGLE_API_KEY}
delegation:
model: deepseek/deepseek-chat
api_key: ${DEEPSEEK_API_KEY}

Why this matters: If you don’t configure auxiliary models, vision tasks might use your expensive Claude subscription. That’s wasteful for simple image analysis.

Common Mistakes I Made

Mistake 1: Wrong Model Name Format

Each provider has a specific prefix:

Model name formats
# CORRECT
deepseek/deepseek-chat
ollama/llama3
claude/claude-3-5-sonnet-20241022
openrouter/anthropic/claude-3.5-sonnet
# WRONG (I tried these)
deepseek-chat
llama3
claude-3-5-sonnet

Mistake 2: API Key in Wrong File

Terminal
# Check where your keys are
cat ~/.hermes/.env # Keys SHOULD be here
# Don't put keys in config.yaml!
# It's easy to accidentally commit that file

Mistake 3: Ollama Not Running

I can’t count how many times I got “connection refused” errors:

Terminal
# Start Ollama BEFORE using it
ollama serve
# Then configure Hermes
hermes config set model ollama/llama3

Mistake 4: Ignoring Auxiliary Models

Without auxiliary model config, I was burning through my Claude budget on simple image analysis tasks. Configure it once, save money forever.

Verifying Your Configuration

After setup, always verify:

Terminal
# Show current config
hermes config
# Check environment variables
cat ~/.hermes/.env
# Test the connection
hermes chat "Hello, are you working?"

Why use local models? Besides privacy, local models like Ollama work without internet. I’ve coded on flights, in remote cabins, and during outages. The freedom is worth the initial setup complexity.

Token pricing comparison (as of 2026):

  • DeepSeek: ~$0.14/1M tokens (input), ~$0.28/1M (output)
  • Claude 3.5 Sonnet: ~$3/1M tokens (input), ~$15/1M (output)
  • Ollama: Free (but you pay for hardware/electricity)

Regional considerations: In China, Claude and some providers may have access issues. DeepSeek and DashScope (Alibaba) are reliable alternatives.

Summary

Configuring Hermes Agent with different LLM providers is straightforward once you understand the patterns. Use hermes setup for guided configuration, or edit ~/.hermes/config.yaml and ~/.hermes/.env for manual control. Remember: model names need provider prefixes, API keys go in .env, and configure auxiliary models to save costs on side tasks.

Final Words + More Resources

My intention with this article was to help others share my knowledge and experience. If you want to contact me, you can contact by email: Email me

Here are also the most important links from this article along with some further resources that will help you in this scope:

Oh, and if you found these resources useful, don’t forget to support me by starring the repo on GitHub!

Comments