Inferensys

Glossary

Workflow Definition Language (WDL)

A Workflow Definition Language (WDL) is a domain-specific language or data format used to declaratively specify the structure, tasks, and control flow of an executable workflow.
Elegant overhead shot of a polished wooden communal table in a sun-drenched WeWork lounge, laptops and tablets displaying AI workflow dashboards, plants and pendant lights in background.
ORCHESTRATION WORKFLOW ENGINES

What is Workflow Definition Language (WDL)?

A precise technical definition of the domain-specific language used to define computational workflows.

A Workflow Definition Language (WDL) is a domain-specific language (DSL) or data format used to declaratively specify the structure, tasks, data flow, and execution dependencies of a computational pipeline. It provides a standardized, portable abstraction for defining workflows as a series of tasks (or activities) and their inputs/outputs, enabling them to be executed by a compatible workflow engine. WDLs separate the logical workflow design from the underlying execution infrastructure, promoting reproducibility and portability across different computing environments.

In practice, a WDL script defines tasks as discrete units of work (e.g., running a script or a containerized tool) and a workflow that wires these tasks together, often modeled as a Directed Acyclic Graph (DAG). The language handles complex orchestration patterns like conditional branching, parallel execution, and error handling. Prominent examples include the open-source WDL used by Cromwell and the Common Workflow Language (CWL), which are foundational for scalable, reproducible data analysis in fields like bioinformatics and machine learning.

WORKFLOW DEFINITION LANGUAGE

Key Characteristics of a WDL

A Workflow Definition Language (WDL) is a domain-specific language or data format used to declaratively specify the structure, tasks, and control flow of an executable workflow. The following characteristics define a robust WDL.

01

Declarative Syntax

A WDL uses a declarative syntax, meaning developers specify what the workflow should accomplish—its tasks, data dependencies, and desired outputs—rather than how to execute each step procedurally. The workflow engine interprets this declaration to create an optimal execution plan. This abstraction separates business logic from orchestration mechanics, enhancing portability and readability.

  • Example: Defining a task that calls a machine learning model without writing the code to manage its execution environment or retry logic.
  • Contrast: Imperative code (e.g., in Python) explicitly codes the sequence of operations and error handling.
02

Task and Workflow Abstraction

A core characteristic is the clear separation between tasks (discrete units of work) and the workflow that composes them. A task defines a single operation, such as running a script or calling an API, including its runtime requirements (container image, CPU, memory). The workflow defines the graph of these tasks, their data flow, and control logic. This modularity allows for task reuse across different workflows and independent testing.

  • Task Properties: Command to run, input/output declarations, resource requirements, and meta sections.
  • Workflow Properties: Calls to tasks, conditional logic (if statements), and scatter operations for parallel processing.
03

Explicit Data Flow and Typing

WDLs enforce explicit data flow through strongly typed inputs and outputs for every task and workflow. Data dependencies between tasks are defined by connecting one task's output to another's input, creating a Directed Acyclic Graph (DAG). The engine uses this graph to schedule tasks only when their inputs are ready. Strong typing (e.g., File, String, Int, Array[Float]) prevents runtime errors and ensures data integrity.

  • Data Plumbing: Output of Task A (output { File results_csv }) is wired directly to the input of Task B (input { File data_file }).
  • Type Safety: The engine validates all data assignments before execution, catching mismatches early.
04

Portability and Runtime Agnosticism

A well-designed WDL is portable and runtime-agnostic. The workflow definition does not hardcode details of the execution environment (e.g., cloud provider, cluster scheduler). Instead, it declares abstract resource needs. A runtime configuration file, separate from the WDL, maps these abstractions to concrete backend systems (e.g., Google Cloud Life Sciences, AWS Batch, Kubernetes). This allows the same WDL to run identically across different infrastructures, a key requirement for reproducible computational pipelines.

  • Separation of Concerns: The what (WDL) is separate from the where and with-what (runtime config).
  • Example: A task requesting cpu: 2 can be satisfied by a Docker container on a local machine or a virtual machine in the cloud.
