---
title: "チュートリアル: 毎朝のブリーフィングボット"
description: "気になるテーマを自動で調べ、要点をまとめ、毎朝 Telegram や Discord に届けてくれるブリーフィングボットを作ります"
upstream_path: guides/daily-briefing-bot.md
upstream_blob: a4fda461be8feca8f3840ac77ec89719d9674408
sources:
  - https://hermes-agent.nousresearch.com/docs/guides/daily-briefing-bot
---

# チュートリアル: 毎朝のブリーフィングボットを作る {#tutorial-build-a-daily-briefing-bot}

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

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

:::tip
このレシピが使うのは Web 検索、要約、そして必要なら音声合成で、いずれも Portal の購読にまとめて含まれています。いちばん早いのは `hermes setup --portal` です。[Nous Portal](/hermes/docs/integrations/nous-portal/) をご覧ください。
:::

## 何を作るか {#what-were-building}

流れはこうです。

1. **午前 8 時** — cron のスケジューラがジョブを起動します
2. **Hermes が立ち上がり**、あなたのプロンプトで新しいエージェントのセッションを始めます
3. **Web 検索**で、テーマに関する最新のニュースを集めます
4. **要約**で、すっきりしたブリーフィングの形にまとめます
5. **配信**で、Telegram か Discord に届けます

全部が手を触れずに進みます。あなたは朝のコーヒーを飲みながら読むだけです。

## 前提 {#prerequisites}

始める前に、次が揃っていることを確かめてください。

- **Hermes Agent がインストール済みであること** — [Installation guide](/hermes/docs/getting-started/installation/) をご覧ください
- **ゲートウェイが動いていること** — cron の実行を担うのはゲートウェイのデーモンです:
  ```bash
  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](/hermes/docs/user-guide/messaging/telegram/) か Discord を、ホームチャンネル付きで設定しておきます

:::tip メッセージ連携がなくても大丈夫
`deliver: "local"` を指定すれば、このチュートリアルはそのまま進められます。ブリーフィングは `~/.hermes/cron/output/` に保存されるので、いつでも読めます。
:::

## ステップ 1: 手動で動きを試す {#step-1-test-the-workflow-manually}

自動化に取りかかる前に、ブリーフィングがちゃんとできるか確かめましょう。チャットのセッションを始めます。

```bash
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
```

これがうまくいけば、自動化に進めます。

:::tip 形式は納得いくまで試す
気に入る出力が出るまで、プロンプトをいろいろ変えてみてください。「絵文字の見出しを使って」「要約は 1 つにつき 2 文以内で」といった指示を足すのもいいでしょう。落ち着いた形をそのまま cron ジョブに入れます。
:::

## ステップ 2: cron ジョブを作る {#step-2-create-the-cron-job}

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

cron ジョブを作る前に、Hermes 全体の既定のモデルとプロバイダが設定されていることを確かめてください。特定のジョブだけ別の値を使いたい場合は、作成時にそのジョブ用のモデル / プロバイダを明示して上書きします。

### 選択肢 A: ふつうの言葉で頼む（チャット内） {#option-a-natural-language-in-chat}

やってほしいことを、そのまま 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 のスラッシュコマンド {#option-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."
```

### 鉄則: プロンプトはそれだけで完結させる {#the-golden-rule-self-contained-prompts}

:::warning 大事な考え方
cron ジョブは**まっさらなセッション**で動きます。それまでの会話の記憶もなければ、「さっき決めておいた」ことも一切引き継がれません。仕事に必要なものは**全部**プロンプトの中に書いてください。
:::

**悪いプロンプト:**
```
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: ブリーフィングを作り込む {#step-3-customize-the-briefing}

基本のブリーフィングが動いたら、そこから自由に手を加えられます。

### 複数のテーマを扱う {#multi-topic-briefings}

ひとつのブリーフィングで、いくつかの分野をまとめて扱います。

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

### 委任で並行して調べる {#using-delegation-for-parallel-research}

ブリーフィングを速く仕上げたいときは、テーマごとにサブエージェントへ委任するよう 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](/hermes/docs/user-guide/features/delegation/) をご覧ください。

### 平日だけに絞る {#weekday-only-schedule}

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

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

### 1 日 2 回のブリーフィング {#twice-daily-briefings}

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

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

### メモリで自分向けの前提を足す {#adding-personal-context-with-memory}

[memory](/hermes/docs/user-guide/features/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."
```

:::tip 読み手像を伝える
そのブリーフィングが*誰のためのものか*を書き添えると、内容の的中率がぐっと上がります。自分の役割、興味、読み飛ばしてよいものをエージェントに伝えてください。
:::

## ステップ 4: ジョブを管理する {#step-4-manage-your-jobs}

### 予約済みのジョブを一覧する {#list-all-scheduled-jobs}

チャットからは:
```
/cron list
```

ターミナルからは:
```bash
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
```

### ジョブを消す {#remove-a-job}

チャットからは:
```
/cron remove a1b2c3d4
```

会話で頼むこともできます:
```
Remove my morning briefing cron job.
```

Hermes は `cronjob(action="list")` で対象を探し、`cronjob(action="remove")` で削除します。

### ゲートウェイの状態を確かめる {#check-gateway-status}

スケジューラがきちんと動いているか確認します。

```bash
hermes cron status
```

ゲートウェイが動いていないと、ジョブは実行されません。確実に動かすなら、バックグラウンドのサービスとして入れておきましょう。

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

## この先へ {#going-further}

これで、毎朝のブリーフィングボットが動くようになりました。次に進む先をいくつか挙げます。

- **[Scheduled Tasks (Cron)](/hermes/docs/user-guide/features/cron/)** — スケジュールの書き方、繰り返し回数の上限、配信先の指定を網羅した一覧
- **[Delegation](/hermes/docs/user-guide/features/delegation/)** — 並行するサブエージェントの使い方を詳しく
- **[Messaging Platforms](/hermes/docs/user-guide/messaging/)** — Telegram、Discord、その他の配信先を設定する
- **[Memory](/hermes/docs/user-guide/features/memory/)** — セッションをまたいで残る前提
- **[Tips & Best Practices](/hermes/docs/guides/tips/)** — プロンプトの書き方をもっと詳しく

:::tip ほかに何を予約できるか
このブリーフィングボットの型は、いろいろなものに応用できます。競合の動向の監視、GitHub リポジトリの要約、天気予報、資産の推移、サーバーの健全性チェック、日替わりのジョークまで。プロンプトで言い表せるものなら、何でも予約できます。
:::
