Skip to main content
The GATHER: section defines structured information that the agent needs to collect from the user during a conversation. Each field specifies a data type, prompt, validation rules, and collection behavior. The runtime orchestrates multi-turn collection, extracting values from natural conversation and prompting for missing fields.

Syntax

At the top level of an agent document, GATHER: defines fields as named blocks:
Within a FLOW: step, gather uses a different syntax. See GATHER within FLOW.

Field properties

extraction_hints is a flow-step gather property, not a top-level GATHER: property — at the top level it is not parsed. See GATHER within FLOW.

Field types

The type property specifies the expected data type for the field value:

Entity binding

Instead of declaring type, options, and validation inline, a field can reference a reusable named entity from the ENTITIES: section via entity_ref. The field then inherits the entity’s type, allowed values, synonyms, and validation.
A field with entity_ref should not also declare type, options, or values — the referenced entity owns that contract.

Enum options

For enum-style fields, options lists the allowed values directly. Use it as an alternative to validate: enum(...). Both inline and block forms are accepted:

Value provenance

The satisfied_by property restricts which sources may satisfy a field — useful for fields that must come from an authoritative system rather than user claims.

Validation

The validate property defines a validation expression that the collected value must satisfy:

Validation expressions

Validation process

The validation_process property controls how validation is executed:

LLM inference

When infer: true, the LLM can extract or infer the field value from conversational context without explicitly asking the user. This enables natural, conversational information collection.

Inference properties

When the LLM’s confidence in an inferred value falls below infer_confidence, the runtime falls back to asking the user directly using the prompt.
To steer extraction with natural-language hints (extraction_hints), use a flow-step gather field — see GATHER within FLOW.

Range collection

When range: true, the field collects a range with low and high values instead of a single scalar:
The collected value is stored as an object: {low: number, high: number}.

List collection

When list: true, the field collects multiple values as an array:
The collected value is stored as an array: ["vegetarian", "no nuts"].

Preference collection

When preferences: true, the field categorizes user input into preference sets:
The collected value is categorized into: {accept: [], desire: [], avoid: [], refuse: []}.

Progressive activation

The activation property controls when a field becomes active for collection:

Field dependencies

The depends_on property lists fields that must be collected before this field activates. Combined with activation, this creates ordered collection flows:

Corrections handling

In flow steps, the CORRECTIONS: true property enables natural corrections — the user can update previously collected values by stating corrections in natural language:
See FLOW for the full flow step GATHER syntax.

Transient and sensitive fields

Sensitive fields

Fields marked sensitive: true carry PII and receive special handling:
When the field name is non-canonical, add pii_type so the redactor can produce a shape-preserving mask:

Sensitive display modes

Mask configuration

Transient fields

Fields marked transient: true are automatically cleared from the session after the gather phase completes. Use this for sensitive data that should not persist beyond its immediate use:

Extraction patterns

The extraction_pattern property defines a custom regex for extracting structured values from user input. Combined with extraction_group, it specifies which capture group to use:

Semantics

The semantics block provides supplemental metadata that helps the runtime interpret and process field values:

Semantics properties

Complete example

  • Tools — tool definitions (tools and gather work together)
  • FLOW — GATHER within flow steps uses a different syntax
  • Language overview — syntax rules for lists and blocks