Skip to content

What is Dagu?

Dagu

Dagu is a self-contained workflow engine for orchestrating shell commands, containers, and remote tasks. Define workflows in declarative YAML, execute them with a single binary, and compose complex pipelines from reusable sub-workflows. No database, message broker, or external dependencies required.

Key Capabilities

  • Single binary deployment - Install and run without external services
  • Declarative YAML - JSON Schema validation with clear error messages
  • Composable workflows - Nest sub-DAGs with parameters to unlimited depth
  • Distributed execution - Route tasks to workers via labels (GPU, region, etc.)
  • Built-in scheduling - Cron expressions with start/stop/restart support
  • Web UI - Monitor, control, and debug workflows in real-time

How It Works

Dagu executes workflows defined as steps in YAML. Steps form a Directed Acyclic Graph (DAG), ensuring predictable execution order.

Sequential Execution

yaml
type: chain
steps:
  - command: echo "Step 1"
  - command: echo "Step 2"

Parallel Execution

yaml
type: graph
steps:
  - id: step_1
    command: echo "Step 1"
  - id: step_2a
    command: echo "Step 2a"
    depends: [step_1]
  - id: step_2b
    command: echo "Step 2b"
    depends: [step_1]
  - id: step_3
    command: echo "Step 3"
    depends: [step_2a, step_2b]

Architecture Overview

Local mode: CLI, Web UI, or API triggers the Agent, which runs steps via Executors.

Distributed mode: Scheduler dispatches work to a Coordinator, which routes tasks to Workers based on label selectors (e.g., gpu=true, region=us-east).

See Architecture for details.

Built-in Step Types

TypeDescription
commandShell commands (bash, sh, PowerShell, cmd)
dockerContainer execution with volume mounts and registry auth
sshRemote command execution via SSH
httpHTTP/REST API requests
jqJSON query and transformation
mailEmail notifications with attachments
dagSub-workflow execution (hierarchical composition)

See Step Types Reference for configuration details.

Demo

CLI: Create and execute workflows from the command line.

CLI Demo

CLI Documentation

Web UI: Monitor executions, view logs, and manage workflows visually.

Web UI Demo

Web UI Documentation

Learn More

Released under the MIT License.