Hermes Agent 完整上手实战:从安装到自动化部署,看完这篇就够了
这可能是全网最接地气的 Hermes Agent 教程——没有之一
中英双语 · 代码可复制 · 一键开箱
前言:为什么要选 Hermes Agent?
老实说,市面上的 AI 编程工具已经多到让人选择困难了。Cursor 很好,Copilot 也不错,但 Hermes Agent 有个别家没有的杀手锏:它不光能写代码,它能帮你打工。
我说的"打工"不是帮你生成一段注解,而是——它能读你的文件,跑你的命令,替你在 Telegram 上处理消息,甚至定时帮你巡检服务器。一个 Agent 干三个人的活,摸鱼摸出高级感,说的就是这玩意儿。
Hermes Agent: From Zero to Deployment — The Most Practical Guide You'll Ever Read
The most down-to-earth Hermes Agent tutorial on the internet — period.
Bilingual · Copyable code · Ready to go in 5 minutes
一、安装:一行命令搞定
别整那些花里胡哨的,装个 Hermes 真的就一行:
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash
source ~/.bashrc
hermes
Code copied! 千万别 source 错了,用 bashrc 还是 zshrc 取决于你的 shell。不知道的话运行 echo $SHELL 看一眼。
1. Installation: One Command, That's It
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash
source ~/.bashrc
hermes
Don't know if you're on bash or zsh? Run echo $SHELL and pick the right one. Easy.
如果要从源码开发
想改源码?没问题,先拉仓库:
git clone https://github.com/NousResearch/hermes-agent.git
cd hermes-agent
uv venv venv --python 3.11
source venv/bin/activate
uv pip install -e ".[all,dev]"
Note: 装完后大概率你会在 AGENTS.md 里看到一行提示,说运行 Python 前记得 activate。别问我怎么知道的——踩过的坑都是泪。
Development Installation
git clone https://github.com/NousResearch/hermes-agent.git
cd hermes-agent
uv venv venv --python 3.11
source venv/bin/activate
uv pip install -e ".[all,dev]"
二、初始化配置:一条命令搞定
hermes setup
这一步会帮你配置好:
模型提供商(Provider):OpenAI、Anthropic、Google Gemini,随你选
终端后端(Terminal backend):本地或 SSH
网关平台(Gateway):Telegram、Discord 等
工具集(Toolsets):允许 Hermes 使用哪些能力
代理行为(Agent behavior):话说多还是说少,你来定
改完之后,运行 hermes config view 看一眼效果。如果你看到的是满屏的 YAML 而不是报错,恭喜你,成了。
2. Initial Setup: One Command
hermes setup
This configures your provider, terminal backend, gateway platforms, toolsets, and agent behavior — all in one interactive flow.
三、核心玩法:工具、技能与记忆
Hermes 最骚的操作是什么?是它带着 Tool 武器库,而不是光靠模型硬猜。
3.1 Toolset——你想让它有什么超能力
# 看看目前开了哪些工具
hermes tools list
# 打开网络搜索能力
hermes tools enable search
工具集包括:文件读写、终端执行、浏览器操作、网络搜索、代码执行、图片分析……你能想到的,基本都有。
3. Core Features: Tools, Skills & Memory
# Check available tools
hermes tools list
# Enable web search
hermes tools enable search
3.2 Skill——把踩过的坑写成知识
Skill 是 Hermes 的杀手级功能。你可以把某个复杂流程写成 Skill,以后 Hermes 遇到类似场景时会自动加载并使用,不用每次重新教它。
# 看一眼系统里有哪些现成的技能
hermes skills list
# 查看某个技能的具体内容
hermes skills view writing-plans
自己写一个 Skill 也很简单,本质上就是一份 Markdown 加 YAML 头:
---
name: deploy-to-server
description: 部署服务到生产服务器的标准流程
---
# 部署流程
1. 先 `git pull` 拉最新代码
2. 运行 `npm run build`
3. 用 `rsync` 同步到服务器
4. 重启服务
然后告诉 Hermes "帮我部署一下",它就按这个流程干活了。
3.2 Skills — Your Reusable Workflows
Skills are what make Hermes truly intelligent. They're reusable knowledge packages that tell the agent HOW to do things.
---
name: deploy-to-server
description: Production deployment workflow
---
# Steps
1. Run `git pull`
2. Execute `npm run build`
3. `rsync` to server
4. Restart service
3.3 Memory——让 Hermes 记住你
Memory 存的是"事实"——你叫什么、喜欢什么编程风格、常用哪些工具。这些信息跨会话持久化,不用每次见面都自我介绍。
hermes memory show
如果你发现 Hermes 忘了什么,直接告诉它"记住 XXX"即可。想删除旧记忆,改一下就行。
3.3 Memory — Persistent Across Sessions
Memory stores durable facts about you — name, preferences, habits. Cross-session, always available.
hermes memory show
四、自动化:让 Hermes 替你值班
这是我最喜欢的功能——Cron 定时任务。
hermes cron create \
--name "daily-server-check" \
--schedule "0 9 * * *" \
--prompt "请检查服务器磁盘使用率和内存占用,如果超过 80% 就通知我"
解释一下这个命令:
`--name`: 任务名字,方便以后管理
`--schedule`: Cron 表达式,`0 9 * * *` 表示每天早上 9 点执行
`--prompt`: 任务内容,它会在那个时间点自动执行
查看和管理你的定时任务:
hermes cron list
hermes cron remove <任务ID>
我看到很多人把巡检搭起来之后,每天到点手机就震动一下,看一眼报告继续睡。这才是高级摸鱼的正确姿势。
4. Automation: Cron Jobs That Never Sleep
This is my favorite feature — scheduled autonomous tasks.
hermes cron create \
--name "daily-server-check" \
--schedule "0 9 * * *" \
--prompt "Check disk usage and memory, alert if over 80%"
Commands:
`hermes cron list` — list all jobs
`hermes cron remove ` — delete a job
五、多平台接入:把你的 Agent 放到 Telegram 上
这是真正解放生产力的玩法:
hermes gateway enable telegram
配置好你的 Telegram Bot Token 之后,Hermes 就变成你的 24 小时私人助理了。哪怕你在上厕所,它也能帮你回复消息、执行任务。
我个人的使用习惯是:
日常开发:CLI 模式,专注写代码
出门在外:Telegram 控制,一个消息搞定
复杂任务:写个 Skill 交给 cron 自动跑
5. Multi-Platform: Deploy to Telegram
hermes gateway enable telegram
Your Hermes becomes a 24/7 personal assistant accessible from anywhere — Telegram, Discord, Slack, or WhatsApp.
总结
Hermes Agent 不是那种你装完就吃灰的工具。你要做的就是花 10 分钟配置好环境,写一个 Skill 试一下,然后你会发现——原来 AI 编程不是噱头,是真能替你干活。
记住三个核心概念就够了:
**Skills** 告诉它怎么做
**Memory** 让它记住你是谁
**Cron** 让它替你值班
剩下的,用起来自然就知道了。踩坑不可怕,可怕的是踩完不写 Skill——这样下次还得踩第二遍。
Happy coding, 摸鱼愉快 🐟
💡 本文为「AI开源社区」原创,转载请注明出处。如果你发现了新的实用技巧,欢迎在评论区分享。
lang: en
Hermes Agent: From Zero to Deployment — The Most Practical Guide You'll Ever Read
Bilingual · Copyable Code · Ready in 5 Minutes
Why Hermes Agent?
Let's be real — there are way too many AI coding tools out there. Cursor is nice. Copilot is decent. But Hermes Agent does something none of them can: it doesn't just write code, it does your job.
By "does your job" I mean: reads your files, runs your commands, handles your Telegram messages, and monitors your servers on a schedule. One agent, three people's worth of work. That's the real productivity hack.
1. Installation: One Command
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash
source ~/.bashrc
hermes
Not sure if you're on bash or zsh? Run echo $SHELL and pick the right one.
Dev Installation
git clone https://github.com/NousResearch/hermes-agent.git
cd hermes-agent
uv venv venv --python 3.11
source venv/bin/activate
uv pip install -e ".[all,dev]"
2. Setup: One Command
hermes setup
This wizard walks you through: provider selection, terminal backend, gateway platforms, toolsets, and agent behavior.
3. Core Concepts
Toolsets
hermes tools list
hermes tools enable search
Skills — Reusable Workflows
---
name: deploy-to-server
description: Production deployment workflow
---
# Steps
1. Run `git pull`
2. Execute `npm run build`
3. `rsync` to server
4. Restart service
Memory
hermes memory show
4. Automation: Cron Jobs
hermes cron create \
--name "daily-check" \
--schedule "0 9 * * *" \
--prompt "Check disk usage, alert if over 80%"
5. Multi-Platform
hermes gateway enable telegram
Summary
Three things to remember:
**Skills** tell it HOW
**Memory** tells it WHO you are
**Cron** makes it work while you sleep
The rest you'll figure out as you go. Just don't forget to save that hard-earned knowledge as a Skill — future you will thank present you.
Happy coding 🐟