Hermes Agent — Nous Research 智能AI代理
Hermes Agent 是由 Nous Research 开发的开源智能AI代理框架,支持多平台消息、可扩展技能、记忆系统和定时任务。以下速查表覆盖从入门到高级的全部核心功能。
基础操作 {#basic}
### 查看帮助
``bash
hermes --help
`
### 查看版本
`bash
hermes --version
`
### 启动交互会话
`bash
hermes
`
### 运行诊断
`bash
hermes doctor
`
### 检查更新
`bash
hermes update
`
### 查看会话列表
`bash
hermes session
`
### 启动 TUI 界面
`bash
hermes
# TUI 模式自动启动(若终端支持)
`
消息发送 {#messaging}
### 发送消息(默认平台)
`bash
hermes send "你好,Hermes!"
`
### 发送到飞书
`bash
hermes send --to feishu "消息内容"
`
### 发送到 Telegram
`bash
hermes send --to telegram "Hello from Hermes!"
`
### 发送到 Discord
`bash
hermes send --to discord "Hello!"
`
### 发送到 WhatsApp
`bash
hermes send --to whatsapp "Hello!"
`
### 发送到 Slack
`bash
hermes send --to slack "Hello!"
`
### 发送到 Signal
`bash
hermes send --to signal "Hello!"
`
配置管理 {#configuration}
### 查看当前配置
`bash
hermes config
`
### 编辑配置
`bash
hermes config edit
`
### 设置配置项
`bash
hermes config set
`
### 管理配置文件
`bash
hermes profile
`
### 切换配置环境
`bash
hermes profile switch
`
### 列出所有配置
`bash
hermes profile list
`
模型管理 {#model}
### 列出可用模型
`bash
hermes model
`
### 切换模型
`bash
hermes model switch
`
### 查看当前模型
`bash
hermes model current
`
### 配置 LLM 提供商
`bash
hermes provider set
`
### 列出提供商
`bash
hermes provider list
`
记忆系统 {#memory}
### 查看记忆
`bash
hermes memory
`
### 搜索记忆
`bash
hermes memory search
`
### 添加记忆
`bash
hermes memory add "记忆内容"
`
### 删除记忆
`bash
hermes memory remove
`
### 清除所有记忆
`bash
hermes memory clear
`
### 查看记忆统计
`bash
hermes memory stats
`
技能管理 {#skills}
### 列出已加载技能
`bash
hermes skill
`
### 查看技能详情
`bash
hermes skill view
`
### 查看所有可用技能
`bash
hermes skill list
`
### 内置技能:查看技能文档
`bash
skill_view(name="skill-name")
`
### 内置技能:管理技能
`bash
skill_manage(action="list")
`
### 内置技能:网页搜索
`bash
web_search(query="搜索关键词")
`
### 内置技能:网页提取
`bash
web_extract(url="https://example.com")
`
### 内置技能:执行终端命令
`bash
terminal(command="ls -la")
`
### 内置技能:委派任务
`bash
delegate_task(task="完成任务描述")
`
定时任务 {#cron}
### 创建定时任务
`bash
hermes cron create --schedule "*/5 * * * *" --task "检查系统状态"
`
### 列出所有定时任务
`bash
hermes cron list
`
### 删除定时任务
`bash
hermes cron remove
`
### 暂停定时任务
`bash
hermes cron pause
`
### 恢复定时任务
`bash
hermes cron resume
`
高级操作 {#advanced}
### 任务委派
`bash
delegate_task(task="调查数据库性能问题", context="生产环境 MySQL 慢查询")
`
### 后台进程管理
`bash
terminal(command="python server.py", background=true)
`
### 文件读取工具
`bash
read_file(path="/path/to/file")
`
### 文件搜索工具
`bash
search_files(pattern="*.py", path="./src")
`
### 文件写入工具
`bash
write_file(path="output.txt", content="Hello World")
`
### 代码编辑工具
`bash
patch(path="file.py", old_string="old_code", new_string="new_code")
`
### 会话管理
`bash
hermes session list
`
### 查看会话日志
`bash
hermes session log
`
### 清除会话
`bash
hermes session clear
``
基础操作(9)
| 命令 | 难度 | ||
|---|---|---|---|
hermes启动交互式会话(支持 TUI 模式) | 基础 | hermes | |
hermes --help查看帮助信息 | 基础 | hermes --help | |
hermes --version查看版本号 | 基础 | hermes --version | |
hermes doctor运行系统诊断 | 中级 | hermes doctor | |
hermes update检查并安装更新 | 中级 | hermes update | |
hermes session查看当前会话 | 基础 | hermes session | |
hermes session list列出所有会话 | 中级 | hermes session list | |
hermes session log <session-id>查看指定会话日志 | 中级 | hermes session log sess-abc | |
hermes session clear清除当前会话 | 中级 | hermes session clear |
消息发送(7)
| 命令 | 难度 | ||
|---|---|---|---|
hermes send <message>发送消息到默认平台 | 基础 | hermes send "Hello, Hermes!" | |
hermes send --to feishu <message>发送消息到飞书 | 中级 | hermes send --to feishu "消息内容" | |
hermes send --to telegram <message>发送消息到 Telegram | 中级 | hermes send --to telegram "Hello!" | |
hermes send --to discord <message>发送消息到 Discord | 中级 | hermes send --to discord "Hello!" | |
hermes send --to whatsapp <message>发送消息到 WhatsApp | 中级 | hermes send --to whatsapp "Hello!" | |
hermes send --to slack <message>发送消息到 Slack | 中级 | hermes send --to slack "Hello!" | |
hermes send --to signal <message>发送消息到 Signal | 中级 | hermes send --to signal "Hello!" |
配置管理(6)
| 命令 | 难度 | ||
|---|---|---|---|
hermes config查看当前配置 | 基础 | hermes config | |
hermes config edit编辑配置文件 | 中级 | hermes config edit | |
hermes config set <key> <value>设置配置项 | 中级 | hermes config set model.default gpt-4 | |
hermes profile管理配置文件 | 中级 | hermes profile | |
hermes profile switch <profile-name>切换配置环境 | 高级 | hermes profile switch work | |
hermes profile list列出所有配置文件 | 基础 | hermes profile list |
模型管理(5)
| 命令 | 难度 | ||
|---|---|---|---|
hermes model列出可用模型 | 基础 | hermes model | |
hermes model switch <model-name>切换当前模型 | 中级 | hermes model switch gpt-4-turbo | |
hermes model current查看当前使用的模型 | 基础 | hermes model current | |
hermes provider set <provider-name>设置 LLM 提供商 | 中级 | hermes provider set openai | |
hermes provider list列出所有提供商 | 基础 | hermes provider list |
记忆系统(6)
| 命令 | 难度 | ||
|---|---|---|---|
hermes memory查看记忆内容 | 基础 | hermes memory | |
hermes memory search <query>搜索记忆 | 中级 | hermes memory search project context | |
hermes memory add <content>添加新记忆 | 中级 | hermes memory add "Project uses Python 3.12" | |
hermes memory remove <memory-id>删除指定记忆 | 中级 | hermes memory remove abc123 | |
hermes memory clear清除所有记忆 | 高级 | hermes memory clear | |
hermes memory stats查看记忆统计信息 | 中级 | hermes memory stats |
高级操作(12)
| 命令 | 难度 | ||
|---|---|---|---|
hermes skill列出已加载技能 | 基础 | hermes skill | |
hermes skill view <skill-name>查看技能详情 | 中级 | hermes skill view web-search | |
skill_view(name='<skill-name>')内置技能 — 查看技能文档和说明 | 中级 | skill_view(name='hermes-agent') | |
skill_manage(action='<action>')内置技能 — 管理技能(安装/卸载/更新) | 高级 | skill_manage(action='list') | |
web_search(query='<query>')内置技能 — 执行网页搜索 | 中级 | web_search(query='Hermes Agent documentation') | |
web_extract(url='<url>')内置技能 — 提取网页内容 | 中级 | web_extract(url='https://hermes-agent.nousresearch.com/docs') | |
terminal(command='<cmd>')内置技能 — 执行终端命令 | 基础 | terminal(command='ls -la') | |
delegate_task(task='<task>')内置技能 — 委派子任务给代理 | 高级 | delegate_task(task='Analyze the log file and summarize errors') | |
read_file(path='<path>')内置技能 — 读取文件内容 | 中级 | read_file(path='/etc/hosts') | |
search_files(pattern='<pattern>', path='<path>')内置技能 — 搜索文件 | 中级 | search_files(pattern='*.py', path='./src') | |
write_file(path='<path>', content='<content>')内置技能 — 写入文件 | 中级 | write_file(path='output.txt', content='Hello World') | |
patch(path='<path>', old_string='<old>', new_string='<new>')内置技能 — 编辑文件内容 | 高级 | patch(path='config.py', old_string='debug=False', new_string='debug=True') |
定时任务(5)
| 命令 | 难度 | ||
|---|---|---|---|
hermes cron create --schedule '<cron>' --task '<task>'创建定时任务 | 高级 | hermes cron create --schedule "0 9 * * 1" --task "Send weekly report" | |
hermes cron list列出所有定时任务 | 中级 | hermes cron list | |
hermes cron remove <cron-id>删除定时任务 | 中级 | hermes cron remove cron-123 | |
hermes cron pause <cron-id>暂停定时任务 | 高级 | hermes cron pause cron-123 | |
hermes cron resume <cron-id>恢复定时任务 | 高级 | hermes cron resume cron-123 |