教程:每日简报机器人
本教程会带你用 Hermes 搭一个每天自动运行的简报机器人。它可以在固定时间搜索最新信息、整理重点内容,并把结果推送到 Telegram、Discord,或直接落到本地文件中。
和“自己写一套 Python 定时脚本”不同,这个版本完全基于 Hermes 现有能力来搭建:定时任务负责调度,代理负责搜索与总结,消息平台负责交付。这样更容易维护,也更方便后续加上技能、脚本或委派。
我们要构建什么?
最终效果大致如下:
- 每天早上自动运行一次
- 搜索你关心的主题,例如 AI、开源模型、开发者工具或行业新闻
- 输出一份短小、稳定、适合阅读的中文简报
- 自动发送到 Telegram、Discord,或写入本地输出目录
如果你之后想扩展成“工作日站会摘要”“竞品监控报告”“研究简报”“投研晨报”,基本也沿用这一套结构。
先决条件
开始前,请先确认以下几项:
- 已安装 Hermes,并且文本对话模式可正常工作
- 已配置至少一个可用的模型提供商
- 如果要把简报发送到 Telegram 或 Discord,对应网关已配置完成
- 如果提示词依赖联网搜索,请确保相关工具集可用
可以先用一次普通对话验证基础能力:
hermes
然后输入:
Search for today's top AI news and summarize it in Chinese.
如果这一步还不稳定,建议先把模型或联网能力配置好,再继续搭简报机器人。
第一步:选择交付方式
Hermes 的定时任务支持多种交付目标。做简报机器人时,最常用的是下面几种:
| 交付方式 | 适合场景 |
|---|---|
telegram | 每天把简报推送到 Telegram 私聊、群组或频道 |
discord | 推送到 Discord 频道 |
origin | 从哪个聊天创建任务,就把结果回发到哪个聊天 |
local | 把输出保存到本地,适合后续再加工或归档 |
如果你只是先试效果,推荐从 local 或 origin 开始。等提示词稳定之后,再切到 Telegram 或 Discord。
第二步:创建第一条每日简报任务
如果你已经在聊天里和 Hermes 对话,可以直接使用 /cron add:
/cron add "0 8 * * *" "Search for the top AI, developer tools, and open-source model news from the past 24 hours. Summarize the most important stories in Chinese, include links, keep the total length under 400 words." --name "Morning briefing" --deliver telegram
如果你更喜欢在终端里配置,也可以使用 CLI:
hermes cron create "0 8 * * *" \
"Search for the top AI, developer tools, and open-source model news from the past 24 hours. Summarize the most important stories in Chinese, include links, keep the total length under 400 words." \
--name "Morning briefing" \
--deliver telegram
这个例子表示:
- 每天早上
8:00运行一次 - 搜索过去 24 小时的相关新闻
- 用中文输出一份不超过 400 字的简报
- 任务名称为
Morning briefing - 结果通过
telegram交付
第三步:把提示词写得更像“简报”
简报类任务的关键不是“搜到更多”,而是“稳定输出你真正想看的内容”。下面这个版本通常会更像可读的晨报:
/cron add "0 8 * * *" "Create a daily morning briefing for a technical reader. Focus on:
1. AI model releases or meaningful model updates
2. Open-source agent tooling and developer workflows
3. Important policy or infrastructure news that affects builders
For each item:
- explain why it matters in one sentence
- include a source link
- avoid celebrity, product marketing, and low-signal funding news
Write the final result in Chinese with short section headers. Keep it under 500 words." --name "Technical morning briefing" --deliver telegram
这类提示词里,最有用的约束通常有三种:
- 目标读者:例如“技术读者”“投研读者”“产品经理”
- 保留什么:例如模型更新、监管变化、基础设施动态
- 跳过什么:例如营销稿、泛泛融资消息、无关热点
第四步:只在工作日发送
如果你不想周末也收到简报,可以直接改用工作日 cron 表达式:
/cron add "0 8 * * 1-5" "Generate a weekday morning briefing on AI and open-source tooling. Keep it concise and include links." --name "Weekday briefing" --deliver telegram
第五步:用委派提升研究质量
当主题比较多时,可以让 Hermes 先把调研拆给子代理并行完成,再合并成一份简报:
/cron add "0 8 * * *" "Create a morning briefing by delegating research to sub-agents.
Delegate three parallel tasks:
1. Find the top 2 AI/ML news stories from the past 24 hours with links
2. Find the top 2 open-source developer tooling stories from the past 24 hours with links
3. Find the top 2 infrastructure or regulation stories that matter to builders
Then combine them into a single Chinese briefing with section headers and links. Keep the result under 500 words." --name "Delegated morning briefing" --deliver telegram
这种写法在主题较多、信息面较广的时候通常更稳。更多细节可配合阅读 委派模式 和 委派功能说明。
第六步:把外部数据接进来
如果你的简报并不完全依赖公网搜索,而是要读本地文件、数据库、内部 API 或脚本输出,可以加上 --script:
/cron add "0 8 * * *" "Read the script output, extract the important changes, and turn it into a short Chinese morning briefing for the team. If nothing meaningful changed, return [SILENT]." --script ~/.hermes/scripts/team-briefing.py --name "Internal team briefing" --deliver telegram
这个模式很适合:
- GitHub 仓库摘要
- 内部监控告警汇总
- 数据报表转文字摘要
- 价格、流量或业务指标晨报
第七步:管理任务
创建完之后,常用的管理命令如下。
查看任务列表:
/cron list
或:
hermes cron list
立即测试一次:
/cron run <job_id>
修改提示词:
/cron edit <job_id> --prompt "Updated briefing prompt"
修改调度时间:
/cron edit <job_id> --schedule "0 9 * * *"
删除任务:
/cron remove <job_id>
在正式等它第二天触发之前,强烈建议先跑一次 /cron run <job_id>,这样能更快发现提示词、交付方式或搜索范围的问题。
第八步:确保调度器真的在运行
如果你使用的是 Telegram、Discord 这类消息交付方式,别忘了网关需要一直在线,否则任务不会自动执行。
你可以先检查状态:
hermes cron status
如果是长期部署,建议把网关安装成后台服务:
hermes gateway install
在 Linux 服务器上,也可以使用系统级安装:
sudo hermes gateway install --system
进阶建议
把这类简报机器人做得更稳定,通常有几个经验:
- 先把提示词压短,确保输出稳定,再慢慢增加要求
- 明确说明“读者是谁”和“哪些新闻不要”
- 用
local先试跑,满意后再切换到消息平台 - 对多主题简报使用委派,对内部数据简报使用脚本
- 如果希望“没有变化就不打扰”,就在提示里明确要求返回
[SILENT]
接下来可以读什么
每日简报机器人其实只是一个模板。把提示词换成“监控竞品”“汇总 GitHub 仓库变化”“生成团队日报”或“整理研究线索”,你就能很快得到另一类自动化机器人。