> For the complete documentation index, see [llms.txt](https://docs.cherryai.com.cn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cherryai.com.cn/docs/jp/advanced-basic/automation.md).

# 自動化と外部連携

Cherry Studio の自動化は、単独の「ボット設定」の集まりではありません。Agent は作業を完了する役割を担い、チャンネルは外部プラットフォームとのメッセージ送受信を担当し、定時タスクは指定した時間に Agent を起動し、ハートビートは Agent に定期的な自己チェックを行わせて継続作業を確認するために使われます。

<figure><img src="/files/dbaa16e4e65974c0c42e31c7356dbd94bc2220d8" alt="定时任务、心跳或频道触发 Agent 执行并发送结果的自动化关系图"><figcaption><p>トリガー、実行、通知、実行履歴はそれぞれ別の段階です。まずは手動で Agent を動かして一通り通したうえで、段階的に接続していきます。</p></figcaption></figure>

## この4つがどのように連携するか

| 機能     | 何を担当するか               | 典型的な用途                         |
| ------ | --------------------- | ------------------------------ |
| Agent  | タスクを実行し、結果を生成する       | 集計、確認、執筆、ファイル処理                |
| チャンネル  | 外部メッセージを受信し、通知を送信する   | Feishuグループボット、Telegram の個人チャット |
| 定期タスク  | 指定した時間に Agent を実行する   | 日報、週報、一回限りのリマインダー              |
| ハートビート | Agent が一定間隔で継続作業を確認する | 長い処理の監視、保留中事項の確認               |

<figure><img src="/files/896500618be1ae91974f6c5a3eea4d2201794daf" alt="频道设置中的平台列表和添加入口"><figcaption><p>チャンネルは、Agent を Feishu、Telegram、QQ、WeChat、Discord、または Slack に接続する役割を担います。</p></figcaption></figure>

## 正しい設定手順

{% stepper %}
{% step %}

### 1. まず【作業】でタスクを動かしてみる

Agent のモデル、プロンプト、作業ディレクトリ、ツールが安定して期待どおりの結果を出せることを確認します。
{% endstep %}

{% step %}

### 2. 次に Agent にチャンネル設定を案内させる

Agent との対話の中で、プラットフォームと用途を説明します。たとえば「この Agent を Feishu グループに接続して、日報依頼を受けられるようにする」といった形です。案内に従ってボットの権限と認証情報を準備します。
{% endstep %}

{% step %}

### 3. 手動設定で状態を確認する

【設定】→【チャンネル】を開き、認証情報、バインドされた Agent、ワークスペース、許可された会話範囲、チャンネル権限モードを確認し、テストメッセージを 1 件送信します。
{% endstep %}

{% step %}

### 4. 最後に定時タスクを作成する

Agent に直接作成させることも、【設定】→【定時タスク】→【新規】を開くこともできます。すでに検証済みの Agent、ワークスペース、時間、通知チャンネルを選択します。
{% endstep %}
{% endstepper %}

## 公開前のチェック

* チャンネルは必要な会話 ID またはチャンネル ID のみに許可する；
* 外部入口では【インテリジェントエージェント設定を継承】、またはそれより厳しい権限を使用する；
* 定時タスクのプロンプトに、変化する可能性のあるシークレットやパスを含めない；
* まず手動で一度【実行】し、実行記録を確認する；
* 失敗した場合でも Cherry Studio 内で該当タスクを見つけられ、「未送信」を「未実行」と誤判定しない。

## ユーザー事例：平日運用日報

「運用日報」Agent は作業ディレクトリからデータを読み取り、チームのスキルに基づいて日報を生成します。Feishu チャンネルは結果を指定グループへ送信し、定時タスクは毎営業日の朝に実行されます。公開前にまず手動実行し、その後 Feishu でボットにメッセージを送って受信先を作成し、最後にスケジュールを有効化します。

<details>

<summary>ハートビートと定時タスクの違いは何ですか？</summary>

ハートビートは一定間隔で Agent に継続作業を確認させるもので、「新しい状況があるか」に適しています。定時タスクには明確な実行計画と実行記録があり、「毎日何時に何をするか」に適しています。固定の日報には定時タスクを優先します。

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.cherryai.com.cn/docs/jp/advanced-basic/automation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
