教程:每日简报机器人
在这篇教程里,你将构建一个个人简报机器人:它每天早上自动启动,研究你关心的话题,总结结果,并把一份简明简报直接发到你的 Telegram 或 Discord。
完成后,你将拥有一个完全自动化的工作流,组合了 web search、cron 调度、委托 和 消息投递,全程无需写代码。
我们要构建什么
流程如下:
- 早上 8:00,cron 调度器触发任务
- Hermes 启动一个全新的 agent 会话,并带上你的提示词
- web search 抓取你关注主题的最新新闻
- 总结 将内容整理为清晰的简报格式
- 投递 将简报发送到 Telegram 或 Discord
整个流程都能自动运行。你只需要一边喝咖啡,一边看晨间简报。
前置条件
开始前,请确保你已经具备:
- 已安装 Hermes Agent,参见 Installation guide
- 网关正在运行,因为网关守护进程负责执行 cron:
hermes gateway install # Install as a user service
sudo hermes gateway install --system # Linux servers: boot-time system service
# or
hermes gateway # Run in foreground - Firecrawl API key,用于 web search,需要在环境变量中设置
FIRECRAWL_API_KEY - 已配置消息平台(可选但推荐),例如 Telegram 或 Discord,并设置好 home channel
你依然可以用 deliver: "local" 跟着做。简报会保存到 ~/.hermes/cron/output/,你随时都能查看。
第 1 步:先手动测试工作流
在做自动化之前,先确认简报本身能跑通。启动一个聊天会话:
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 句”之类的要求。最后定下来的那版提示词,就是你 cron 任务里要用的内容。
第 2 步:创建 Cron 任务
现在开始把它安排成每天早上自动运行。你有两种做法。
在创建 cron 任务前,先确保 Hermes 全局已经配置好默认模型和默认大模型提供商(provider)。如果你希望某个任务使用不同值,请在创建任务时显式设置该任务自己的模型 / provider 覆盖。
选项 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."
黄金法则:提示词必须自包含
Cron 任务运行在完全全新的会话里,没有你之前聊天的记忆,也不知道你“前面已经配置过什么”。提示词里必须写上 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 需要的信息全讲清楚。
第 3 步:自定义简报
基础版跑通之后,就可以开始玩花样了。
多主题简报
一份简报覆盖多个领域:
/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 把每个主题委托给子 agent:
/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 会独立并行地搜索,随后主 agent 再把结果汇总成一份打磨好的简报。关于这一机制的更多信息,参见 Delegation docs。
仅工作日执行
如果你周末不需要简报,可以用只匹配周一到周五的 cron 表达式:
/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..."
用记忆加入个人背景
如果你启用了 memory,可以保存跨会话持久存在的偏好。但要记住,cron 任务运行在新会话里,不带对话记忆。想加入个人上下文,应该把这些背景直接写进提示词:
/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 你的角色、兴趣点,以及哪些内容要跳过。
第 4 步:管理你的任务
列出所有已安排任务
在聊天里:
/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") 删除它。
检查网关状态
确保调度器确实在运行:
hermes cron status
如果网关没在跑,任务就不会执行。为了提高可靠性,建议安装成后台服务:
hermes gateway install
# or on Linux servers
sudo hermes gateway install --system
继续深入
现在你已经有了一个可工作的每日简报机器人。接下来可以继续探索这些方向:
- Scheduled Tasks (Cron):调度格式、重复限制和投递选项的完整参考
- Delegation:深入了解并行子 agent 工作流
- Messaging Platforms:配置 Telegram、Discord 或其他投递目标
- Memory:跨会话持久上下文
- Tips & Best Practices:更多提示词工程建议
每日简报机器人的模式几乎适用于任何事情:竞品监控、GitHub 仓库摘要、天气预报、投资组合追踪、服务器健康检查,甚至每日笑话。只要你能把它写成提示词,就能把它排进日程。