feat: add scheduler functionality with cron-style task management (#306)
* feat: add scheduler functionality with cron-style task management - Implemented a new scheduler subagent to automate recurring tasks using cron expressions. - Enhanced the subagent factory to include the skill manager and auxiliary chat model for the scheduler. - Created a YAML configuration for the scheduler with a detailed system prompt and toolset. - Updated README files to include documentation on scheduled tasks and usage examples. - Added tests for the scheduler, including command execution, scheduling tools, and middleware integration. - Introduced new dependencies for timezone handling and ensured compatibility in the project configuration. * fix(async-notifier): ensure fallback hint is used for unknown notification kinds * feat: enhance scheduling functionality and improve system message handling
This commit is contained in:
+28
-2
@@ -185,6 +185,7 @@ EvoScientist 超越了传统的人在回路(Human-in-the-Loop)模式,采
|
||||
- [📦 安装](#-安装)
|
||||
- [🔑 配置](#-配置)
|
||||
- [⚡ 快速上手](#-快速上手)
|
||||
- [⏰ 定时任务](#-定时任务)
|
||||
- [🍪 示例与实践](#-示例与实践)
|
||||
- [🔌 MCP 集成](#-mcp-集成)
|
||||
- [📱 渠道接入](#-渠道接入)
|
||||
@@ -544,6 +545,31 @@ for state in EvoScientist_agent.stream(
|
||||
|
||||
<p align="right"><a href="#top">🔝回到顶部</a></p>
|
||||
|
||||
## ⏰ 定时任务
|
||||
|
||||
用 cron 风格的计划任务自动化重复性研究工作。
|
||||
|
||||
```bash
|
||||
# 添加计划任务(/schedule add 需要 cron 表达式)
|
||||
/schedule add "0 9 * * 1-5" "用 paper-navigator 技能总结 arXiv 上最新的 ML 论文,并把摘要保存到 /memories/daily-papers.md"
|
||||
/schedule add "*/10 * * * *" "检查我正在运行的实验状态,并把结果追加到 experiment_log.json"
|
||||
|
||||
# 管理计划任务
|
||||
/schedule list # 列出活跃的计划任务
|
||||
/schedule remove <id> # 删除一个计划任务
|
||||
/schedule run <id> # 立即触发一次
|
||||
/schedule pause <id> # 暂停但不删除
|
||||
/schedule resume <id> # 恢复已暂停的计划任务
|
||||
```
|
||||
|
||||
说明:`/schedule add` 需要 cron 表达式(5 字段,例如 `*/10 * * * *`)。想用自然语言("每 10 分钟")排程,直接在对话里说即可——智能体会通过 `schedule_task` 工具自动翻译。
|
||||
|
||||
输出写到任务 prompt 指定的位置——没有强制的输出目录,所以请在 prompt 里写明文件位置。用 `/schedule list` 查看计划任务;智能体也会通过 `<scheduled_tasks>` 上下文块感知当前的计划任务,所以你也可以直接问它有哪些任务。
|
||||
|
||||
> **成本提示:** 每次计划任务运行都会消耗 LLM token。不用的任务请用 `/schedule remove` 删除,避免持续计费。
|
||||
|
||||
<p align="right"><a href="#top">🔝回到顶部</a></p>
|
||||
|
||||
## 🍪 示例与实践
|
||||
|
||||
收集了一些官方示例、进阶用法和社区贡献的实践方案,帮助你更好地使用 EvoScientist。
|
||||
@@ -617,9 +643,9 @@ channel_enabled: "telegram,slack,feishu,qq"
|
||||
- [x] 📑 技术报告已发布
|
||||
- [x] 🔐 OAuth 登录(CLI 编程智能体订阅用户)
|
||||
- [x] 📺 带工作区的 Web 应用界面(beta)
|
||||
- [x] ⏰ 定时任务(cron 风格,通过 /schedule)
|
||||
- [ ] 📹 Demo 与教程正在制作中
|
||||
- [ ] 📊 基准测试套件即将推出
|
||||
- [ ] ⏰ 核心系统定时任务规划中
|
||||
|
||||
敬请期待——更多功能正在路上!
|
||||
|
||||
@@ -634,7 +660,7 @@ channel_enabled: "telegram,slack,feishu,qq"
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="https://x-izhang.github.io/">
|
||||
<img src="https://x-izhang.github.io/author/xi-zhang/avatar_hu13660783057866068725.jpg"
|
||||
<img src="https://x-izhang.github.io/author/xi-zhang/avatar.jpg"
|
||||
width="100" height="100"
|
||||
style="object-fit: cover; border-radius: 20%;" alt="Xi Zhang"/>
|
||||
<br />
|
||||
|
||||
Reference in New Issue
Block a user