| 组件 | 用途 | 触发方式 | 适用场景 |
| Heartbeat | 周期性检查 | 自动定时 | 批量检查、上下文感知监控 |
| Cron | 精确定时任务 | 时间驱动 | 固定时间执行、独立任务 |
| Hooks | 事件驱动响应 | 事件触发 | 命令响应、生命周期管理 |
| Webhook | 外部系统集成 | HTTP 请求 | 第三方系统对接、推送接收 |
| 配置项 | 类型 | 默认值 | 说明 |
| every | string | "30m" | 心跳间隔,如 "15m"、"1h" |
| target | string | "none" | 消息投递目标:"none"、"last" 或具体渠道 |
| activeHours.start | string | - | 活跃开始时间(本地时间) |
| activeHours.end | string | - | 活跃结束时间(本地时间) |
| 特性 | 主会话模式 | 隔离模式 |
| 会话上下文 | 共享主会话历史 | 全新会话 |
| 任务类型 | 系统事件 | 独立 Agent 执行 |
| 消息投递 | 通过心跳提示 | 直接投递或摘要 |
| 模型选择 | 使用主会话模型 | 可单独指定 |
| 适用场景 | 需要上下文的提醒 | 独立报告、批量任务 |
| 表达式 | 说明 |
| 0 7 * * * | 每天早上 7:00 |
| 0 9 * * 1 | 每周一早上 9:00 |
| 0 18 * * 1-5 | 工作日晚上 6:00 |
| */15 * * * * | 每 15 分钟 |
| 0 */2 * * * | 每 2 小时 |
| 0 0 1 * * | 每月 1 号零点 |
| 事件 | 触发时机 |
| command:new | 用户发送 /new 命令 |
| command:reset | 用户发送 /reset 命令 |
| command:stop | 用户发送 /stop 命令 |
| agent:bootstrap | Agent 初始化引导时 |
| gateway:startup | Gateway 启动时 |
| message:received | 收到消息时 |
| message:sent | 发送消息时 |
| Hook | 功能 | 事件 |
| session-memory | 保存会话记忆 | command:new |
| bootstrap-extra-files | 注入额外引导文件 | agent:bootstrap |
| command-logger | 记录命令审计日志 | command:* |
| boot-md | 启动时执行 BOOT.md | gateway:startup |
| 欢迎光临 AI创想 (https://llms-ai.com/) | Powered by Discuz! X3.4 |