🎯 今日目标 :掌握定时任务、诊断排错和 OpenClaw 迁移
Hermes 内置了定时任务功能,可以”到点自动执行”!
你: 每周一早上 9 点,帮我总结上周的 GitHub 项目动态
Hermes 会调用 cronjob 工具创建任务。
|
|
|
every day at 9am |
|
every monday at 9:30 |
|
every 6 hours |
|
at 2026-03-01 10:00 |
|
in 30 minutes |
|
|
|
|
create |
|
list |
|
pause |
|
resume |
|
run |
|
remove |
|
# 暂停你: 暂停"提醒我检查邮件"这个任务# 恢复你: 恢复"提醒我检查邮件"这个任务# 删除你: 删除"提醒我检查邮件"这个任务
# 查看系统状态hermes status# 全面诊断hermes doctor
# 实时查看tail -f ~/.hermes/logs/hermes.log# 最近 100 行tail -100 ~/.hermes/logs/hermes.log
# Linuxjournalctl --user -u hermes-gateway -f# macOStail -f ~/.hermes/logs/gateway.log
# 启动详细日志hermes chat --verbose
|
|
|
|
|
1. hermes status 检查状态2. 检查网络3. 检查 API Key
|
|
|
1. /tools 确认工具已启用2. hermes doctor 检查配置3. 查看日志
|
|
|
1. 检查网络2. 使用国内模型3. 检查 API 限流
|
|
|
1. journalctl 查看错误2. 检查端口占用3. 检查权限
|
# 重置配置hermes config reset# 恢复出厂设置hermes reset
如果你之前用过 OpenClaw ,迁移到 Hermes 非常简单!
[INFO] Scanning for legacy OpenClaw instances...[INFO] Found 3 nodes. Starting data mapping...[PROGRESS] ██████████████████████ 100%✔ SUCCESS: Migration completed in 1.2s✔ All configs migrated✔ All 3 agents imported
# 验证迁移完整性hermes claw migrate --verify# 查看迁移报告hermes claw report
MCP(Model Context Protocol)集成
MCP 是一个开放协议,让 Hermes 能连接更多外部工具和服务。
# ~/.hermes/config.yamlmcp: servers: my-server: command: npx args: ["-y", "@modelcontextprotocol/server-filesystem", "./workspace"]
/tools# 会看到 mcp-my-server 的工具
|
|
|
server-filesystem |
|
server-github |
|
server-slack |
|
server-memory |
|
# npm 安装npm install -g @modelcontextprotocol/server-github# Python 安装pip install mcp-server
# 用户服务(推荐)hermes gateway install# 系统服务(VPS 推荐)sudo hermes gateway install --systemsudo loginctl enable-linger $USER
# 使用不同配置目录HERMES_HOME=~/.hermes-work hermes# 查看所有实例hermes instances list
# ~/.hermes/config.yamlresources: max_memory_mb: 2048 max_cpu_percent: 80
# ~/.hermes/config.yamlquick_commands: status: type: exec command: systemctl status hermes-agent gpu: type: exec command: nvidia-smi --query-gpu=utilization.gpu,memory.used --format=csv,noheader
/personality pirate # 海盗风格/personality kawaii # 可爱风格/personality concise # 简洁风格/personality technical # 技术风格
helpful, concise, technical, creative, teacher, kawaii, pirate, shakespeare...
# ~/.hermes/config.yamlpersonalities: mystyle: "你是一个专业的 Python 开发者,说话简洁,喜欢用代码示例。"
# 拉取最新代码cd ~/.hermes/hermes-agentgit pull# 重新安装pip install -e .# 或使用更新脚本hermes update
|
|
|
|
|
|
|
|
|
|
tail -f ~/.hermes/logs/*.log
|
|
|
|
|
|
|
|
|
|
|
|
hermes claw migrate –dry-run
|
|
|
hermes claw migrate –verify
|
|
|
|
|
|
|
修改 config.yaml 的 mcp.servers 配置
|
|
|
|
|
|
|
|
|
|
|
curl ... install.sh | bash |
|
|
|
hermes model
|
|
|
|
hermes gateway setup |
|
|
|
/tools
|
|
|
|
hermes skills install |
|
|
|
/compress
|
|
|
|
hermes cron
|
这只是开始! Hermes 还有更多高级功能等你去探索:
欢迎持续关注,我会分享更多 Hermes 的使用技巧!
https://hermes-agent.nousresearch.com/docs/user-guide/configuration
https://hermes-agent.nousresearch.com/docs/user-guide/features/mcp