在本教程中,你将构建一个个人简报机器人——它每天早上自动启动,研究你关心的话题,总结发现的内容,并将简洁的简报直接发送到你的 Telegram 或 Discord。 完成后,你将拥有一个完全自动化的工作流,结合了 网络搜索 、 计划任务(Cron) 、 任务委派 和 消息投递 ——无需编写任何代码。
教程:每日简报机器人
> 📖 本文档翻译自 Hermes Agent 官方文档 > 最后更新:2026-04-16
教程:构建一个每日简报机器人
在本教程中,你将构建一个个人简报机器人——它每天早上自动启动,研究你关心的话题,总结发现的内容,并将简洁的简报直接发送到你的 Telegram 或 Discord。
完成后,你将拥有一个完全自动化的工作流,结合了网络搜索、计划任务(Cron)、任务委派和消息投递——无需编写任何代码。
我们要构建什么
流程如下:
- 早上 8:00 — 计划任务触发你的任务
- Hermes 启动一个全新的 Agent 会话,使用你的提示词
- 网络搜索获取你关注话题的最新新闻
- 内容总结将其提炼为简洁的简报格式
- 消息投递将简报发送到你的 Telegram 或 Discord
整个过程完全自动运行。你只需要在喝晨间咖啡时阅读简报。
前置条件
开始之前,请确保你具备以下条件:
-
已安装 Hermes Agent — 参见安装指南
-
Gateway 已运行 — Gateway 守护进程负责执行计划任务:
hermes gateway install # 安装为用户服务 sudo hermes gateway install --system # Linux 服务器:开机时启动的系统服务 # 或者 hermes gateway # 前台运行 -
Firecrawl API 密钥 — 在环境中设置
FIRECRAWL_API_KEY以启用网络搜索 -
消息平台已配置(可选但推荐)— 设置 Telegram 或 Discord 并指定主频道
没有配置消息平台?没问题
你仍然可以使用 deliver: "local" 跟随本教程。简报将保存到 ~/.hermes/cron/output/,你可以随时查看。
第一步:手动测试工作流
在自动化之前,先确保简报功能正常工作。启动一个聊天会话:
hermes
然后输入以下提示:
Search for the latest news about AI agents and open source LLMs.
Summarize the top 3 stories in a concise briefing format with links.
Hermes 会搜索网络,阅读结果,并生成类似以下内容:
☀️ Your AI Briefing — March 8, 2026
1. Qwen 3 Released with 235B Parameters
Alibaba's latest open-weight model matches GPT-4.5 on several
benchmarks while remaining fully open source.
→ https://qwenlm.github.io/blog/qwen3/
2. LangChain Launches Agent Protocol Standard
A new open standard for agent-to-agent communication gains
adoption from 15 major frameworks in its first week.
→ https://blog.langchain.dev/agent-protocol/
3. EU AI Act Enforcement Begins for General-Purpose Models
The first compliance deadlines hit, with open source models
receiving exemptions under the 10M parameter threshold.
→ https://artificialintelligenceact.eu/updates/
---
3 stories • Sources searched: 8 • Generated by Hermes Agent
如果一切正常,你就可以开始自动化了。
调整输出格式
尝试不同的提示,直到获得你满意的输出。添加指令如"使用 emoji 标题"或"每条摘要控制在 2 句以内"。你最终确定的内容将直接用于计划任务。
第二步:创建计划任务
现在让我们设置每天早上自动运行。有两种方式可以实现。
方式 A:自然语言(在聊天中)
直接告诉 Hermes 你想要什么:
Every morning at 8am, search the web for the latest news about AI agents
and open source LLMs. Summarize the top 3 stories in a concise briefing
with links. Use a friendly, professional tone. Deliver to telegram.
Hermes 会使用统一的 cronjob 工具为你创建计划任务。
方式 B:CLI 斜杠命令
使用 /cron 命令获得更多控制:
/cron add "0 8 * * *" "Search the web for the latest news about AI agents and open source LLMs. Find at least 5 recent articles from the past 24 hours. Summarize the top 3 most important stories in a concise daily briefing format. For each story include: a clear headline, a 2-sentence summary, and the source URL. Use a friendly, professional tone. Format with emoji bullet points and end with a total story count."
黄金法则:自包含的提示
关键概念
计划任务在完全全新的会话中运行——没有之前对话的记忆,也没有关于你"之前设置了什么"的上下文。你的提示必须包含 Agent 完成任务所需的全部信息。
不好的提示:
Do my usual morning briefing.
好的提示:
Search the web for the latest news about AI agents and open source LLMs.
Find at least 5 recent articles from the past 24 hours. Summarize the
top 3 most important stories in a concise daily briefing format. For each
story include: a clear headline, a 2-sentence summary, and the source URL.
Use a friendly, professional tone. Format with emoji bullet points.
好的提示具体说明了搜索什么、多少篇文章、什么格式和什么语气。它包含了 Agent 一次完成工作所需的一切。
第三步:自定义简报
基本简报工作正常后,你可以发挥创意。
多话题简报
在一份简报中覆盖多个领域:
/cron add "0 8 * * *" "Create a morning briefing covering three topics. For each topic, search the web for recent news from the past 24 hours and summarize the top 2 stories with links.
Topics:
1. AI and machine learning — focus on open source models and agent frameworks
2. Cryptocurrency — focus on Bitcoin, Ethereum, and regulatory news
3. Space exploration — focus on SpaceX, NASA, and commercial space
Format as a clean briefing with section headers and emoji. End with today's date and a motivational quote."
使用委派实现并行研究
要获得更快的简报,告诉 Hermes 将每个话题委派给子代理:
/cron add "0 8 * * *" "Create a morning briefing by delegating research to sub-agents. Delegate three parallel tasks:
1. Delegate: Search for the top 2 AI/ML news stories from the past 24 hours with links
2. Delegate: Search for the top 2 cryptocurrency news stories from the past 24 hours with links
3. Delegate: Search for the top 2 space exploration news stories from the past 24 hours with links
Collect all results and combine them into a single clean briefing with section headers, emoji formatting, and source links. Add today's date as a header."
每个子代理独立且并行地搜索,然后主 Agent 将所有内容组合成一份精美的简报。详见委派文档了解更多详情。
仅工作日排程
不需要周末简报?使用针对周一到周五的计划表达式:
/cron add "0 8 * * 1-5" "Search for the latest AI and tech news..."
每日两次简报
获取一份早晨概述和一份晚间回顾:
/cron add "0 8 * * *" "Morning briefing: search for AI news from the past 12 hours..."
/cron add "0 18 * * *" "Evening recap: search for AI news from the past 12 hours..."
使用记忆添加个人上下文
如果你启用了记忆功能,可以存储跨会话持久化的偏好设置。但请记住——计划任务在全新会话中运行,没有对话记忆。要添加个人上下文,请直接将其嵌入提示中:
/cron add "0 8 * * *" "You are creating a briefing for a senior ML engineer who cares about: PyTorch ecosystem, transformer architectures, open-weight models, and AI regulation in the EU. Skip stories about product launches or funding rounds unless they involve open source.
Search for the latest news on these topics. Summarize the top 3 stories with links. Be concise and technical — this reader doesn't need basic explanations."
量身定制角色
包含简报为谁而生的详细信息可以显著提高相关性。告诉 Agent 你的角色、兴趣以及应该跳过什么。
第四步:管理你的任务
列出所有计划任务
在聊天中:
/cron list
或在终端中:
hermes cron list
你会看到类似以下输出:
ID | Name | Schedule | Next Run | Deliver
------------|-------------------|-------------|--------------------|--------
a1b2c3d4 | Morning Briefing | 0 8 * * * | 2026-03-09 08:00 | telegram
e5f6g7h8 | Evening Recap | 0 18 * * * | 2026-03-08 18:00 | telegram
删除任务
在聊天中:
/cron remove a1b2c3d4
或以对话方式请求:
Remove my morning briefing cron job.
Hermes 会使用 cronjob(action="list") 找到任务,然后用 cronjob(action="remove") 删除它。
检查 Gateway 状态
确保调度器实际在运行:
hermes cron status
如果 Gateway 没有运行,你的任务不会被执行。将其安装为后台服务以确保可靠性:
hermes gateway install
# 或在 Linux 服务器上
sudo hermes gateway install --system
进阶探索
你已经构建了一个可用的每日简报机器人。以下是一些可以继续探索的方向:
- 计划任务(Cron) — 计划格式、重复限制和投递选项的完整参考
- 任务委派 — 深入了解并行子代理工作流
- 消息平台 — 设置 Telegram、Discord 或其他投递目标
- 记忆 — 跨会话的持久化上下文
- 技巧与最佳实践 — 更多提示工程建议
还有什么可以计划?
简报机器人模式适用于任何场景:竞争对手监控、GitHub 仓库摘要、天气预报、投资组合追踪、服务器健康检查,甚至每日笑话。如果你能用提示描述它,你就能计划它。