Dagu工作流引擎 是 AI Skill Hub 本期精选Agent工作流之一。已获得 3.4k 颗 GitHub Star,综合评分 8.2 分,整体质量较高。我们强烈推荐将其纳入你的 AI 工具库,帮助提升工作效率。
轻量级本地优先的工作流执行引擎,支持脚本、SQL、容器、SSH等多种任务执行方式。适合数据工程师、DevOps和自动化脚本开发者快速构建和管理复杂的数据管道与定时任务。
Dagu工作流引擎 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
轻量级本地优先的工作流执行引擎,支持脚本、SQL、容器、SSH等多种任务执行方式。适合数据工程师、DevOps和自动化脚本开发者快速构建和管理复杂的数据管道与定时任务。
Dagu工作流引擎 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
# 方式一:go install(推荐) go install github.com/dagucloud/dagu@latest # 方式二:从源码编译 git clone https://github.com/dagucloud/dagu cd dagu go build -o dagu . # 方式三:下载预编译二进制 # 访问 Releases 页面下载对应平台二进制文件 # https://github.com/dagucloud/dagu/releases
# 查看帮助 dagu --help # 基本运行 dagu [options] <input> # 详细使用说明请查阅文档 # https://github.com/dagucloud/dagu
# dagu 配置说明 # 查看配置选项 dagu --config-example > config.yml # 常见配置项 # output_dir: ./output # log_level: info # workers: 4 # 环境变量(覆盖配置文件) export DAGU_CONFIG="/path/to/config.yml"
Dagu is a local-first workflow engine for operations and internal automation. It is open source and self-hostable: a single binary with a built-in Web UI, no external database or message broker, running on Linux, macOS, and Windows. Define DAGs in a declarative YAML format. It natively supports shell commands, Docker containers, Kubernetes Jobs, remote commands via SSH, and more through Dagu Actions.
Dagu turns existing scripts and runbooks into production workflows with scheduling, retries, human tasks, and run history. It runs where your data and credentials live: on-prem, air-gapped, edge, or cloud, and scales from a single node to a fleet of workers.
Highlights:
macOS/Linux:
curl -fsSL https://raw.githubusercontent.com/dagucloud/dagu/main/scripts/installer.sh | bash
Homebrew:
brew install dagu
npm:
npm install -g --ignore-scripts=false @dagucloud/dagu
Windows (PowerShell):
irm https://raw.githubusercontent.com/dagucloud/dagu/main/scripts/installer.ps1 | iex
Docker:
docker run --rm -v ~/.dagu:/var/lib/dagu -p 8080:8080 ghcr.io/dagucloud/dagu:latest dagu start-all
This command does not expose the host Docker daemon to Dagu. Workflows that usecontainer:oraction: docker.runneed the container-step Docker setup. Mounting the Docker socket grants workflows control of the host daemon.
Kubernetes (Helm):
helm repo add dagu https://dagucloud.github.io/dagu
helm repo update
helm install dagu dagu/dagu --set persistence.storageClass=<your-rwx-storage-class>
Replace<your-rwx-storage-class>with a StorageClass that supportsReadWriteMany. See charts/dagu/README.md for chart configuration.
The script installers run a guided wizard that can add Dagu to your PATH, set it up as a background service, and create the initial admin account. Homebrew, npm, Docker, and Helm install without the wizard. See the Installation documentation for all options.
When Dagu itself runs in Docker, enable Docker daemon access before using container steps.
Pass standard docker run options directly in YAML, including the image, pull policy, platform, volume mounts, working directory, and resource limits:
resources:
limits:
cpu: 500m
memory: 512Mi
steps:
- id: report
action: docker.run
with:
image: ghcr.io/acme/reporting:1.4.2
pull: always
platform: linux/amd64
working_dir: /work
volumes:
- ~/orders:/work/data
auto_remove: true
command: python generate_report.py --input /work/data/orders.csv
See the Docker and DAG Run Resource Limits documentation for all configuration options.
| Use Case | How Dagu Helps |
|---|---|
| ETL and data operations | Turn data extraction scripts, SQL queries, dbt commands, and data-processing runbooks into observable pipelines with durable execution. |
| Legacy scripts and scheduled jobs | Turn interdependent scripts into maintainable DAGs with a UI, automatic logging, retries, and notifications instead of opaque cron jobs. |
| Media conversion | Run ffmpeg for video transcoding and format conversion. File-backed state allows workers to run heavy conversions in parallel without single-machine bottlenecks or external databases. |
| Infrastructure and server automation | Run any command or script over SSH on remote servers, keeping logs, results, and notifications in one place. |
| GitHub-driven workflows | Trigger workflows from GitHub events to run automation on private infrastructure without exposing servers to the public internet. |
| Container and Kubernetes workflows | Run Docker containers and Kubernetes Jobs as steps in your workflows without building a custom control plane around containers. |
| Customer support automation | Provide self-service workflows that non-engineering teams can run for diagnostics, database queries, and routine operations without escalating to engineering. |
| IoT and edge workflows | Run sensor polling, local ML inference, data preprocessing, backups, offline sync, and health checks close to the data source with Web UI visibility. |
Precedence: Command-line flags > Environment variables > Configuration file (~/.config/dagu/config.yaml)
| Command | Description |
|---|---|
dagu start <dag> | Execute a DAG |
dagu start-all | Start HTTP server + scheduler + coordinator |
dagu server | Start HTTP server only |
dagu scheduler | Start scheduler only |
dagu coordinator | Start coordinator (distributed mode) |
dagu worker | Start worker (distributed mode) |
dagu stop <dag> | Stop a running DAG |
dagu restart <dag> | Restart a DAG |
dagu retry --run-id=<run-id> <dag> | Retry a failed run |
dagu human-task complete --run-id=<run-id> --step=<id> <dag> | Complete a waiting human task |
dagu dry <dag> | Dry run: show what would execute |
dagu status <dag> | Show DAG run status |
dagu history <dag> | Show execution history |
dagu validate <dag> | Validate DAG YAML |
dagu enqueue <dag> | Add DAG to the execution queue |
dagu dequeue <queue-name> [--dag-run=<dag>:<run-id>] | Remove a DAG-run from the queue |
dagu cleanup <dag> | Clean up old run data |
dagu version | Show version |
The table lists the most common commands. The binary ships 31 in total, including exec, ls, ps, rm, sync, schema, example, config, profile, context, license, upgrade, and completion; run dagu --help or see the CLI reference for all of them.
Go applications can import Dagu and start DAG runs from the host process:
import "github.com/dagucloud/dagu/v2"
engine, err := dagu.New(ctx, dagu.Options{
HomeDir: "/var/lib/myapp/dagu",
})
if err != nil {
return err
}
defer engine.Close(context.Background())
run, err := engine.RunYAML(ctx, []byte(`
params:
- MESSAGE
steps:
- name: hello
run: echo "${params.MESSAGE}"
`), dagu.WithParams(map[string]string{
"MESSAGE": "hello from the host app",
}))
if err != nil {
return err
}
status, err := run.Wait(ctx)
if err != nil {
return err
}
fmt.Println(status.Status)
The embedded API is experimental and may change. See the embedded API documentation and examples/embedded.
Create hello.yaml:
steps:
- id: hello
run: echo "hello from Dagu"
Run the workflow with:
dagu start hello.yaml
中文项目简介:Dagu 是一个用于定义和执行工作流的工具,提供了一个简单的 YAML 语法来定义工作流步骤,并且可以在任何地方执行工作流。
中文功能介绍:Dagu 提供了多项功能,包括可观察性、语言无关性、可视化界面、状态跟踪和日志记录等。
环境依赖与系统要求中文说明:Dagu 不需要任何特定的环境依赖或系统要求。
中文安装步骤说明(含 Docker/pip/源码等部署方式):Dagu 可以通过多种方式安装,包括使用 Docker、Homebrew、PowerShell 和源码安装等。
中文使用教程:Dagu 可以用于 ETL 和数据操作、cron 和遗留脚本管理等场景,提供了一个可视化界面来定义和执行工作流。
配置说明(含 MCP / env / 关键参数):Dagu 支持通过环境变量、命令行标志和配置文件来配置。
API/接口说明:Dagu 提供了一个 API 来定义和执行工作流,支持多种类型的步骤和输出。
工作流 / 模块说明:Dagu 提供了一个简单的 YAML 语法来定义工作流步骤,并且可以在任何地方执行工作流,支持分布式任务和可视化界面等功能。
轻量高效的工作流引擎,Go语言实现保证性能,支持多种执行方式和MCP协议,是数据管道和任务调度的优选方案。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
⚠️ GPL 3.0 — 强 Copyleft,衍生作品须开源,含专利保护条款,不可闭源使用。
经综合评估,Dagu工作流引擎 在Agent工作流赛道中表现稳健,质量优秀。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | dagu |
| 原始描述 | 开源MCP工具:Local-first, lightweight workflow engine for any scripts, SQL, containers, SSH c。⭐3.4k · Go |
| Topics | 工作流引擎数据管道定时任务容器编排MCP工具 |
| GitHub | https://github.com/dagucloud/dagu |
| License | GPL-3.0 |
| 语言 | Go |
收录时间:2026-05-21 · 更新时间:2026-05-30 · License:GPL-3.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端