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

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. Use extraction_hints to steer extraction with example surface forms:

Extraction strategy

The strategy property selects how a value is extracted. It can be set per field, and the same enum is available as a block-level default on flow-step gather.

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:
sensitive: true controls how a value is displayed and stored afterward (masking, redaction) — the raw value is still extracted by the LLM and lands in session state during collection. For data that must never reach the model, transcript, session state, or logs at all — a full card number, CVV, and similar PCI-scoped values — use SECURE_INPUT instead of GATHER. SECURE_INPUT is currently a FLOW:-step-only action: it has no reasoning-mode/top-level form, so it’s only available to agents that have a FLOW: section — a pure reasoning-mode agent has no equivalent construct today.
When the field name is non-canonical, add pii_type so the redactor can produce a shape-preserving mask:
Alternatively, bind the field to a named project PII pattern with pii_pattern_ref instead of pii_type:
pii_pattern_ref is a free-form reference — the parser has no project scope, so it can’t validate that the named pattern exists. It’s resolved at runtime when the field is written; a reference that matches no configured pattern falls back to pii_type and emits pii_pattern_ref_unresolved. Studio also flags a dangling reference in the gather field editor.

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


Related articles:
  • 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