The workflow engine that doesn't turn into an SRE project.

Dagu is a lightweight workflow engine that comes with a Web UI. Define any worflows in a simple declarative YAML format. It natively suports shell commands, docker containers, k8s jobs, SSH commands, and more. Self-contained and no DBMS is required.

Dagu专为希望实现强大工作流编排而无需运维负担的开发者而生。

Linux
macOS
Windows
Docker
Kubernetes
查看示例
试用在线演示
登录凭据demouser / demouser
dagu start-all --port 8080
安装 dagu 命令
$curl -fsSL https://raw.githubusercontent.com/dagucloud/dagu/main/scripts/installer.sh | bash

自包含

工作流基于文件。单一二进制文件,无需外部数据库或消息代理。支持气隙环境。

以CLI为核心

Shell脚本、Python作业、SQL、dbt、DuckDB、容器和数据处理手册直接作为流水线步骤运行,无需修改。不需要迁移到新框架。

声明式

用简单、声明式的 YAML 格式定义工作流。你可以不做任何修改地使用现有脚本或工具。

安全的AI代理集成

使用您喜爱的AI代理来创建、改进、调试和运行工作流。内置密钥管理对日志和代理隐藏凭据,同时仍允许它们安全地预览和执行任务。完整的审计日志确保合规性和可见性。

通过MCP配置
workflow.yaml
# 带类型输入和审核的受控生产 Runbook
name: "repair-customer-account"

params:
- name: customer_id
type: string
- name: change_scope
type: string
enum: ["metadata_only", "permissions"]
default: metadata_only
- name: dry_run
type: boolean
default: true

steps:
- id: inspect_account
run: ./scripts/inspect-account.sh --customer $${customer_id}
stdout:
artifact: reports/inspection.md

- id: review
action: noop
depends: [inspect_account]
approval:
prompt: "Review the inspection report before repair."

- id: repair_account
run: ./scripts/repair-account.sh --customer $${customer_id} --scope $${change_scope} --dry-run $${dry_run}
depends: [review]
stdout:
artifact: reports/repair.log

Trusted by developers at

1Password
Intel
MongoDB
Baidu
ByteDance
Canonical
Grab
Douban
Debian
NASA / JPL
Gitee
Plaid
Geodis
Aleno
Mambu
Audibene
NINAnor
RUBIX GmbH
cynkra
DataLad
dandi
QNIB Solutions
modoolar
TTT Studios
vital-software
m3dev
Build On Technologies
Dalibo
InfoInnova
infront-quant
gfx-labs
t54-labs
sajo
ANZX
1Password
Intel
MongoDB
Baidu
ByteDance
Canonical
Grab
Douban
Debian
NASA / JPL
Gitee
Plaid
Geodis
Aleno
Mambu
Audibene
NINAnor
RUBIX GmbH
cynkra
DataLad
dandi
QNIB Solutions
modoolar
TTT Studios
vital-software
m3dev
Build On Technologies
Dalibo
InfoInnova
infront-quant
gfx-labs
t54-labs
sajo
ANZX
1Password
Intel
MongoDB
Baidu
ByteDance
Canonical
Grab
Douban
Debian
NASA / JPL
Gitee
Plaid
Geodis
Aleno
Mambu
Audibene
NINAnor
RUBIX GmbH
cynkra
DataLad
dandi
QNIB Solutions
modoolar
TTT Studios
vital-software
m3dev
Build On Technologies
Dalibo
InfoInnova
infront-quant
gfx-labs
t54-labs
sajo
ANZX

AI agent 网关

给 AI agent 批准过的操作,而不是生产访问权限。

Dagu 通过 MCP 暴露私有工作流,并提供范围化权限、仅运行时注入的密钥、日志、历史和审计记录。

AI agent

请求已批准的操作,而不接触私有凭证。

请求

Dagu MCP

在任何工作流运行前执行细粒度访问控制。

授权

已批准工作流

运行你已经信任的脚本、容器、SQL、HTTP、SSH 或子工作流。

执行

私有系统

生产工具和数据留在 Dagu 后面,而不是进入 agent 上下文。

ShellSQLSSH

Agent 不会拿到 shell、数据库或 API 凭证,而是通过 Dagu MCP 请求一个命名的工作流操作。

