Skip to main content
A data component holds one value that other components read from their inputs and write to their outputs. It is never a step: no flow route enters or leaves it, and a component reaches it through a data connection to its data reference. A data component nothing refers to fails the definition’s check with Component `<name>` is not referred to. data.integer holds an integer, data.message a message and data.messages a list of them (Data Types). A conversation that many parties write to is a data.thread instead.

Persistence

A data component’s persistence port says where its value lives while the flow runs.
  • A write replaces the value whole. A component that writes a data.messages replaces the list; it does not append.
  • A session value is never read from the inline value. A read gives the object stored under the alias, or nothing when the alias holds none, so a session component needs its value written first, by an earlier execution, a component, or the Upload Session Object operation.
  • A session value outlives the execution. The next execution of the session reads it, and so does a caller of Download Session Object. Each write posts an object.written session event.
  • A session write counts against the session’s object limit when its alias is new (limits), and the resolved alias must follow the alias grammar.
  • data.integer has no session. Its choices are none and execution.
A session component with no alias fails when it is read or written with Component "<id>" alias not specified for session persistence mode.

Defaults

The default in the Value column of each Route table is what the editor writes into a new component. A definition that leaves the persistence port out runs as none, whatever the type.

A value or a persistence

A data component must hold an inline value or persist somewhere. One with no value whose persistence is none, or left out, fails the definition’s check with:
The check reads the definition and does not see what a session holds, so a component read from a session whose value an upload or another execution writes carries persistence session, and no value.

Alias and run input

data.message and data.messages have an alias port, a text. It does two things.
  • It names the session object of a session component.
  • It addresses the component to a run. An entry of a run’s input_data, {"alias", "type", "value"}, reaches the data component whose alias it names, and type may name the component’s type to be sure (Create Execution, Choosing a Model per Run).
A run’s input starts the component’s value for that execution alone, as if a component had just written it. It reaches only an execution component, which reads it in place of the inline value. A none component reads its inline value as before, and a session component reads its session object, so an entry for either changes nothing. data.integer has no alias port and takes no run input. A data.thread takes no run input either. An alias may hold a template over the run’s input, as {{ execution.input_data.<alias> }}, rendered when the component is read or written. An alias that cannot be rendered fails with Unable to resolve alias: "<alias>".

data.integer

An integer, which the editor starts at 0. Use it for a counter, a limit or an index that a logic.code reads and writes while a flow loops.

data.message

One message: a prompt, a question or an answer, held for a component to read or to write its output to. Halden Systems keeps the support policy a chat is told to follow in a data.message named support_policy, with persistence session and the alias support/policy. A maintainer uploads the policy once, and every execution of the session reads it.

data.messages

A list of messages: a few-shot prompt, a history or a set of search results. It is what a chat reads on its history and what a logic.copy fills. Ostrava Pumps passes each run the technician’s earlier questions as a messages entry named history, which reaches the data.messages with that alias. Its persistence is execution, so the run’s entry is what a chat reads on history, and no inline value is needed.