一键导入
hermes-provider-setup
Configure AI providers for Hermes — Nous Portal, OpenRouter, Anthropic, OpenAI, custom endpoints, multi-provider fallback, credential pools
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Configure AI providers for Hermes — Nous Portal, OpenRouter, Anthropic, OpenAI, custom endpoints, multi-provider fallback, credential pools
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Lightweight change-review discipline for the tentaflake repo — require a linked reason (issue/requirement), a verification step, and doc sync before any change is called done. Use when planning, implementing, or reviewing a change to the template.
Comprehensive reference for the tentaflake repository — all modules, options, lib functions, build targets, agent config, ISOs, and architecture. Use when working with the template itself, adding features, configuring hosts, or debugging the build.
Connect to and operate a tentaflake-built machine via Tailscale SSH. Use when remoting into a deployed tentaflake for maintenance, debugging, rebuilds, or inspection.
Manage Hermes Agent configuration — config.yaml, .env, profiles, terminal backends, models, tools, env substitution, migration
Manage Hermes memory (MEMORY.md, USER.md) and personality (SOUL.md, /personality) — persistence, capacity, context files, identity
Configure Hermes tools and toolsets — enable/disable per platform, manage backends, set truncation limits, browser, web, code exec
| name | hermes-provider-setup |
| description | Configure AI providers for Hermes — Nous Portal, OpenRouter, Anthropic, OpenAI, custom endpoints, multi-provider fallback, credential pools |
| version | 1.0.0 |
| platforms | ["linux","macos","windows"] |
| metadata | {"hermes":{"tags":["provider","model","setup","openrouter","anthropic","nous-portal"],"category":"devops","requires_toolsets":["terminal"]}} |
Tentaflake context: Inside a tentaflake agent container, you can run
hermes config setinteractively — but if your agent was defined with asettingsattrset inmy-agents.nix, theconfig.yamlinside the container is read-only (mounted:ro). Interactive changes are lost on restart. For a persistent configuration, put settings inmy-agents.nixinstead and rebuild. API keys always go in/run/secrets/hermes-<name>.env(or agenix), not viahermes config set.
| Provider | Auth | Best for |
|---|---|---|
| Nous Portal | OAuth (browser) | All-in-one: 300+ models + Tool Gateway (web, image, TTS, browser) |
| OpenAI Codex | OAuth (device code) | Codex models, ChatGPT subscribers |
| Anthropic | OAuth or API key | Claude models (Max plan + credits) |
| OpenRouter | API key | Multi-provider routing, 200+ models |
| Google AI Studio | API key | Gemini models |
| Custom Endpoint | API key + base URL | Self-hosted (Ollama, vLLM, SGLang, LM Studio) |
| DeepSeek | API key | DeepSeek models direct |
| AWS Bedrock | IAM role | Claude, Nova within AWS |
| GitHub Copilot | OAuth | Copilot subscription models |
| xAI | API key or OAuth | Grok models |
| z.ai / ZhipuAI | API key | GLM models |
| Kimi / Moonshot | API key | Kimi models |
| MiniMax | API key or OAuth | MiniMax models |
Minimum context: 64K tokens. Models with smaller windows rejected at startup.
Rule of thumb: If Hermes can't complete a normal chat, don't add features yet. Get one clean conversation working.
hermes setup --portal
This one command:
~/.hermes/auth.jsonhermes chatAfter setup, config looks like:
model:
provider: nous
default: anthropic/claude-sonnet-4.6
base_url: https://inference-api.nousresearch.com/v1
# OpenRouter — most flexible multi-provider
hermes config set OPENROUTER_API_KEY sk-or-...
# Anthropic — direct Claude access
hermes config set ANTHROPIC_API_KEY sk-ant-...
# OpenAI
hermes config set OPENAI_API_KEY sk-...
# Google Gemini
hermes config set GOOGLE_API_KEY AIza...
# or GEMINI_API_KEY
# DeepSeek
hermes config set DEEPSEEK_API_KEY sk-...
# xAI (Grok)
hermes config set XAI_API_KEY ...
# AWS Bedrock — uses IAM role or aws configure
# No API key needed
# GitHub Copilot
hermes config set COPILOT_GITHUB_TOKEN ghp_...
# Nous Portal
hermes portal # One-shot OAuth setup
hermes portal info # Check login status
hermes portal tools # Tool Gateway catalog
# Anthropic OAuth
hermes auth add anthropic --type oauth
# OpenAI Codex
hermes model → pick OpenAI Codex (device code flow)
# Google Gemini OAuth
hermes model → pick Google Gemini (OAuth)
# GitHub Copilot OAuth
hermes model → pick GitHub Copilot (OAuth)
# MiniMax OAuth
hermes model → pick MiniMax (OAuth)
# xAI Grok OAuth
hermes model → pick xAI Grok OAuth
# Qwen OAuth
hermes model → pick Qwen OAuth
For local/self-hosted models (Ollama, vLLM, SGLang, LM Studio, llama.cpp):
# Interactive
hermes model
# → Select: Custom endpoint
# → Enter base URL: http://localhost:11434/v1
# → Enter API key: ollama (or empty)
# → Enter model name: qwen3.5:27b
# → Context length: 64000
Or direct config:
model:
default: qwen3.5:27b
provider: custom
base_url: http://localhost:11434/v1
With per-model config:
custom_providers:
- name: "My Ollama"
base_url: "http://localhost:11434/v1"
models:
qwen3.5:27b:
context_length: 64000
llama3.2:3b:
context_length: 8192
Works with: Ollama, vLLM, SGLang, LM Studio, LocalAI, llama.cpp server, any OpenAI-compatible API.
model:
provider: openrouter
default: anthropic/claude-sonnet-4.6
fallbacks:
- provider: nous
model: anthropic/claude-sonnet-4.6
- provider: anthropic
model: claude-sonnet-4-6
Fallback chain engages on errors (rate limits, 5xx, connection drops). agent.api_max_retries controls retries before fallback:
agent:
api_max_retries: 3 # Default: 3 retries per provider before fallback
Set to 0 for fast failover (don't retry flaky endpoint, switch immediately).
hermes model # Full setup wizard — add/change providers
Inside session:
/model # Interactive picker
/model anthropic/claude-sonnet-4.6 # Switch model
/model openrouter:anthropic/claude-sonnet-4.6 # Switch provider + model
# Useful patterns:
/model google/gemini-3-pro-preview # Large context for long docs
/model openai/gpt-5.4 # Strong reasoning
/model deepseek/deepseek-v4-pro # Cost-effective coding
/model only shows providers already configured. Add new ones with hermes model from terminal.
Multiple API keys for same provider:
credential_pool_strategies:
openrouter: round_robin # Cycle through keys evenly
anthropic: least_used # Always pick least-used key
custom: fill_first # Use first key until exhausted
| Strategy | Behavior |
|---|---|
fill_first (default) | Use first key, fall to next on failure |
round_robin | Cycle keys evenly |
least_used | Always pick least-used |
random | Random selection |
providers:
openrouter:
request_timeout_seconds: 1800 # API call timeout
stale_timeout_seconds: 300 # Stale non-stream detection
models:
claude-sonnet-4:
timeout_seconds: 3600 # Model-specific override
stale_timeout_seconds: 600
| Timeout | Default | Config |
|---|---|---|
| Socket read | 120s | HERMES_STREAM_READ_TIMEOUT |
| Stale stream | 180s | HERMES_STREAM_STALE_TIMEOUT |
| Stale non-stream | 300s | providers.<id>.stale_timeout_seconds |
| API call | 1800s | providers.<id>.request_timeout_seconds |
Local model detection: Hermes auto-raises read timeout to 1800s, disables stale detection for local endpoints.
Minimum: 64,000 tokens. Set explicitly if auto-detect wrong:
model:
default: your-model-name
context_length: 131072
For local models, ensure server configured for enough context:
# llama.cpp
--ctx-size 65536
# Ollama
ollama run --num_ctx 64000
Summarization can use different (cheaper) model:
auxiliary:
compression:
provider: openrouter
model: google/gemini-3-flash-preview
base_url: null
Must have context window ≥ main model's. The compressor sends full middle section to summary model — smaller window causes silent context loss.
All secrets → ~/.hermes/.env:
OPENROUTER_API_KEY=sk-or-...
ANTHROPIC_API_KEY=sk-ant-...
GOOGLE_API_KEY=AIza...
All non-secrets → ~/.hermes/config.yaml:
model:
provider: openrouter
default: anthropic/claude-sonnet-4.6
hermes config set KEY VAL auto-routes to correct file.
# Test basic chat
hermes chat -q "hello"
# Test with specific provider
hermes chat --provider openrouter -q "hello"
# Test with specific model
hermes chat --model anthropic/claude-sonnet-4.6 -q "hello"
# Check provider config
hermes config show | head -20
# Full diagnostics
hermes doctor
/model only shows configured providers: Add new providers via hermes model from terminalHERMES_STREAM_READ_TIMEOUT=1800 if needed.env for conflicting entriesmodel.context_length explicitly for custom endpointsagent.api_max_retries 0 skips retries: Fast failover means no retries on transient errorsprovider: custom is first-class provider: Not an alias. Set provider: custom in config.yamlhermes auth add noushermes doctor # Check provider connectivity
hermes chat -q "hello" # Basic chat works
hermes config show | grep -A 10 model # Provider/model config
hermes portal info # (if using Portal)
# In session:
/model # Should show configured providers