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:
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
Thetype property specifies the expected data type for the field value:
Entity binding
Instead of declaringtype, 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
Thesatisfied_by property restricts which sources may satisfy a field — useful for fields that
must come from an authoritative system rather than user claims.
Validation
Thevalidate property defines a validation expression that the collected value must satisfy:
Validation expressions
Validation process
Thevalidation_process property controls how validation is executed:
LLM inference
Wheninfer: 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
Whenrange: true, the field collects a range with low and high values instead of a single scalar:
{low: number, high: number}.
List collection
Whenlist: true, the field collects multiple values as an array:
["vegetarian", "no nuts"].
Preference collection
Whenpreferences: true, the field categorizes user input into preference sets:
{accept: [], desire: [], avoid: [], refuse: []}.
Progressive activation
Theactivation property controls when a field becomes active for collection:
Field dependencies
Thedepends_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, theCORRECTIONS: true property enables natural corrections — the user can update previously collected values by stating corrections in natural language:
Transient and sensitive fields
Sensitive fields
Fields markedsensitive: true carry PII and receive special handling:
pii_type so the redactor can produce a shape-preserving
mask:
Sensitive display modes
Mask configuration
Transient fields
Fields markedtransient: 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
Theextraction_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
Thesemantics block provides supplemental metadata that helps the runtime interpret and process field values:
Semantics properties
Complete example
Related
- 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