Dagu 检查访问权限,只在运行时注入密钥,并可让敏感工作流暂停等待人工审批。

每次运行都会保留日志、输出、状态、历史和审计证据,供人和 agent 查看。

范围化访问

只暴露每个 agent 被允许运行的操作。

托管密钥

运行时注入凭证,不向 agent 暴露。

审计记录

追踪谁或什么运行了每个工作流,以及输入是什么。

审批

高风险操作可暂停等待人工审核。

安全结果

返回状态和输出,而不开放原始系统访问。

Agent 得到的是有边界的工具。密钥、日志、权限和操作历史都留在 Dagu。

部署模型

运行自托管实例,使用Dagu托管服务器,或将云控制平面与基础设施中的私有工作节点结合使用。

从一台机器开始,扩展到自托管、托管或 Hybrid。

本地

单服务器

在一台机器上运行 `dagu start-all`,并使用本地文件保存状态。不需要 database、broker 或 platform stack。

自托管

你的基础设施

将 Dagu server、workers、secrets、logs 和 execution 保留在自己的环境中。

Dagu

全托管服务器

使用由 Dagu 在 GKE isolated gVisor instance 中运营的 dedicated Dagu server。

混合

托管服务器,私有执行

让 Dagu 运营 server,同时 private workers 运行 Docker、private-network 或 data-local steps。

混合执行

托管 Dagu 服务器
通过 mTLS 连接的 private worker
Docker、private APIs、secrets 和 data-local work

Hybrid 让 Dagu server 保持托管,同时需要你的 network、runtime 或 data 的 execution 仍由你控制。

生产级工作流引擎功能

经过实战检验的工作流引擎功能,让你专注于核心价值,无需担心编排问题。

性能

根据硬件、工作流形态、步骤耗时和队列配置,在一台机器上每天运行数千次工作流。

分布式执行

使用队列、并发限制和分布式 workers 控制负载,并把 jobs 分散到多台机器。

通知

定期调度、补跑、持久执行、超时、重跑、通知,以及将事故路由给响应人员。

认证与RBAC

用户管理、RBAC、工作区、审批步骤、内置密钥管理、API密钥和Webhook。

真实使用场景

01

客户支持自动化

将重复的工程请求转化为自助服务工作流。业务团队可以独立运行,工程师无需介入。

02

Cron 和遗留脚本管理

把现有 shell 脚本、Python 脚本、HTTP 调用和定时任务带入 Dagu,无需重写。

03

基础设施与服务器自动化

编排 SSH 备份、清理任务、部署脚本、补丁窗口、前置检查和生命周期钩子。

04

ETL 与数据运维

运行 PostgreSQL 或 SQLite 查询、S3 传输、jq 转换、验证步骤和可复用子工作流。

05

GitHub 作为界面,你的基础设施作为运行时。

通过托管的Dagu GitHub App,从issue和PR的GitHub事件触发Dagu运行。

06

容器与 Kubernetes 工作流

组合每一步都能运行 Docker 镜像、Kubernetes Job、shell 命令或验证步骤的工作流。

07

媒体转换

在 worker 上运行 ffmpeg、缩略图提取、音频归一化、图像处理和其他重计算任务。

08

IoT 与边缘工作流

在小型设备上运行传感器采集、本地清理、离线同步、健康检查和设备维护任务。

09

AI 智能体工作流

运行任何工具链,通过清晰的上下文和自动重试与故障转移来自动化特定的开发工作流。

常见模式

Health Check
SSH Backup
Notify

私有脚本工作流

把私有脚本、内部 CLI、可复用 actions、固定工具和产物变成其他团队可安全请求或运行的工作流。

  • 1保留现有脚本和命令
  • 2公开狭窄参数,而不是广泛生产访问权限
  • 3调用带类型输出的版本化 Dagu Actions
  • 4把报告和日志作为一等产物保存
workflow.yaml
tools:
  - jqlang/jq@jq-1.7.1

steps:
  - id: collect
    action: acme/dagu-action-export@v1.4.2
    with:
      dataset: customers

  - id: transform
    run: jq '.items[] | {id, email}' ${collect.outputs.path}
    stdout:
      artifact: reports/customers.json
    depends: [collect]

  - id: publish
    action: outputs.write
    with:
      values:
        report: reports/customers.json
        rows: ${collect.outputs.rows}
    depends: [transform]