05

Built-in Fault Tolerance Constructs

Reliable WDLs provide native syntax for fault tolerance patterns, reducing boilerplate code. Key constructs include:

  • Retry Policies: Define automatic retries for a failed task with configurable delay (e.g., exponential backoff) and exit code handling.
  • Runtime Attributes: Specify disk space, memory, and boot disk size to prevent infrastructure-related failures.
  • Conditional Execution: Use if and scatter blocks to create dynamic, data-dependent execution paths. These features move error handling from the task implementation into the orchestration layer, making workflows more robust and declarative.
06

Standardized Structure and Tooling

A mature WDL has a standardized structure (typically JSON or a human-readable derivative like WDL 1.0/2.0) that enables a rich ecosystem of developer tooling. This includes:

  • Linters and Validators: Static analysis tools to check syntax and type correctness before runtime.
  • Documentation Generators: Auto-generate documentation from code comments within the WDL.
  • Graph Visualization: Tools to render the workflow DAG from the WDL source.
  • Language Server Protocols: IDE support for autocomplete, syntax highlighting, and error checking. This ecosystem reduces developer friction and enforces best practices across teams.
COMPARISON

WDL vs. Related Concepts

A feature comparison of Workflow Definition Language (WDL) against other common workflow and orchestration paradigms, highlighting key architectural and operational differences relevant to multi-agent system orchestration.

Feature / AspectWorkflow Definition Language (WDL)Directed Acyclic Graph (DAG)State MachineSaga Pattern

Primary Paradigm

Declarative, dataflow-centric

Declarative, dependency graph

Imperative, state transition

Imperative, distributed transaction

Core Abstraction

Task with defined inputs/outputs

Node with upstream/downstream dependencies

State with defined transitions and actions

Sequence of local transactions with compensations

Control Flow Model

Implicit via data dependencies

Explicit via graph edges

Explicit via transition rules

Explicit, linear sequence with rollback logic

State Management

Engine-managed task state & data lineage

Engine-managed node execution status

Explicit, user-defined state variables

Distributed, requires coordination protocol

Error Handling Primitive

Task-level retry policies

Node-level retry, upstream/downstream failure propagation

Error transitions to specific failure states

Compensating transactions for rollback

Concurrency Model

Implicit parallel execution of independent tasks

Explicit parallel branches via graph structure

Single active state; concurrency via sub-machines

Sequential by default; parallel execution requires explicit design

Data Passing Mechanism

Explicit, typed input/output declarations between tasks

Implicit via shared context or XCom (Airflow)

Variables scoped to the state machine instance

Message passing or shared persistence layer

Deterministic Replay Support

Native Long-Running Workflow Support

Typical Use Case in Multi-Agent Systems

Orchestrating data-processing pipelines for agent training/evaluation

Scheduling and monitoring batch agent tasks

Modeling an individual agent's internal decision loop

Coordinating multi-step, cross-service agent actions requiring atomicity

WORKFLOW DEFINITION LANGUAGE (WDL)

Frequently Asked Questions

A Workflow Definition Language (WDL) is a domain-specific language or data format used to declaratively specify the structure, tasks, and control flow of an executable workflow. This FAQ addresses common technical questions for engineers and architects implementing orchestration systems.

A Workflow Definition Language (WDL) is a domain-specific language (DSL) or structured data format used to declaratively specify the tasks, data flow, and execution logic of a computational workflow. It works by providing a formal syntax that a workflow engine interprets to create an execution plan. The engine manages the lifecycle, scheduling dependencies defined in the WDL, such as task order, input/output mappings, and conditional branching. Instead of writing imperative code to manage state and coordination, developers define the what (the desired process), and the engine handles the how (the execution mechanics). Popular examples include the CWL (Common Workflow Language), WDL (Workflow Description Language) used in bioinformatics, and Amazon States Language (ASL) for AWS Step Functions.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.