DreamLake

Node Types

A workflow is a spine of ordered stages; typed member nodes fan out from their stage and connect through typed data edges. This page defines every node family and the data types edges can carry — rendered with the real card components from WorkflowCanvas.

The vocabulary is grounded in established systems: the artifact type system follows Kubeflow Pipelines v2 and Flyte, control flow follows BPMN 2.0 and the workflow control-flow-patterns literature, and samplers use statistical naming with Spark / SQL parameter conventions.

Stage

Annotate
stage · 3 members2 done

A stage groups the work of one phase and renders as a node on the spine. Stages are hubs, not barriers: work converges into a stage node and fans out to its members, but data edges may cross stage boundaries freely. Array order is the spine.

FieldTypeNotes
idstringunique
titlestringdisplay name
detailstring?one-line description

Compute (UDF)

bimanual_filter
compute · udf
SLURM · xeon-g6-voltadirect
clip_transcode
compute · udf
EC2 · g5.xlargedaemon

A compute node runs a user-defined function on Lakeshore. The provider block follows the Lakeshore provider schema: a launcher class (SSH · SLURM · EC2 · GCE · Kube) or a named server-stored provider, plus per-machine RunConfig fields.

FieldTypeNotes
compute.udfstringUDF reference, e.g. pipelines.bimanual_filter
compute.paramsobject?static UDF arguments — small inline values are node parameters, never port data (the KFP / Snakemake split)
compute.providerProviderRef?provider (named) XOR launcher + kwargs; per-machine: instance_type, image, partition, resources, runner
compute.dispatchdirect | daemonhow the launch happens
executionExecutionPolicy?retry { max_attempts (1 = no retry), retry_on, backoff }, per-attempt timeout, cache { enabled, version }

UDA (User-Defined Agent)

vlm_annotator
uda · agent
2 permsqwen-vl-72bqueue: gpu-a10g
episode_curator
uda · agent
2 permsclaude-haikuSSH

A uda node runs a remote agent. Field names follow agent-framework conventions (OpenAI Agents SDK, Claude Agent SDK, A2A):

FieldTypeNotes
uda.instructionsstringthe system prompt (fixed persona — distinct from any per-run input)
uda.descriptionstring?when to delegate to this agent (routing metadata)
uda.modelstring?model id
uda.toolsstring[]?tool grants by name — tools are not permission strings
uda.permissionsstring[]data/resource grants, IAM-style domain.resource.verb
uda.max_turnsnumber?turn budget
uda.output_schemaobject?JSON Schema for the structured final output
uda.provider XOR uda.queueProviderRef / stringwhere the agent runs
executionExecutionPolicy?retry + timeout only — cache is forbidden on agents: agent runs are non-deterministic; caching one replays a stale answer

Sampler

bernoulli_10pct
sampler · 10% · ≥50
random_500
sampler · n=500
per_episode
sampler · by episode · 30%
head_100
sampler · first 100

Sampler strategies use statistically correct names. The result of bernoulli is probabilistic in count — that is what SQL TABLESAMPLE BERNOULLI and Spark df.sample(fraction) actually do.

StrategyParametersSemantics
bernoullifraction ∈ (0, 1], min_size?, seed?each item kept independently with probability fraction. min_size is a DreamLake extension: if fraction·N < min_size, degrade to an exact-size random sample
random_nsize, with_replacement? = false, seed?exact-size simple random sample
stratifiedstratify_by, fraction? or fractions?, min_size?, seed?per-stratum sampling, Spark sampleBy shape
first_nsizehead / LIMIT — deterministic and order-dependent; not a statistical sample

Samplers are type-preserving pass-throughs: the output port carries the input port's type (a sample of a clip collection is a clip collection). Identical input

  • identical seed ⇒ identical sample.

Control flow

