在本教程中,你将构建一个个人简报机器人,它每天早晨自动唤醒,研究你关心的主题,总结发现,并将简洁的简报直接发送到你的 Telegram 或 Discord。
完成后,你将拥有一个完全自动化的工作流,结合了网页搜索、cron 调度、delegation 和消息投递——无需编写代码。
我们要构建什么
Section titled “我们要构建什么”流程如下:
- 上午 8:00 —— cron 调度器触发你的任务
- Hermes 使用你的提示词启动一个新的 agent session
- 网页搜索会抓取你关注主题的最新新闻
- 摘要流程会将内容提炼成清晰的简报格式
- 投递流程会将简报发送到你的 Telegram 或 Discord
整个流程都是免手动运行的。你只需要在早晨喝咖啡时阅读你的简报。
开始之前,请确保你已经具备:
- 已安装 Hermes Agent —— 请参见 Installation guide
- Gateway 正在运行 —— gateway daemon 负责 cron 执行:
hermes gateway install # 安装为用户服务sudo hermes gateway install --system # Linux 服务器:开机启动的系统服务# 或者hermes gateway # 在前台运行- Firecrawl API key —— 在你的环境中设置
FIRECRAWL_API_KEY,用于网页搜索 - 已配置消息平台(可选但推荐)—— 配置 Telegram 或 Discord,并设置一个 home channel
步骤 1:手动测试工作流
Section titled “步骤 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如果这能正常工作,你就可以开始自动化了。
步骤 2:创建 Cron Job
Section titled “步骤 2:创建 Cron Job”现在我们把它设置为每天早晨自动运行。你可以通过两种方式完成。
在创建 cron jobs 之前,请确保 Hermes 已经全局配置了默认 model 和 provider。如果你希望某个特定 job 使用不同的值,请在创建时为该 job 设置显式的 model/provider 覆盖项。
选项 A:自然语言(在聊天中)
Section titled “选项 A:自然语言(在聊天中)”直接告诉 Hermes 你想要什么:
Every morning at 8am, search the web for the latest news about AI agentsand open source LLMs. Summarize the top 3 stories in a concise briefingwith links. Use a friendly, professional tone. Deliver to telegram.Hermes 会使用统一的 cronjob 工具为你创建 cron job。
选项 B:CLI Slash Command
Section titled “选项 B:CLI Slash Command”使用 /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."黄金规则:自包含提示词
Section titled “黄金规则:自包含提示词”不好的提示词:
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 thetop 3 most important stories in a concise daily briefing format. For eachstory include: a clear headline, a 2-sentence summary, and the source URL.Use a friendly, professional tone. Format with emoji bullet points.好的提示词会明确说明要搜索什么、需要多少篇文章、输出格式是什么,以及使用什么语气。它把 agent 一次性完成任务所需的所有内容都包含进去了。
步骤 3:自定义简报
Section titled “步骤 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 frameworks2. Cryptocurrency — focus on Bitcoin, Ethereum, and regulatory news3. 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."使用 Delegation 进行并行研究
Section titled “使用 Delegation 进行并行研究”为了获得更快的简报,可以告诉 Hermes 将每个主题委派给一个 sub-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 links2. Delegate: Search for the top 2 cryptocurrency news stories from the past 24 hours with links3. 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."每个 sub-agent 会独立并行搜索,然后 main agent 会把所有内容合并成一份 polished briefing。有关其工作方式的更多信息,请参见 Delegation docs。
仅工作日调度
Section titled “仅工作日调度”周末不需要简报?使用一个针对周一到周五的 cron 表达式:
/cron add "0 8 * * 1-5" "Search for the latest AI and tech news..."每日两次简报
Section titled “每日两次简报”获取早晨概览和晚间回顾:
/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 添加个人上下文
Section titled “使用 Memory 添加个人上下文”如果你启用了 memory,可以保存跨 session 持久化的偏好。但请记住——cron jobs 会在没有 conversational memory 的全新 sessions 中运行。要添加个人上下文,请直接把它写入 prompt:
/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."步骤 4:管理你的 Jobs
Section titled “步骤 4:管理你的 Jobs”列出所有已调度 Jobs
Section titled “列出所有已调度 Jobs”在聊天中:
/cron list或者从终端运行:
hermes cron list你会看到类似这样的输出:
ID | Name | Schedule | Next Run | Deliver------------|-------------------|-------------|--------------------|--------a1b2c3d4 | Morning Briefing | 0 8 * * * | 2026-03-09 08:00 | telegrame5f6g7h8 | Evening Recap | 0 18 * * * | 2026-03-08 18:00 | telegram移除一个 Job
Section titled “移除一个 Job”在聊天中:
/cron remove a1b2c3d4或者用对话方式询问:
Remove my morning briefing cron job.Hermes 会使用 cronjob(action="list") 找到它,并使用 cronjob(action="remove") 删除它。
检查 Gateway 状态
Section titled “检查 Gateway 状态”确保调度器确实正在运行:
hermes cron status如果 gateway 没有运行,你的 jobs 将不会执行。为了可靠性,请将它安装为后台服务:
hermes gateway install# 或者在 Linux 服务器上sudo hermes gateway install --system你已经构建了一个可工作的每日简报机器人。以下是一些可以继续探索的方向:
- Scheduled Tasks(Cron)—— schedule 格式、repeat limits 和 delivery options 的完整参考
- Delegation —— 深入了解并行 sub-agent workflows
- Messaging Platforms —— 设置 Telegram、Discord 或其他 delivery targets
- Memory —— 跨 sessions 的持久化上下文
- Tips & Best Practices —— 更多 prompt engineering 建议