SuperAPI AI Directory

hermes-agent

Agents & models

View repository

Updated 10-15 15:45

About this skill

Hermes Agent Skill v2.0

Overview

This Skill encapsulates the NousResearch Hermes Agent CLI invocation capabilities, enabling WorkBuddy/Claw to leverage Hermes' core functionality through Shell commands.

v2.0 improvement: fully portable, no hardcoded paths, supports one-click installation for any instance.


First-time installation

One-click installation (recommended)

When Hermes is detected as not installed, run:

# 安装 Hermes Agent(自动克隆、创建虚拟环境、创建 CLI 入口)
bash ~/.workbuddy/skills/hermes-agent/scripts/install_hermes.sh
Or customize the installation directory

bash ~/.workbuddy/skills/hermes-agent/scripts/install_hermes.sh --prefix ~/custom/path


安装脚本会自动:
1. ✅ 检测 Python 3.11+ 环境
2. ✅ 克隆 Hermes Agent 源码
3. ✅ 创建 Python 虚拟环境并安装依赖
4. ✅ 创建 `~/.local/bin/hermes` CLI 入口
5. ✅ 初始化 `~/.hermes/` 配置目录
6. ✅ 生成默认 `.env` 配置模板

### 安装后配置 API Key

```bash
# 编辑配置文件,填入你的 API Key
nano ~/.hermes/.env

Optional providers (choose one):

# 智谱 AI(推荐国内用户)
GLM_API_KEY=your-key-here

# OpenRouter(支持多种模型)
OPENROUTER_API_KEY=sk-or-v1-your-key-here

# Anthropic
ANTHROPIC_API_KEY=sk-ant-your-key-here

# OpenAI
OPENAI_API_KEY=sk-your-key-here

Verify installation

# 确认 PATH 包含 hermes
export PATH="$HOME/.local/bin:$PATH"
hermes --version

# 运行诊断
hermes doctor

Migrate to another Claw instance

Simply copy the entire Skill directory to the target instance:

# 在目标实例上执行:
cp -r /path/to/hermes-agent ~/.workbuddy/skills/hermes-agent
bash ~/.workbuddy/skills/hermes-agent/scripts/install_hermes.sh
# 然后配置 API Key

Core workflow

1. Invocation mode quick reference

Scenario Command Description
Quick Q&A hermes run "问题" --non-interactive --no-stream Simplest invocation
With context hermes run "问题" --context-file ./ctx.md --non-interactive Inject project context
Sub-agent delegation Use scripts/hermes_delegate.sh Complex task decomposition
Skill query hermes skills list View learned skills
Memory search hermes memory search "关键词" Retrieve historical knowledge
Status check hermes status or hermes doctor Diagnose installation status

2. Complete CLI command reference

Basic commands

# 启动交互式对话
hermes

# 单轮执行(WorkBuddy 集成首选)
hermes run "prompt" [选项]

# 非交互模式选项
--non-interactive    # 关闭交互式 TUI(必需)
--no-stream          # 禁用流式输出,返回完整结果
--context-file PATH  # 注入上下文文件
--toolset NAME       # 限制使用的工具集
--model MODEL        # 指定模型
--timeout SECONDS    # 超时时间(默认300秒)

Sub-agent delegation

# 通过 wrapper 脚本调用(推荐)
./scripts/hermes_delegate.sh \
  --task "分析竞品A和B的产品特性" \
  --tools "web_search,browser,file_write" \
  --timeout 300 \
  --output ./result.md

# 直接在 hermes run 中使用 delegate_task 工具
hermes run '使用delegate_task工具,任务是:分析XXX,工具限制:web_search,browser' \
  --non-interactive --no-stream

Memory management

# 搜索历史记忆
hermes memory search "关键词"

# 查看所有笔记
hermes memory notes list

# 添加手动笔记
hermes memory notes add "重要发现:..."

# 导出/导入记忆
hermes memory export ./backup/
hermes memory import ./backup/

Skill management

hermes skills list                           # 列出所有技能
hermes skills create my-skill --description "描述"  # 创建新技能
hermes skills edit my-skill                  # 编辑技能
hermes skills remove my-skill                # 删除技能

Plugin management

hermes plugins list                    # 列出插件
hermes plugins install user/repo       # 安装插件
hermes plugins enable/disable/update/remove plugin-name

Scheduled tasks (Cron)

hermes cron list                       # 列出定时任务
hermes cron add --name "日报" --cron "0 9 * * *" --message "生成总结"
hermes cron pause/resume/remove TASK_ID

MCP integration

hermes mcp serve --port 8080           # 启动 MCP Server
hermes mcp connect <server-config>     # 连接外部 MCP 服务

Wrapper scripts

scripts/hermes_wrapper.sh

Unified CLI wrapper script, providing JSON-formatted output and error handling:

./scripts/hermes_wrapper.sh [命令] [参数...]

# 示例
./scripts/hermes_wrapper.sh run "分析内容" --timeout 60
./scripts/hermes_wrapper.sh memory search "关键词"
./scripts/hermes_wrapper.sh status

Output format: JSON (includes the success, output, error, duration_ms field)

scripts/hermes_delegate.sh

Dedicated script for sub-agent delegation:

./scripts/hermes_delegate.sh --task "任务描述" [选项]

# 可选选项
--tools "tool1,tool2"      # 限制可用工具集
--timeout 300              # 超时时间(秒)
--output ./result.md        # 输出文件路径
--max-concurrent 3         # 最大并发数(默认3)
--context-file ./ctx.md     # 额外上下文文件
-v                         # 详细输出

scripts/install_hermes.sh

One-click installation script (see the "First-time installation" section above for details):

bash scripts/install_hermes.sh [--skip-deps] [--prefix DIR]

Model configuration

Run the interactive configuration wizard:

hermes model

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

model:
  provider: zai           # 可选: openrouter, anthropic, openai, zai, gemini 等
  default: "glm-5"        # 默认模型
  base_url: "https://api.z.ai/api/paas/v4"  # 自定义 API 地址

Supported providers:openrouter, anthropic, openai, gemini, zai, kimi-coding, nous, custom


Best practices

✅ Recommended practices

  1. Always use --non-interactive --no-stream: avoid TUI blocking
  2. Set a reasonable timeout: 60s for simple tasks, 300s for complex tasks
  3. Limit the toolset: use --toolset to reduce Token consumption
  4. Use context files: put large amounts of background information into files rather than in the prompt
  5. Error retry mechanism: automatically retry 1-2 times on network issues

⚠️ Notes

  1. Token cost: every invocation has a cost
  2. Concurrency limit: at most 3 concurrent sub-agents
  3. Timeout protection: long-running tasks must have a timeout set
  4. API Key security: do not hardcode keys in Skill files
  5. Python version: Ensure Python 3.11+ is used

Troubleshooting

Issue Solution
command not found: hermes Run export PATH="$HOME/.local/bin:$PATH" or re-run install_hermes.sh
TypeError: unsupported operand Ensure Python 3.11+
API Key error Check ~/.hermes/.env configuration
Connection timeout Check the network, or switch LLM provider
Sub-agent failure Reduce --max-concurrent or increase --timeout
Install script failure Run hermes doctor diagnostics

File structure

hermes-agent/
├── SKILL.md                    # 本文件(Skill 说明文档)
├── _meta.json                  # Skill 元数据(可移植性声明)
├── scripts/
│   ├── install_hermes.sh       # 一键安装脚本(通用)
│   ├── hermes_wrapper.sh       # 统一 CLI 封装(动态路径检测)
│   └── hermes_delegate.sh      # 子代理委托脚本(动态路径检测)
└── references/                 # 参考文档

Changelog

  • v2.0.0 (2026-04-12): Fully portable version — remove all hardcoded paths, add one-click install script, support migration of any Claw instance
  • v1.0.0 (2026-04-11): Initial version, supports basic CLI invocation, sub-agent delegation, memory/skill management