类型化参数

Dagu自动在Web UI中将其渲染为类型化参数输入表单,适合构建自助服务工作流或供非工程师操作使用。

workflow.yaml
tools:
  - jqlang/jq@jq-1.7.1

steps:
  - id: inspect
    run: jq --version

  - id: summarize
    action: python-script@v1
    with:
      input:
        rows: [42, 8]
      script: |
        return {"total": sum(input["rows"])}

Dagu 默认使用 aqua 来准备 tools。

Slack中的多人协作AI代理

Slack中的AI代理帮助你管理工作流、调试故障并恢复事故。

DaguDagu
消息...

完整的工作流功能

Dagu配备了生产级工作流引擎功能。

深受开发者喜爱

来自 Dagu GitHub 社区的真实评论。

This is literally my dream project. I have set up GitLab at some point just to run some commands and this project is perfect for all my use case. Thank you very much!

@vnghia

Developer

#827

Dagu is really a gem in the open source world! ❤️ What a release — with GitHub Actions as well. Thanks guys.

@borestad

Elk Studios

#1313

Dagu is an amazing tool!! It works perfectly now, thank you so much! 💖

@jarnik

Freelance developer

#1294

I've been exploring Dagu for a few weeks and really love the Zero-Ops philosophy. The declarative YAML approach is exactly what the workflow orchestration space needs.

@vincent067

Developer

#1814

Amazing! I did not expect this to be delivered that fast! Multiple schedulers do not compete and the locking mechanism works as expected. Good job!

@jonasban

Developer

#1130

I've recently played around with Dagu for private stuff and think it could also be worth introducing at work.

@DarkWiiPlayer

Developer

#924

Awesome, it works like a charm! I second the update of the doc on this one.

@thibmart1

Developer

#1320

That's very impressive. The exit code dictionary will make these DAGs even further sophisticated. Once again, very good features. 🫡

@ghansham

Developer

#1076

This is literally my dream project. I have set up GitLab at some point just to run some commands and this project is perfect for all my use case. Thank you very much!

@vnghia

Developer

#827

Dagu is really a gem in the open source world! ❤️ What a release — with GitHub Actions as well. Thanks guys.

@borestad

Elk Studios

#1313

Dagu is an amazing tool!! It works perfectly now, thank you so much! 💖

@jarnik

Freelance developer

#1294

I've been exploring Dagu for a few weeks and really love the Zero-Ops philosophy. The declarative YAML approach is exactly what the workflow orchestration space needs.

@vincent067

Developer

#1814

Amazing! I did not expect this to be delivered that fast! Multiple schedulers do not compete and the locking mechanism works as expected. Good job!

@jonasban

Developer

#1130

I've recently played around with Dagu for private stuff and think it could also be worth introducing at work.

@DarkWiiPlayer

Developer

#924

Awesome, it works like a charm! I second the update of the doc on this one.

@thibmart1

Developer

#1320

That's very impressive. The exit code dictionary will make these DAGs even further sophisticated. Once again, very good features. 🫡

@ghansham

Developer

#1076

This is literally my dream project. I have set up GitLab at some point just to run some commands and this project is perfect for all my use case. Thank you very much!

@vnghia

Developer

#827

Dagu is really a gem in the open source world! ❤️ What a release — with GitHub Actions as well. Thanks guys.

@borestad

Elk Studios

#1313

Dagu is an amazing tool!! It works perfectly now, thank you so much! 💖

@jarnik

Freelance developer

#1294

I've been exploring Dagu for a few weeks and really love the Zero-Ops philosophy. The declarative YAML approach is exactly what the workflow orchestration space needs.

@vincent067

Developer

#1814

Amazing! I did not expect this to be delivered that fast! Multiple schedulers do not compete and the locking mechanism works as expected. Good job!

@jonasban

Developer

#1130

I've recently played around with Dagu for private stuff and think it could also be worth introducing at work.

@DarkWiiPlayer

Developer

#924

Awesome, it works like a charm! I second the update of the doc on this one.

@thibmart1

Developer

#1320

