Your First Diagram
Walk through placing and connecting elements on the canvas and filling in name/fields via the properties panel.
This walkthrough builds a tiny validation workflow — a container with a rule, a context, and a generic task — and shows the editing pattern you’ll use for everything: place, connect, name, describe. Along the way you’ll touch every tool that matters.
If you haven’t already, create a new document from the dashboard with New Document first (see Getting Started).
1. Place a container
Drag a Task from the left palette onto empty canvas and make it larger with the resize handles. Any element becomes a container — a group that keeps related steps together — as soon as you drop other elements onto it.
Give it a name: double-click it (or select it and press E), type Order Validation, and press Enter.
2. Put a rule inside it
Click Types in the top bar, open AI/ML, and press on Rule. The overlay closes and the rule follows your pointer — move it over the Order Validation task and drop it when the task’s outline highlights. The task is now a container holding the rule.
Select the rule — the Properties panel opens on the right (toggle it any time with ⌘\). This is where typed elements get their content:
- Name:
Price Rule - Scope:
Global— it applies to every step in the workflow - Priority:
Critical - Enforcement:
Hard constraint— the AI must never violate it - Rule:
All line item prices must be greater than zero.
That last field is the rule’s substance. What you type in the Properties panel is what the AI reads — clear, specific text here is what makes a .dai file valuable.
3. Add context and a task
Add two more elements inside the container:
- From Types → AI/ML, drop a Context into the container, name it Order Schema, set its Source to
Manualand Content to whatever shape your data has — e.g.An order has orderId (str), customerId (str), and lines (list of {productId, quantity, unitPrice}). - Drag a Task from the left palette (the generic one — no special type) into the container, name it Validate order, and in its Description write what should happen:
Check every line item against the Order Schema and the Price Rule; route valid orders onward and reject the rest.
Alignment guides appear while you drag, so lining elements up takes no effort. If something ends up outside the container’s border, the container doesn’t grow to fit it — drag the element back in, or resize the container.
4. Connect the flow
Select the Order Schema context. In the small action menu beside it, drag out of Link to another element and release over Validate order to create a connection. (Or press C for the Global connect tool and drag from one element to the next.) Local context shapes the step it feeds, so this connection tells the AI that Validate order uses the schema.
The action menu can also add the next step for you: Add task or Add end event creates a new element already connected to the selected one. When a flow leaves a gateway, select the connection and give it a Name — yes / no — which is what the AI reads as the branch condition.
5. Watch the status bar
The status bar at the bottom shows the document name and the save state. Every edit auto-saves within a couple of seconds of your last change — Saving… flips back to Saved on its own.
6. Hand it to a model
Click Copy for AI in the top bar and paste the link into any AI tool that can fetch URLs — it reads your live diagram. For a chat that can’t fetch links, use Document → Export → Copy XML and paste the file itself. See Copying to LLMs.
What you just learned
- Place — drag from the Types overlay or the left palette; drop elements onto any task to make it a container
- Connect — use the action menu’s link button or the Global connect tool; name gateway branches to declare conditions
- Describe — select an element to open the Properties panel; its fields are the element’s typed values
- Save — automatic, always; the status bar tells you where things stand
- Share — Copy for AI hands the live diagram to a model
Ready to go wider? See the Editor Tour for every panel and shortcut, Choosing Element Types for the type vocabulary, and the Reference for exactly what each element means in the file.