Skip to content

Automations 指南

DotCraft 原生 Automations 仅覆盖本地任务。它从当前工作区的 .craft/tasks/ 读取任务文件,按计划或手动触发 Agent,支持线程绑定、模板、重试、活动展示和 CompleteLocalTask 完成路径。

创建本地任务

一个本地任务位于 .craft/tasks/<task-id>/

text
.craft/
  tasks/
    weekly-report/
      task.md
      workflow.md

task.md 描述任务标题、正文、调度和线程绑定;workflow.md 描述 Agent 要执行的工作流提示词。

常用能力

能力说明
手动运行Desktop Automations 面板或 AppServer automation/task/run
定时运行在任务文件中配置 schedule
线程绑定将任务绑定到已有线程,后续运行提交到该线程
模板.craft/automations/templates/ 保存可复用任务模板
完成工具Agent 调用 CompleteLocalTask 写入完成摘要
删除任务删除任务文件夹,并可同时删除关联线程

AppServer 方法

方法说明
automation/task/list列出本地任务
automation/task/read读取单个本地任务
automation/task/create创建本地任务
automation/task/run立即运行本地任务
automation/task/updateBinding更新或清除线程绑定
automation/task/delete删除本地任务
automation/template/list列出模板
automation/template/save保存用户模板
automation/template/delete删除用户模板

更多字段见 Automations 参考

Apache License 2.0