Skip to content

Graph and expressions ​

Inputs and context ​

Each node resolves its input before execution. A field contains exactly one of:

yaml
input:
  fixed:
    value: 42
  derived:
    expr: context.nodes.fetch.output.items

Expressions can read these bindings:

  • flow.input contains the workflow input.
  • nodes maps node IDs to their output and metadata.
  • previous contains the preceding node output, or is null.
  • context is the complete workflow context, including input, store, tools, nodes, history, and loops.

They run as trusted JavaScript expressions in the host process. Treat workflow authors as code authors.

Scheduling ​

The graph starts at start. A node becomes ready when its active predecessors complete. Independent ready nodes may run concurrently; sequential node types and controlled agent cycles constrain execution. Route-bearing envelopes activate only matching routed connections. A join waits for active incoming branches, not branches excluded by routing.

Envelopes ​

Every node returns one status:

  • success carries output, optional route, and metadata.
  • failure carries a structured error and stops the affected execution.
  • suspended carries a continuation ID and optional interaction question or approval request.

Node inputSchema and outputSchema are runtime validation boundaries. AI nodes without output schemas produce validation warnings because unstructured model output is harder to compose safely.

Timeouts and retries ​

All node definitions inherit timeoutMs and retry. maxAttempts includes the first attempt; backoffMs delays retries. Side-effecting nodes must be idempotent when retried. HTTP requests additionally apply method-aware retry and redirect policy.

Cycles ​

Ordinary graph cycles are rejected. Agent loops are explicit: agent-request is a cycle controller with a required maxSteps; tool-call, interaction-input, workflow state nodes, and related participants may appear in that controlled cycle.

Documentation for the current repository state.