Hermes Agent Config Files
After installation, all configuration and data are stored in ~/.hermes/ the following:
~/.hermes/
├── config.yaml # 主配置文件(模型、工具、终端后端等)
├── .env # API 密钥和 Secret(不提交到版本库)
├── auth.json # OAuth 凭据(Nous Portal 等)
├── SOUL.md # Agent 人格设定文件
├── memories/ # 持久记忆(MEMORY.md、USER.md)
├── skills/ # 技能文件(Agent 自动创建和管理)
├── cron/ # 定时任务配置
├── sessions/ # 网关会话记录
└── logs/ # 日志(API 密钥自动脱敏)
Important principle:
- Secrets (API keys, Tokens, passwords) -> stored in
.env - General configuration (models, tools, terminal backend, etc.) -> stored in
config.yaml - Use
hermes config set KEY VALUECommands are automatically routed to the correct file
Choose a model provider
Run the following command to enter interactive selection:
hermes model
Recommended path: Nous Portal (the easiest)
One subscription covers 300+ models + Tool Gateway (web search, image generation, TTS, cloud browser), without separately applying for multiple API Keys:
hermes setup
After running, log in via OAuth to automatically complete provider configuration and enable the tool gateway.
Overview of common providers
| Provider | Feature | Configuration method |
|---|---|---|
| Nous Portal | Subscription-based, 300+ models, Tool Gateway | hermes setup --portal OAuth login |
| Anthropic | Claude series, OAuth available with a Max subscription | ANTHROPIC_API_KEY or OAuth |
| OpenAI Codex | ChatGPT OAuth, Codex models | hermes model → OAuth Device Code |
| OpenRouter | Multi-provider routing, 200+ models | OPENROUTER_API_KEY |
| xAI Grok OAuth | SuperGrok / Premium+ subscription, no API Key required | hermes model → xAI Grok OAuth |
| GitHub Copilot | Copilot subscription (GPT, Claude, Gemini) | hermes model → OAuth |
| Google AI Studio | Gemini series | GOOGLE_API_KEY |
| DeepSeek | DeepSeek series | DEEPSEEK_API_KEY |
| Local models (Ollama) | Fully local, no cost | Set a custom Base URL |
Model context window requirements: Hermes requires the model to support at least 64,000 tokens of context. When using local models, make sure the startup parameters set a large enough context size (e.g.
--ctx-size 65536).
Switch providers
You can switch anytime without changing any code:
hermes model
Three Setup modes
First run hermes setup you will be prompted to choose an initialization mode:
Mode 1: Quick Setup (Nous Portal)
Free OAuth login, automatically configures the model + Tool Gateway (web search, image generation, TTS, browser).Recommended for new users.
Mode 2: Full Setup
Manually configure providers, toolsets, messaging platforms, etc. item by item. For users with specific needs and their own API Key.
Mode 3: Blank Slate
Keep only the minimal runtime set (providers, file tools, terminal tools), with everything else turned off. For advanced users who need precise control over the Agent's capability boundaries. Blank mode explicitly writes the configuration to prevent hermes update new features from being automatically enabled afterwards.
Start the first conversation
After configuration is complete, start Hermes:
hermes # 经典 CLI 模式
hermes --tui # 现代 TUI 模式(推荐,支持鼠标、弹窗等)
After startup, a welcome banner is shown with information about the current model, available tools, and loaded skills.
Verify everything works
Test with a simple but specific prompt:
检查我当前目录,告诉我里面有哪些文件,并识别主要的项目入口文件。
Signs of success:
- The banner correctly shows the model/provider you selected
- The Agent responds normally with no error messages
- Tools can be invoked when needed (terminal, file reading, etc.)
- The conversation can last more than one turn
Verify session recovery
Confirm that cross-session continuity works properly:
检查我当前目录,告诉我里面有哪些文件,并识别主要的项目入口文件。
Basic TUI operations
Run hermes --tui After entering modern TUI mode, common operations:
| Operation | Keyboard shortcut |
|---|---|
| Send the message | Enter |
| Newline in multi-line input | Alt+Enter or Ctrl+J |
| Interrupt the Agent's current task | After typing a new message directly Enter |
| Force interrupt | Ctrl+C |
| View all commands | Input / Trigger autocomplete |
Core slash commands
| Command | Purpose |
|---|---|
/help |
Show all available commands |
/tools |
List currently enabled tools |
/model |
Switch models at runtime |
/memory |
View and manage Agent memory |
/skills |
View and manage skills |
/save |
Save the current conversation |
/new |
Start a new session (keeping current settings) |
/verbose |
Switch tool-call verbosity level |
/voice on |
Enable voice input mode |
Terminal execution backend configuration
Hermes supports six terminal execution environments, determining where the Agent's Shell commands run:
| Backend | Where Commands Are Executed | Isolation level | Applicable scenarios |
|---|---|---|---|
local(default) |
Direct execution on the local machine | None | Development, personal use |
docker |
Inside a Docker container | Full isolation | Secure sandbox, CI/CD |
ssh |
Remote server | Network boundary | Remote development, high-performance machines |
modal |
Modal cloud sandbox | Full (cloud VM) | Temporary cloud computing, evaluation |
daytona |
Daytona workspace | Full (cloud container) | Managed cloud development environment |
singularity |
Singularity container | Namespace isolation | HPC clusters, shared machines |
Switch to the Docker backend (recommended for production)
hermes config set terminal.backend docker
or edit directly ~/.hermes/config.yaml:
terminal:
backend: docker
docker_image: "nikolaik/python-nodejs:python3.11-nodejs20"
Security note: The default
localbackend gives the Agent the same filesystem permissions as you. If you want to limit the Agent's scope of operations, switching to thedockerbackend is the simplest and most effective way.
Toolset management
Hermes groups 70+ built-in tools into 28 toolsets, which can be enabled or disabled as needed:
hermes tools # 打开可视化工具集管理界面(curses UI)
Main toolsets
| Toolset | Included capabilities |
|---|---|
filesystem |
File read/write, directory operations |
terminal |
Shell command execution |
web |
Web search, content extraction |
browser |
Full browser automation (requires Playwright) |
code |
Code execution (execute_code tool) |
vision |
Image analysis |
audio |
Speech-to-text, TTS |
memory |
Memory management tools |
skills |
Skill management tools |
mcp |
MCP server toolset (dynamic) |
Disable a toolset: The toolset disappears completely from the system prompt, not just disabled - this saves Token and prevents the Agent from misusing tools it should not use.
Common configuration management commands
# 查看当前完整配置
hermes config
# Open config.yaml with editor
hermes config edit
# Set a single configuration value (automatically routes to the correct file)
hermes config set model anthropic/claude-sonnet-4-6
hermes config set terminal.backend docker
hermes config set OPENROUTER_API_KEY sk-or-... # 自动存入 .env
# Check if any configuration items introduced in the new version are not filled
hermes config check
# Interactive completion of missing configuration
hermes config migrate
# Diagnose all configuration issues
hermes doctor
# Update to the latest version
hermes update
Troubleshooting common problems
Problem 1:hermes: command not found
# 刷新 Shell 配置
source ~/.bashrc # 或 source ~/.zshrc
# If still not found, check PATH
echo $PATH
# Ensure ~/.local/bin is in it
export PATH="$HOME/.local/bin:$PATH"
Problem 2:API key not set / Model not responding
# 重新配置提供商
hermes model
# Or set the API Key directly
hermes config set OPENROUTER_API_KEY sk-or-...
Problem 3: Empty or garbled replies
Possibly an issue with provider authentication or model selection:
# 重新选择模型
hermes model
# Full diagnosis
hermes doctor
Problem 4: Insufficient context window error
Hermes requires the model to support at least 64K Token context. Switch to a model that supports a larger context, or increase the context parameter when using local models (e.g. Ollama:OLLAMA_NUM_CTX=65536).
Problem 5:hermes --continue Old session not found
# 查看所有会话
hermes sessions list
# Confirm current Profile
hermes profile list
Universal recovery toolkit
If you run into any weird problems, follow these steps in order:
hermes doctor # 1. 诊断
hermes model # 2. 检查模型配置
hermes setup # 3. 重新向导配置
hermes sessions list # 4. 查看会话状态
hermes --continue # 5. 尝试恢复会话
hermes gateway status # 6. 检查网关状态(如已启用)
Advanced configuration preview
After completing the basic installation, the following features can be enabled as needed (covered in detail in later chapters):
Connect messaging platforms
hermes gateway setup # 交互式配置 Telegram、Discord、Slack 等
hermes gateway # 启动消息网关
Enable voice mode
# 安装语音依赖
cd ~/.hermes/hermes-agent
uv pip install -e ".[voice]"
# Enable in CLI
/voice on
# Start recording with Ctrl+B
Connect MCP servers
in ~/.hermes/config.yaml add the following:
mcp_servers:
github:
command: npx
args: ["-y", "@modelcontextprotocol/server-github"]
env:
GITHUB_PERSONAL_ACCESS_TOKEN: "ghp_xxx"
hermes mcp # 交互式管理 MCP 服务器
Editor integration (ACP)
hermes acp # 启动编辑器 Agent 模式(VS Code / Zed / JetBrains)
Quick command reference
| Command | Description |
|---|---|
hermes |
Start a CLI conversation |
hermes --tui |
Start a TUI conversation (recommended) |
hermes desktop |
Start the desktop app |
hermes model |
Select/switch LLM provider and model |
hermes setup |
Full Setup wizard |
hermes setup --portal |
Quickly configure Nous Portal |
hermes tools |
Configure toolsets |
hermes doctor |
Diagnose configuration issues |
hermes update |
Update to the latest version |
hermes gateway |
Start the messaging gateway |
hermes gateway setup |
Configure messaging platforms |
hermes --continue |
Resume the most recent session |
hermes config set KEY VAL |
Set a configuration item |
hermes sessions list |
View session history |
hermes profile list |
View Agent Profile |