> 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/advanced-basic/automation.md).

# 自动化与外部触达

Cherry Studio 的自动化不是单独的一组“机器人设置”。Agent 负责完成工作，频道负责从外部平台收发消息，定时任务负责在指定时间启动 Agent，心跳则用于让 Agent 周期检查自己的持续工作。

<figure><img src="/files/cgGLTYkflrskhwhODA3F" alt="定时任务、心跳或频道触发 Agent 执行并发送结果的自动化关系图"><figcaption><p>触发、执行、通知和运行历史是不同环节；先手动跑通 Agent，再逐步接入。</p></figcaption></figure>

## 四者如何配合

| 能力    | 负责什么            | 典型用途               |
| ----- | --------------- | ------------------ |
| Agent | 执行任务并生成结果       | 汇总、检查、写作、文件处理      |
| 频道    | 接收外部消息并发送通知     | 飞书群机器人、Telegram 私聊 |
| 定时任务  | 在明确时间运行 Agent   | 日报、周报、一次性提醒        |
| 心跳    | Agent 按间隔检查持续工作 | 监控长流程、检查待处理事项      |

<figure><img src="/files/jkYPbUCC3QSRq8dIpm7G" alt="频道设置中的平台列表和添加入口"><figcaption><p>频道负责把 Agent 接到飞书、Telegram、QQ、微信、Discord 或 Slack。</p></figcaption></figure>

## 正确的配置顺序

{% stepper %}
{% step %}

### 1. 先在【工作】中跑通任务

确认 Agent 的模型、提示词、工作目录和工具可以稳定产生期望结果。
{% endstep %}

{% step %}

### 2. 再让 Agent 引导配置频道

在 Agent 对话中说明平台和用途，例如“把这个 Agent 接到飞书群，用于接收日报请求”。按照提示准备机器人权限和凭据。
{% endstep %}

{% step %}

### 3. 用手动设置核对状态

打开【设置】→【频道】，检查凭据、绑定 Agent、工作区、允许的会话范围和频道权限模式，并发送一条测试消息。
{% endstep %}

{% step %}

### 4. 最后创建定时任务

可以直接让 Agent 创建，也可以打开【设置】→【定时任务】→【新建】。选择已经验证的 Agent、工作区、时间和通知频道。
{% endstep %}
{% endstepper %}

## 上线前检查

* 频道只允许需要的会话或频道 ID；
* 外部入口使用【继承智能体设置】或更严格的权限；
* 定时任务提示词不包含会变化的密钥和路径；
* 先手动【运行】一次并查看运行记录；
* 失败时能在 Cherry Studio 内找到对应任务，不把“未发送”误判成“未执行”。

## 用户案例：工作日运营日报

“运营日报”Agent 从工作目录读取数据，按团队技能生成日报。飞书频道负责把结果送到指定群，定时任务在每个工作日早上运行。上线前先手动执行，再在飞书中给机器人发送消息以建立接收目标，最后才启用计划。

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