How to Configure Hermes Agent with DeepSeek, Ollama, or Claude: LLM Provider Setup Guide
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:
- Put the API key in the wrong file
- Used incorrect model name prefixes
- 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:
| Provider | Best For | Cost | Privacy |
|---|---|---|---|
| DeepSeek | Chinese users, cost-conscious | ~$0.14/1M tokens | Cloud |
| Ollama | Privacy-first, offline work | Free | Local |
| Claude | Best reasoning, coding | ~$15/1M tokens | Cloud |
| OpenRouter | Experimentation, flexibility | Pay-per-use | Cloud |
I use Ollama for local experiments, DeepSeek for daily work, and Claude for complex reasoning tasks.
Method 1: Interactive Setup (Recommended)
The easiest way is using the interactive wizard:
hermes setupThis guides you through:
- Select model provider from a list
- Enter your API key
- Configure basic preferences
For quick model switching:
hermes modelThis 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:
hermes config editOr 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:
hermes config set model deepseek/deepseek-chathermes config set DEEPSEEK_API_KEY sk-your-key-hereWhy 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:
# Start Ollama server FIRST (I forgot this many times)ollama serve
# In another terminal, configure Hermeshermes config set model ollama/llama3Benefits:
- 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:
hermes config set model claude/claude-3-5-sonnet-20241022hermes config set ANTHROPIC_API_KEY sk-ant-your-key-hereClaude 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:
hermes config set model openrouter/anthropic/claude-3.5-sonnethermes config set OPENROUTER_API_KEY sk-or-your-key-hereWhy 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:
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:
# CORRECTdeepseek/deepseek-chatollama/llama3claude/claude-3-5-sonnet-20241022openrouter/anthropic/claude-3.5-sonnet
# WRONG (I tried these)deepseek-chatllama3claude-3-5-sonnetMistake 2: API Key in Wrong File
# Check where your keys arecat ~/.hermes/.env # Keys SHOULD be here
# Don't put keys in config.yaml!# It's easy to accidentally commit that fileMistake 3: Ollama Not Running
I can’t count how many times I got “connection refused” errors:
# Start Ollama BEFORE using itollama serve
# Then configure Hermeshermes config set model ollama/llama3Mistake 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:
# Show current confighermes config
# Check environment variablescat ~/.hermes/.env
# Test the connectionhermes chat "Hello, are you working?"Related Knowledge
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:
- 👨💻 Hermes Agent GitHub
- 👨💻 Ollama
- 👨💻 DeepSeek Platform
Oh, and if you found these resources useful, don’t forget to support me by starring the repo on GitHub!
Comments