04 · Composition · Workflow Nodes

Five node types. One flow.

04 / 22

Workflows are directed graphs. A trigger fires, tasks do work, a waiting block holds until an external event returns. Each node wears a distinct border treatment so the flow reads structurally — left rail on triggers, top rail on tasks, dashed border on waiting, green cap on the end. The run-time surface — how you fire it, how you see what happened — lives in the frames below the graph.

Graph The workflow itself — five nodes, one flow
Trigger · Event
New Gmail label
gmail · onLabelAdded
Task
Classify thread
agent · classify
Branch · Condition
Confidence check
if score > 0.8
Task
Send reply
gmail · sendReply
End · Succeeded
Run complete
duration · 12s
Waiting · User
Approve draft
figment · approval
End · Succeeded
Approved & sent
duration · 3m 14s
pass review

A real workflow from the app — a Gmail event fires, an agent classifies, a confidence branch routes to either auto-reply or hold-for-approval. The graph is the authoring surface: this is what the Studio canvas draws when you open a workflow draft.

Grammar Node legend — five types, one vocabulary
Trigger · top rail · workflow kind
Trigger block

Entry point. Fires the run. Three variants share the rail but swap the sub-label.

ManualEventSchedule
Task · top rail · ink
Task block

Unit of work. Calls an integration action, runs code, or invokes an agent. Synchronous within the run.

IntegrationAgentCodeWait
Branch · dashed top rail · condition
Branch block

Decision point. Evaluates a condition and routes the run down one of several paths. Dashed rail signals "not doing, deciding." Edge labels name the paths.

IfSwitchRouteMatch
Waiting · dashed · figment kind
Waiting block

Suspended. The run is paused on an async boundary — user input, a webhook, a schedule. Dashed border signals "not running, but not done."

UserWebhookSchedule
End · green cap · signal
End block

Terminal. Green cap on success, red on failure, amber on cancellation. The only place signal colors enter the flow.

SucceededFailedCancelled
Runtime Manual run — fire it by hand
Manual trigger Run now weekly-digest · v12
trigger · manual weekly-digest 5 blocks · typical 6s
5 downstream blocks will run in sequence
Inputs match the workflow's spec.inputs. Validation runs live.

Manual triggers open a form whose fields are generated from the workflow's input schema — strings become text inputs, bools become toggles, objects and arrays become JSON textareas. Validation runs per-field on blur. Run now fires the workflow and lands you on the new run in the history below.

Runtime Run history — what happened when
Status Trigger Progress · Current block Started
Running manual · Sam Galanakis compose_digest 12s ago
Waiting event · gmail.onLabelAdded approve_draft user 2m ago
Completed schedule · every Monday 9:00 23 emails sent · 6.4s 17m ago
Failed manual · Sam Galanakis fetch_threads gmail · 429 1h ago
Completed schedule · every Monday 9:00 21 emails sent · 6.1s 8d ago
Cancelled manual · Sam Galanakis compose_digest by user 10d ago

Each row is a run: status dot, trigger (kind · name), current block (the position in the graph), relative time. The amber dot on Running and Waiting pulses to 5-second polling. Clicking a row opens the run detail below.

Runtime Run detail — inside a single execution
Running · run_7f3a2e1b · 3 / 6 blocks · 5.6s elapsed
trigger manual +0ms
gmail · searchThreads fetch_threads +1.4s
agent · classify classify_threads +4.2s
agent · compose compose_digest streaming · 1.3s
gmail · sendMessage send_digest
end succeeded
Version v12
Trigger manual Sam Galanakis
Runtime exec_7f3a2e1b
Current compose_digest 3 of 6
Inputs recipients · subject · since · dry_run · prompt

A run opens as the graph itself — not a list. Each block is rendered in its node style (border treatment, kind sub-label, elapsed time). Completed blocks are filled; the current block pulses; pending blocks outline quietly. On the live edge — the one between classify_threads and compose_digest — signal-flow particles trace in the direction of work. A metadata strip sits below: version, trigger, runtime id, current position, input shape. Cancel is the only verb mid-run.

Surface Detail — open a workflow
Workflow · Library

Weekly digest

Active · 5 tasks · 2 triggers · v12
Apr 22 · 5:46 pm
Flow · shape
Trigger · schedule
Weekly digest
every Monday 9:00
Task · integration
Fetch threads
gmail · searchThreads
Task · agent
Classify threads
agent · classify
Task · agent
Compose digest
agent · write
End · succeeded
Sent
duration · 6s typical
Run · manual
Manual trigger Run now weekly-digest · v12
Validation runs live against spec.inputs.
Runs · history · 4 of 63
Status Trigger Progress Time
Running manual Sam Galanakis compose_digest 12s ago
Completed schedule every Monday 9:00 23 sent · 6.4s 17m ago
Failed manual Sam Galanakis fetch_threads gmail · 429 1h ago
Completed schedule every Monday 9:00 21 sent · 6.1s 8d ago

The "open a workflow" surface anchors every interaction with a single shape: title on top, tabs below, content stacked. Status lives as a small mono pill inside the meta line — not a hero badge. Tabs are sentence-case, underlined only when active. Section titles are tiny mono eyebrows, never full shouty headers — the content (graph, form, list) carries the weight. Publishing is the only head-level action; everything else lives inside its section.

Lifecycle Stage progression — the generative pipeline as a workflow
Figment request · Stage progression
00 Queued Awaiting a worker
01 Planning Brief → plan
02 Generating Agent writing code
03 Validating Type + runtime checks
04 Promoting Release → candidate
05 Publishing Deploy to board
06 Materializing Runtime spin-up
Succeeded Figment active

A concrete example of a workflow in production: the figment generation pipeline itself. The shape of the section above scales from a seven-step linear run down to a one-step “trigger → end” and everything between.