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.
Glossary
Workflow Definition Language (WDL)

What is Workflow Definition Language (WDL)?
A precise technical definition of the domain-specific language used to define computational workflows.
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.
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.
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.
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.
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.
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: 2can be satisfied by a Docker container on a local machine or a virtual machine in the cloud.
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
ifandscatterblocks 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.
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.
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 / Aspect | Workflow Definition Language (WDL) | Directed Acyclic Graph (DAG) | State Machine | Saga 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 |
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.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Understanding Workflow Definition Languages (WDLs) requires familiarity with the core components and patterns of workflow orchestration. These related terms define the execution environment, control structures, and reliability mechanisms that bring a WDL specification to life.
Workflow Engine
A workflow engine is the core runtime software that interprets a Workflow Definition Language (WDL) and manages the execution of workflows. It is responsible for:
- State Management: Tracking the progress of each process instance.
- Task Invocation: Calling the code or service for each defined activity.
- Control Flow: Enforcing the sequence, conditional branching, and parallel execution as specified in the WDL.
- Reliability: Implementing retry logic, checkpointing, and failure handling. Popular examples include Apache Airflow, Temporal, and AWS Step Functions.
Directed Acyclic Graph (DAG)
A Directed Acyclic Graph (DAG) is the most common computational model underlying a WDL. It represents a workflow where:
- Nodes are individual tasks or activities.
- Directed Edges represent dependencies and data flow between tasks.
- Acyclic means there are no circular dependencies, ensuring tasks can be executed in a finite, logical order. This structure allows the workflow engine to calculate an execution plan, identify tasks that can run in parallel, and detect invalid cycles during compilation. An Airflow DAG is a canonical example.
State Machine
A state machine is a model for defining workflows where execution is represented as a series of states and the transitions between them. Key characteristics include:
- Finite States: The workflow can only be in one of a predefined set of states (e.g.,
RUNNING,WAITING,SUCCEEDED). - Event-Driven Transitions: Moves between states are triggered by events or the completion of actions.
- Deterministic Logic: The next state is determined solely by the current state and the incoming event. This model is foundational to declarative orchestration tools like AWS Step Functions, where a workflow is defined as a Step Functions state machine using JSON.
Saga Pattern
The Saga pattern is a critical design pattern for managing long-running, distributed transactions within a workflow, especially when a WDL coordinates microservices. It addresses the lack of distributed transactions by:
- Sequencing Local Transactions: Breaking the overall business process into a series of local, committed transactions.
- Compensating Transactions: Providing a corresponding rollback operation (a compensating transaction) for each committed step.
- Orchestration or Choreography: Can be managed centrally by the workflow engine (orchestration) or via events between services (choreography). This pattern is essential for building reliable, multi-step processes like order fulfillment that must maintain data consistency across services.
Event-Driven Orchestration
Event-driven orchestration is a paradigm where workflow execution is initiated and progressed by events rather than a rigid, pre-defined script. In this model:
- Triggers: Workflows or tasks start in response to events like a file landing in cloud storage, an API call, or a message on a queue.
- Loose Coupling: The workflow engine reacts to the event stream, enabling dynamic, reactive systems.
- Decoupled Tasks: Tasks often communicate asynchronously via a task queue or event bus. This approach contrasts with purely time-scheduled workflows (using a cron trigger) and is key for building responsive, scalable integrations and data pipelines.
Workflow-as-Code
Workflow-as-Code is the practice of defining, versioning, and testing workflows using standard software development tools and lifecycle practices. Instead of configuring workflows in a GUI, they are authored in code (e.g., Python, YAML, Java). Benefits include:
- Version Control: Workflow definitions are stored in Git, enabling collaboration, code review, and rollback.
- CI/CD Integration: Workflows can be tested and deployed as part of an automated pipeline.
- Reusability & Modularity: Code abstractions (functions, classes, modules) can be used to create reusable workflow components.
- Declarative vs. Imperative: Can support both declarative orchestration (specifying what) and imperative logic (specifying how). Tools like Apache Airflow and Temporal exemplify this paradigm.

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.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us