Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/BabySid/aether/llms.txt

Use this file to discover all available pages before exploring further.

The Workflow resource is the primary declarative unit in the Graph Workflow Protocol (apiVersion: aether/v1). It describes a directed execution graph — which templates to run, how they are connected, what arguments they accept, and what lifecycle hooks fire at key points. The engine validates and persists a full JSON snapshot of the document at submit time, so the definition that runs is always exactly what you submitted.

Top-level fields

apiVersion
string
required
Protocol version. Must be the string "aether/v1". Any other value causes validation to fail with ErrValidation.
kind
string
required
Resource discriminator. Must be "Workflow" for a standalone workflow. ("CronWorkflow" is used by the CronWorkflow resource.)
metadata
object
required
Standard resource metadata.
spec
object
required
The workflow specification. Contains the entrypoint, templates, arguments, timeout, and hooks.

Complete example

The following example demonstrates all top-level fields in a workflow that fetches data, transforms it, and sends a notification — with a timeout, priority, workflow-level arguments, and lifecycle hooks.
{
  "apiVersion": "aether/v1",
  "kind": "Workflow",
  "metadata": {
    "name": "data-pipeline",
    "namespace": "analytics",
    "version": "2.1.0",
    "labels": {
      "team": "data-eng",
      "env": "production"
    },
    "annotations": {
      "description": "Fetch → Transform → Notify pipeline with retry and hooks"
    }
  },
  "spec": {
    "entrypoint": "main",
    "arguments": {
      "parameters": [
        { "name": "source-url",  "type": "string", "value": "https://api.example.com/data" },
        { "name": "batch-size",  "type": "int",    "value": 500 },
        { "name": "notify-email","type": "string",
          "valueFrom": { "secretKeyRef": { "name": "smtp-config", "key": "recipient" } }
        }
      ]
    },
    "timeout": "2h",
    "priority": 10,
    "maxNestedDepth": 5,
    "templates": [
      {
        "dag": {
          "name": "main",
          "tasks": [
            {
              "name": "fetch",
              "template": "fetch-data",
              "arguments": {
                "parameters": [
                  { "name": "url",
                    "valueFrom": { "parameter": "workflow.arguments.parameters.source-url" } },
                  { "name": "batch-size",
                    "valueFrom": { "parameter": "workflow.arguments.parameters.batch-size" } }
                ]
              }
            },
            {
              "name": "transform",
              "template": "transform-data",
              "dependencies": ["fetch"],
              "arguments": {
                "parameters": [
                  { "name": "raw",
                    "valueFrom": { "parameter": "tasks.fetch.outputs.parameters.body" } }
                ]
              },
              "retry": { "limit": 3, "expression": "tasks.transform.phase == 'Error'" },
              "timeout": "30m"
            },
            {
              "name": "notify",
              "template": "send-notification",
              "dependencies": ["transform"],
              "arguments": {
                "parameters": [
                  { "name": "summary",
                    "valueFrom": { "parameter": "tasks.transform.outputs.parameters.summary" } },
                  { "name": "recipient",
                    "valueFrom": { "parameter": "workflow.arguments.parameters.notify-email" } }
                ]
              }
            }
          ]
        }
      },
      {
        "task": {
          "name": "fetch-data",
          "inputs": {
            "parameters": [
              { "name": "url",        "type": "string" },
              { "name": "batch-size", "type": "int" }
            ]
          },
          "executor": { "type": "http" },
          "outputs": {
            "parameters": [
              { "name": "body",  "type": "json" },
              { "name": "count", "type": "int" }
            ]
          }
        }
      },
      {
        "task": {
          "name": "transform-data",
          "inputs": {
            "parameters": [
              { "name": "raw", "type": "json" }
            ]
          },
          "executor": { "type": "shell" },
          "outputs": {
            "parameters": [
              { "name": "summary", "type": "string" }
            ]
          }
        }
      },
      {
        "task": {
          "name": "send-notification",
          "inputs": {
            "parameters": [
              { "name": "summary",   "type": "string" },
              { "name": "recipient", "type": "string" }
            ]
          },
          "executor": { "type": "email" }
        }
      },
      {
        "task": {
          "name": "on-pipeline-exit",
          "executor": { "type": "echo" }
        }
      }
    ],
    "hooks": {
      "onSuccess": { "template": "on-pipeline-exit" },
      "onFailure": { "template": "on-pipeline-exit" },
      "onExit":    { "template": "on-pipeline-exit" }
    }
  }
}

Validation rules

All names (metadata, template names, task names, parameter names) must match ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ with a maximum of 63 characters. Dots are reserved as the system namespace separator and are not allowed in user-defined names.
spec.entrypoint must match the name of an existing template in spec.templates. An unresolved entrypoint is a hard validation error; the workflow will not be submitted.
Hook templates must be task templates. Referencing a dag or loop template from a hook causes validation to fail. Hooks are fire-and-forget notifications, not recursive scheduling units.

Build docs developers (and LLMs) love