That's very impressive. The exit code dictionary will make these DAGs even further sophisticated. Once again, very good features. 🫡

@ghansham

Developer

#1076

I love how simple this is now.

@n3storm

Estudio Nexos

#1593

Fantastic! Thanks for the quick reply — keep up the great project!

@mitchplze

Developer

#1359

Amazing support! Thank you!

@kacamific

Developer

#760

It works perfectly with v2.6.1. Thank you very much for the correction.

@napnap75

Developer

#1638

Thanks for the fix. Works great now.

@triole

Developer

#831

As always, appreciate the great work — just sharing feedback to help shape the roadmap.

@jonnochoo

Developer

#770

it's awesome you keep working on it 👍

@fishnux

Developer

#328

Thank you so much for the quick fix! I tested it, and it now correctly stores the files where it should.

@IngwiePhoenix

Developer

#423

I love how simple this is now.

@n3storm

Estudio Nexos

#1593

Fantastic! Thanks for the quick reply — keep up the great project!

@mitchplze

Developer

#1359

Amazing support! Thank you!

@kacamific

Developer

#760

It works perfectly with v2.6.1. Thank you very much for the correction.

@napnap75

Developer

#1638

Thanks for the fix. Works great now.

@triole

Developer

#831

As always, appreciate the great work — just sharing feedback to help shape the roadmap.

@jonnochoo

Developer

#770

it's awesome you keep working on it 👍

@fishnux

Developer

#328

Thank you so much for the quick fix! I tested it, and it now correctly stores the files where it should.

@IngwiePhoenix

Developer

#423

I love how simple this is now.

@n3storm

Estudio Nexos

#1593

Fantastic! Thanks for the quick reply — keep up the great project!

@mitchplze

Developer

#1359

Amazing support! Thank you!

@kacamific

Developer

#760

It works perfectly with v2.6.1. Thank you very much for the correction.

@napnap75

Developer

#1638

Thanks for the fix. Works great now.

@triole

Developer

#831

As always, appreciate the great work — just sharing feedback to help shape the roadmap.

@jonnochoo

Developer

#770

it's awesome you keep working on it 👍

@fishnux

Developer

#328

Thank you so much for the quick fix! I tested it, and it now correctly stores the files where it should.

@IngwiePhoenix

Developer

#423

快速开始

先用引导式安装器安装 Dagu,再继续查看完整安装指南或快速开始文档。

1

安装 dagu 命令

脚本安装器是最推荐的方式。Homebrew、npm 和 Docker 也可用,但它们只提供二进制或容器安装。

Mac/Linux 终端
$curl -fsSL https://raw.githubusercontent.com/dagucloud/dagu/main/scripts/installer.sh | bash
✓ 引导式安装器已就绪
可选

连接 AI 工具

安装 Dagu 技能用于编写 workflow,或将 MCP 客户端连接到正在运行的 Dagu 服务器。

Dagu 技能
$gh skill install dagucloud/dagu dagu

帮助 Claude Code、Codex、Gemini CLI 等 AI 编程工具编写 Dagu YAML。

Dagu MCP 端点
URLhttp://localhost:8080/mcp

让支持 MCP 的客户端读取 Dagu 状态、预览更改并控制 DAG 运行。

基于 OIDC/SSO 的 MCP 访问适用于企业部署。请联系我们讨论配置。

2

下一步

引导式安装器可以帮你完成首次启动配置。

# 安装器可以完成的内容
把 Dagu 加入 PATH
配置后台服务
创建并验证首个管理员

项目社区

讨论用法、报告问题并关注开发进展。

解决方案伙伴

面向客户项目的解决方案伙伴支持

对于把 Dagu 嵌入客户产品、内部平台或托管服务的团队,我们提供企业功能和实际集成支持。

我们帮助伙伴设计安全模型、集成路径和运营计划,让 Dagu 能干净地融入客户项目,而不需要授予宽泛的生产访问权限。

联系我们

Enterprise OIDC/SSO 和访问控制

面向 agent 和客户工作流的 MCP 支持

自托管、托管或混合部署的架构评审

私有 worker、密钥和网络内执行配置

将脚本和 runbook 迁移为面向客户的工作流

从项目交付到生产上线的专属支持