Hermes Agent Wiki 非公式・日本語wiki

チュートリアル: 毎朝のブリーフィングボットを作る

目次

このチュートリアルでは、毎朝ひとりでに動き出して、あなたの気になるテーマを調べ、要点をまとめ、短いブリーフィングとして Telegram や Discord に届けてくれるボットを作ります。

作り終えるころには、Web 検索cron による予約実行委任メッセージ配信を組み合わせた、完全に自動の流れが手元にできています。コードは書きません。

何を作るか

流れはこうです。

  1. 午前 8 時 — cron のスケジューラがジョブを起動します
  2. Hermes が立ち上がり、あなたのプロンプトで新しいエージェントのセッションを始めます
  3. Web 検索で、テーマに関する最新のニュースを集めます
  4. 要約で、すっきりしたブリーフィングの形にまとめます
  5. 配信で、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 キー — Web 検索のために、環境変数 FIRECRAWL_API_KEY を設定します
  • メッセージ連携の設定(必須ではありませんがおすすめです) — Telegram か Discord を、ホームチャンネル付きで設定しておきます

ステップ 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 が Web を検索し、結果を読み込んで、こんな形のものを返します。

☀️ 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 ジョブを作る

では、これを毎朝ひとりでに動くようにしましょう。やり方は 2 通りあります。

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 のスラッシュコマンド

もっと細かく指定したいときは /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."

鉄則: プロンプトはそれだけで完結させる

悪いプロンプト:

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

サブエージェントがそれぞれ独立に、並行して検索し、そのあと本体のエージェントが全部をひとつの整ったブリーフィングにまとめます。仕組みの詳しいところは Delegation docs をご覧ください。

平日だけに絞る

週末はブリーフィングが要りませんか。月曜から金曜だけを狙う cron 式を使いましょう。

/cron add "0 8 * * 1-5" "Search for the latest AI and tech news..."

1 日 2 回のブリーフィング

朝は概況、夕方は振り返りという形にもできます。

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

ステップ 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 — 並行するサブエージェントの使い方を詳しく
  • Messaging Platforms — Telegram、Discord、その他の配信先を設定する
  • Memory — セッションをまたいで残る前提
  • Tips & Best Practices — プロンプトの書き方をもっと詳しく