is_confident
control · conditionconfidence >= 0.95
tier_switch
control · switch3 cases + default
retry_loop
control · loopwhile · until rework < 0.05
qa_gate
control · approvalReview before publish
TypeOut portsSemantics
conditiontrue: T, false: Tbinary exclusive choice (expression)
switchone per case + required default, all Tn-way exclusive choice (WCP-4); first matching case wins; default keeps routing total
loopout: Tmode: 'while' — until + max_iterations required (no unbounded loops); mode: 'foreach' — collection-driven (over, max_concurrency)
approvalout: Thuman gate with Argo-suspend semantics: pauses until a decision; timeout without decision ⇒ error, never auto-approve

Control nodes are type-preserving pass-throughs: every derived out port carries the input port's type T. Plain fan-out / fan-in stays implicit in edges — there are no AND-gateway nodes. An input port accepts one inbound edge by default; fan-in is either a collect: true port (ordered collection of same-type producers) or the XOR-merge exception (branches of the same condition / switch may share a target port, since at most one fires).

Ports

The input and output dots on a card aren't read verbatim from the raw inputs / outputs fields — they come from two derivations, nodeInputs(n) and nodeOutputs(n) (exported from @dreamlake/uikit). They apply defaults and, for the pass-through families, derive the ports from the node's role; the canvas then draws one dot per derived port.

Inputs. nodeInputs returns the declared inputs when present, otherwise a single default in port (type artifact) — so every node has at least one input dot.

Outputs. nodeOutputs depends on the family:

FamilyOutput ports
compute / udathe declared outputs, or a single default out (artifact)
samplera single derived out, type-preserving (carries the input's type) — any declared outputs are ignored
control · conditiontrue, false (both type T)
control · switchone port per case plus a required default (all T)
control · loop / approvala single out (type T)

Two consequences worth calling out — both visible on the canvas:

  • A sampler / control node shows an output dot even with no outputs field, because its output is derived, not declared. An approval gate with only inputs: [{ name: 'in', type: 'dataset' }] still gets one out: dataset dot. (Declaring outputs on these families has no effect.)
  • A switch shows one output dot per case plus default — a 3-case router (high / uncertain / rare) has four output dots, the extra one being default, which keeps the exclusive choice total.

Port names other than in / out are labelled beside their dot (a switch's high / uncertain / rare / default, for example). A collect: true input port wears a second ring to mark fan-in.

Edge data types

Every port carries a type from a closed artifact lattice. artifact is the root and doubles as "any": any subtype is accepted where artifact is expected.

TypeMeaning
artifactroot — compatible with everything
file / directoryopaque blob, single vs multipart; format is metadata, not more types
tableschema-carrying tabular data (a shape)
dataseta versioned data product — shards + manifest
modeltrained model / checkpoint
metricsevaluation metrics
samplesDreamLake domain type — an addressable collection of media samples / episodes

Small inline values (strings, numbers, JSON config) are node configuration, not edge data — a type never exists on both sides of the parameter / artifact boundary.

Run states

idle
compute · udf
SLURM · xeon-g6-voltadirect
queued
compute · udf
SLURM · xeon-g6-voltadirect
progress
compute · udf
SLURM · xeon-g6-voltadirect
done
compute · udf
SLURM · xeon-g6-voltadirect
error
compute · udf
SLURM · xeon-g6-voltadirect

During a run each node carries a state — idle · queued · progress · done · error · skipped — tinting the same card (via statusByNodeId). Agent instances fan out under their uda node (via agentsByNodeId):

annotator-01
48.2k tok · 182s
annotator-02
12.1k tok
annotator-03
3.4k tok · 41s

On the canvas

Put together, stages are the hubs the work flows through — members fan out from their stage node and converge into the next. Two orientations, one card style (toggle top-right):

annotator-01
48.2k tok
annotator-02
12.1k tok
Collect
stage · 2 members2 done
Annotate
stage · 1 member0 done
bimanual_filter
compute · udf
SLURM · xeon-g6
take_sample
sampler · 10% · ≥50
vlm_annotator
uda · agent
1 permqwen-vl-72bqueue: gpu-a10g
samplessamples

Back to: Workflow Canvas is the component reference (props, the run overlay, the thumbnail) · Pipeline Graph is the sibling it shares its canvas language with.