Skip to content

Examples

Use these examples as copy-paste starting points for common Dagu workflow patterns.

Workflow Basics

  • Workflow Building Blocks - Commands, graphs, typed values, schedules, containers, AI agents, human tasks, artifacts, and reusable sub-workflows.
  • Control Flow - Human tasks, conditions, repetition, routing, nested workflows, and worker placement.
  • Reliability - Continue-on behavior, retries, backoff, and lifecycle handlers.

Data & Runtime

  • Data & Variables - Environment variables, dotenv files, secrets, parameters, outputs, runtime context, and artifacts.
  • Scripts & Runtime - Shell scripts, Python scripts, distributed file dependencies, working directories, shell selection, and reproducible runtimes.

Integrations & Operations

  • Actions & Integrations - Custom actions, containers, Kubernetes, SSH, HTTP, jq, archive extraction, and mail.
  • Scheduling & Queues - Schedules, time zones, queue assignment, global queues, and notifications.
  • Operations - Retention, logs, timeouts, monitoring, tracing, execution control, and production configuration.

AI

  • Agent - Goal-driven workflows where an LLM picks each step: judgment, failure recovery, human questions, and dispatching sub-workflows.
  • Chat & LLM - Chat completions with OpenRouter, DAG-level defaults and custom endpoints, response reuse, sessions, extended thinking, workflows as tools, and model fallback.
  • Harness Run - Run Codex, OpenCode, and Pi as workflow steps.

Dagu is open source under the GNU General Public License v3.0.