unhardcoded
reference · format

flow_ir

The composition layer over policies: a bounded, acyclic graph of routed steps.

The format for multi-step workflows. A flow is a bounded, acyclic graph of routed steps; each step carries its own policy_ir and routes independently, and the whole graph writes one stitched, replayable trace.

Node kinds

input
The single entry. The call's messages enter here. Exactly one per workflow.
llm
A routed step. Keys: system (its prompt) · policy (a full policy_ir) · inputs (node ids it consumes) · template (optional, joins inputs with $1, $2, … in input order).
output
The single exit. Its inputs name the node whose result is returned. Exactly one per workflow.

Edges are pull-model: a node's inputs list names the nodes it consumes, so "b": { inputs: ["a"] } means a → b. A node with two or more inputs is a fan-in (fusion) step; one node feeding several is fan-out. The graph is acyclic and bounded, ≤ 256 nodes and in-degree ≤ 32, so cost and latency are knowable up front. A workflow past the bounds is rejected before it runs. Dry-run with POST /x/flow/normalize to admit the graph and each node's policy first.

← Back to docs