FlowDSL
Studio
Spec

FlowDSL Document Reference

Top-level fields of a FlowDSL document.

A FlowDSL document is a YAML or JSON file that describes an executable flow graph. This page covers every top-level field.

Top-level fields

FieldTypeRequiredDescription
flowdslstringYesSpecification version. Currently "1.0.0".
infoInfo objectYesDocument metadata.
externalDocsExternalDocs objectNoLinks to external AsyncAPI/OpenAPI spec documents.
serversobjectNoNamed runtime server definitions.
flowsobjectYesMap of flow_id → Flow object.
componentsComponents objectNoReusable events, packets, nodes, policies.

externalDocs object

Declare external AsyncAPI or OpenAPI documents to enable asyncapi#/... and openapi#/... $ref syntax on node ports and event payloads. FlowDSL documents are fully functional without this field.

FieldTypeDescription
asyncapistring | objectSingle URL string, or named map of { name: url } pairs.
openapistring | objectSingle URL string, or named map of { name: url } pairs.
descriptionstringOptional description.

Single-document form (string)

yaml
externalDocs:
  asyncapi: "./events.asyncapi.yaml"
  openapi: "https://api.example.com/openapi.json"

Use with plain asyncapi#/... and openapi#/... $ref paths.

Named multi-document form (object)

yaml
externalDocs:
  asyncapi:
    default: "./events.asyncapi.yaml"
    payments: "https://payments.example.com/asyncapi.json"
  openapi:
    default: "/openapi.json"
    billing: "https://billing.example.com/openapi.json"
Key$ref prefix used in the flow
defaultasyncapi#/... (same as single-string form)
paymentsasyncapi:payments#/...
billingopenapi:billing#/...

The default key lets you keep the unqualified asyncapi#/... syntax working alongside named specs:

yaml
# Message from the default AsyncAPI doc
message:
  $ref: "asyncapi#/components/messages/OrderPlaced"

# Message from the named 'payments' doc
message:
  $ref: "asyncapi:payments#/components/messages/PaymentProcessed"

info object

FieldTypeRequiredDescription
titlestringYesHuman-readable name for the flow.
versionstringYesFlow document version (semver recommended).
descriptionstringNoLonger description. Supports markdown.
contactobjectNoname, email, url of the owning team.
licenseobjectNoname and url of the flow's license.

Complete example

yaml
flowdsl: "1.0.0"
info:
  title: Order Fulfillment
  version: "2.1.0"
  description: |
    Processes customer orders from receipt to shipment confirmation.
    Handles payment, inventory reservation, and customer notification.
  contact:
    name: Platform Team
    email: [email protected]
  license:
    name: Apache-2.0
    url: https://www.apache.org/licenses/LICENSE-2.0

externalDocs:
  asyncapi: "./events.asyncapi.yaml"
  description: AsyncAPI event schema definitions

flows:
  order_fulfillment:
    summary: Order fulfillment pipeline
    entrypoints:
      - message:
          $ref: "#/components/events/OrderPlaced"
    nodes:
      order_received:
        $ref: "#/components/nodes/OrderReceivedNode"
      validate_order:
        $ref: "#/components/nodes/ValidateOrderNode"
      charge_payment:
        $ref: "#/components/nodes/ChargePaymentNode"
    edges:
      - from: order_received
        to: validate_order
        delivery:
          mode: direct
      - from: validate_order
        to: charge_payment
        delivery:
          mode: durable
          store: mongo

components:
  events:
    OrderPlaced:
      name: OrderPlaced
      version: "1.0.0"
      payload:
        schema:
          type: object
          properties:
            orderId: { type: string }
            customerId: { type: string }
            total: { type: number }
          required: [orderId, customerId, total]
  nodes:
    OrderReceivedNode:
      operationId: receive_order
      kind: source
      runtime:
        language: go
        handler: nodes.OrderReceivedNode
    ValidateOrderNode:
      operationId: validate_order
      kind: transform
      runtime:
        language: go
        handler: nodes.ValidateOrderNode
    ChargePaymentNode:
      operationId: charge_payment
      kind: action
      runtime:
        language: go
        handler: nodes.ChargePaymentNode

JSON equivalent

json
{
  "flowdsl": "1.0.0",
  "info": {
    "title": "Order Fulfillment",
    "version": "2.1.0"
  },
  "flows": {
    "order_fulfillment": {
      "entrypoints": [{ "message": { "$ref": "#/components/events/OrderPlaced" } }],
      "nodes": {
        "order_received": { "$ref": "#/components/nodes/OrderReceivedNode" }
      },
      "edges": [
        {
          "from": "order_received",
          "to": "validate_order",
          "delivery": { "mode": "direct" }
        }
      ]
    }
  },
  "components": {
    "events": {
      "OrderPlaced": {
        "name": "OrderPlaced",
        "version": "1.0.0",
        "payload": { "schema": { "type": "object" } }
      }
    }
  }
}

Validation

Validate any FlowDSL document against the JSON Schema:

shell
# Using ajv-cli
npx ajv-cli validate \
  -s https://flowdsl.com/schemas/v1/flowdsl.schema.json \
  -d my-flow.flowdsl.yaml

# Using the FlowDSL CLI
flowdsl validate my-flow.flowdsl.yaml

Next steps

Copyright © 2026