Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

DAI Studio

Universal Attributes

type, stepType, notes and code — the attributes shared by typed elements — and where every other value is stored.

Every typed element in a .dai file is a standard BPMN element — a bpmn:task, or a bpmn:subProcess once it has children — extended with dai: data. A few attributes are shared across all types; everything else is type-specific and stored in one of the places described under Where values go.

name

The BPMN-native name attribute, shown on the canvas as the element’s label. Extension data carries the typing and structured content; name is what humans see first.

<bpmn:task id="Task_1" name="Fetch product details" dai:type="dai.types.ai.tool" dai:stepType="tool" …

dai:type

The element’s type: its id in the DAI Studio type catalog, written as a dot path dai.types.<category>.<leaf> — for example dai.types.business.objective, dai.types.ai.agent, or dai.types.aws.lambda-function. This is what tells the AI which vocabulary entry an element belongs to. Every typed element carries it; omit it for a generic task or an untyped group.

The catalog is served at https://dai.studio/api/catalog, and every type is listed in the Element Types reference.

dai:stepType

The legacy short name of the 42 original types (rule, tool, risk, story, …). DAI Studio writes it alongside dai:type for those types so older readers keep working; newer types — including every cloud and open-source type — have no dai:stepType. When both are present, dai:type is authoritative. Files that carry only dai:stepType are still valid: DAI Studio adds the matching dai:type when it opens them.

The legacy values, by category:

  • AI/ML — agent, context, rule, skill, tool, prompt, memory, guardrail, dataset, evaluation, markdown-note — AI/ML Types
  • Business — risk, decision-record, kpi, objective, stakeholder, requirement, assumption, milestone, budget, policy — Business Types
  • Software — dependency, model, test, issue, api-endpoint, service, component, database, event, environment, pipeline, repository — Software Types
  • Product — persona, story, epic, feature, journey, experiment, roadmap, feedback, product-metric — Product Types

dai:notes

The primary content attribute: instructions, descriptions, constraints, or any text the AI should process for this node. What notes means varies by type — a Rule states its constraint, a Tool describes what it does, a Story holds its “As a… I want… so that…” narrative — and the editor labels it accordingly (Rule, Story, Description, Notes), but in every case it is the free-text payload the AI reads first.

<bpmn:task id="Task_1" name="Price Rule" dai:type="dai.types.ai.rule" dai:stepType="rule"
  dai:notes="All line item prices must be greater than zero." />

dai:notes is also available on the flow and structure elements — groups, start/end/intermediate events, gateways, data stores, and categories — where it documents what the element represents:

<bpmn:startEvent id="Start_1" name="Order received" dai:notes="The pipeline starts when an order is submitted." />

dai:code

Implementation code, stored verbatim as an XML attribute. Used by Tool, whose code is included verbatim when the workflow runs.

dai:version

A version string. It is used by Dependency for the package version, by Service and Interface for the API version, by Release, and by open-source types for the project version.

Where values go

Each field of a type has exactly one storage location, published per field in the catalog:

StorageXML
nameThe standard BPMN name attribute
attributedai:<key>="…" on the element
field<bpmn:extensionElements><dai:fields><dai:field key="<key>">…</dai:field></dai:fields></bpmn:extensionElements>
properties<dai:properties><dai:property name="…" type="…" /></dai:properties> inside bpmn:extensionElements — see Typed Properties

The type tables in this reference mark field-stored keys with †; all other keys are dai: attributes. A field’s value is the element’s text, so multi-line content needs no escaping beyond normal XML:

<bpmn:task id="Task_repo" name="checkout-service"
  dai:type="dai.types.software.repository" dai:stepType="repository"
  dai:notes="Owns the checkout API and payment integration.">
  <bpmn:extensionElements>
    <dai:fields>
      <dai:field key="url">https://github.com/acme/checkout-service</dai:field>
      <dai:field key="platform">github</dai:field>
      <dai:field key="branch">main</dai:field>
    </dai:fields>
  </bpmn:extensionElements>
</bpmn:task>

When you write a .dai file by hand or with a model and aren’t sure whether a key is an attribute or a field, use <dai:field>: DAI Studio also reads attribute-backed keys from dai:fields, and preserves anything it doesn’t recognise.

A note on prefixes

Every DAI attribute carries the dai: prefix — dai:type, dai:stepType, dai:notes, and so on — matching the XSD. Unprefixed attributes are not part of the format. (The attributes on dai:workflowMeta and dai:taskTypeEntry are the exception — see Diagram Metadata.) DAI Studio still reads unprefixed values found in older files and rewrites them in the current form the next time the document is saved.