H繁中版
文件教學與最佳實踐daily briefing bot
<!-- Source: https://hermesbible.com/docs/guides/daily-briefing-bot -->

教學:建立每日簡報機器人

在這篇教學中,你將建立一個個人化的簡報機器人,它每天早上自動醒來、研究你關心的主題、摘要發現結果,並將簡潔的簡報直接傳送到你的 Telegram 或 Discord。

完成後,你將擁有一個全自動的工作流,結合了網路搜尋cron 排程委派訊息傳遞——無需撰寫任何程式碼。

TIP

這個處方涵蓋了網路搜尋、摘要和可選的 TTS——全部包含在 Portal 訂閱中。最快的設定方式是 hermes setup --portal。詳見 Nous Portal

我們要建立什麼

以下是流程:

  1. 上午 8:00 — cron 排程器觸發你的任務
  2. Hermes 啟動一個全新的代理 session 並載入你的提示
  3. 網路搜尋拉取你主題的最新新聞
  4. 摘要將其精煉成簡潔的簡報格式
  5. 傳遞將簡報傳送到你的 Telegram 或 Discord

全程自動運行。你只需配著晨間咖啡閱讀你的簡報。

前置條件

開始之前,確保你已具備:

  • 已安裝 Hermes Agent — 請參見安裝指南
  • Gateway 正在運行 — gateway 守護行程負責執行 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 金鑰 — 在你的環境中設定 FIRECRAWL_API_KEY 以進行網路搜尋
  • 已設定訊息平台(可選但建議) — Telegram 或 Discord 已設定好 home 頻道

TIP — 沒有訊息平台?沒問題

你仍然可以使用 deliver: "local" 來跟隨這篇教學。簡報會儲存到 ~/.hermes/cron/output/,你隨時可以閱讀。

步驟 1:手動測試工作流

在自動化之前,先確認簡報功能正常。啟動聊天 session:

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

如果這能正常運作,你就準備好自動化它了。

TIP — 反覆調整格式

嘗試不同的提示,直到你得到滿意的輸出。加入如「使用 emoji 標題」或「每個摘要保持在 2 句話以內」等指令。你最終確定的格式就會用在 cron 任務中。

步驟 2:建立 Cron 任務

現在讓我們安排它每天早上自動運行。你可以透過兩種方式完成。

在建立 cron 任務之前,確保 Hermes 在全域範圍內已設定好預設模型和提供者。如果你希望特定任務使用不同的值,請在建立時設定明確的每任務模型/提供者覆寫。

選項 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 工具為你建立 cron 任務。

選項 B:CLI Slash 指令

使用 /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."

黃金法則:自包含的提示

WARNING — 關鍵概念

Cron 任務在完全全新的 session 中運行——不記得你之前的對話,不知道你「之前設定過什麼」。你的提示必須包含代理執行任務所需的所有資訊。

不好的提示:

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.

好的提示明確說明了搜尋什麼多少篇文章什麼格式什麼語氣。一次搞定代理所需的一切。

步驟 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 將每個主題委派給子代理:

/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."

每個子代理獨立且平行地搜尋,然後主代理將所有內容合併為一份精美的簡報。詳見委派文件了解更多運作方式。

僅工作日排程

週末不需要簡報?使用針對週一到週五的 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 加入個人上下文

如果你啟用了 memory,你可以儲存跨 session 持續的偏好設定。但記住——cron 任務在沒有對話記憶的全新 session 中運行。要加入個人上下文,直接將其寫入提示中:

/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."

TIP — 客製化角色

包含簡報對象的細節可以顯著提升相關性。告訴代理你的角色、興趣,以及什麼該跳過。

步驟 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") 刪除它。

檢查 Gateway 狀態

確保排程器正在運行:

hermes cron status

如果 gateway 沒有運行,你的任務就不會執行。將其安裝為背景服務以確保可靠性:

hermes gateway install
# or on Linux servers
sudo hermes gateway install --system

進一步探索

你已經建立了一個可用的每日簡報機器人。以下是一些可以進一步探索的方向:

TIP — 還能排程什麼?

簡報機器人模式適用於任何事物:競爭對手監控、GitHub 倉庫摘要、天氣預報、投資組合追蹤、伺服器健康檢查,甚至是每日笑話。只要能用提示描述它,你就能排程它。



教學:團隊 Telegram 助理