Concept
Inference reads what the customer already said. When aFLOW step starts to collect a field, the runtime checks the recent customer messages. If a message holds the value with enough confidence, the runtime fills the field. The step then skips the question.
You opt in per field with infer: true.
Inference is narrow. Know these limits before you rely on it:
- It runs only in a
FLOWstep, once, when the step first starts to collect. - It reads the last few customer messages. It does not read assistant messages, tool results, or memory.
- On a reasoning agent,
infer: trueonly changes which fields the extractor considers.infer_confidenceandinfer_confirmhave no effect there.
Minimal working example
A trip assistant asks what the customer needs. The customer often names the destination and party size in that first answer. The next step reuses them and writes them without a confirmation question.agents/trip-intake.agent.abl
purposeis asked in the first step.destinationandparty_sizeare inferred from earlier customer messages. If the runtime cannot infer one, the step asks its prompt.
How it works
- The first step collects
purpose. The customer answers “A trip to Lisbon for 3 people”. - The next step starts. The runtime scans the recent customer messages, newest first. It skips messages with no letter or digit.
- It runs the normal extraction on those messages for the active fields that set
infer: trueand have no value yet. It handles at most 3 fields in one pass, in declaration order. - It accepts a value when the value is not empty and its confidence meets
infer_confidence. When the extractor gives no score, the runtime accepts the value only if it comes from a span of the customer’s text. - It stops scanning older messages once every opted-in field has a value.
- It validates the accepted values like any other extracted value.
- The step asks its normal prompt for every field that is still empty.
EXECUTIONconversation_history_windowsets how many recent messages the runtime scans. The default is 2 and the maximum is 10. A value of 0 turns inference off.- A project-level inference setting can change the default confidence and confirm values, when your deployment sets one. Set the properties on the field so the behavior does not depend on a default.
Common variations
Confirm before storing
Leaveinfer_confirm at its default, true. The runtime then asks “I’ll assume … Does that work?” before it stores the value. See Confirm inferred values before using them.
Infer on a reasoning agent
A top-levelGATHER field can set infer: true. This makes an optional field eligible for extraction and lets a model-sourced value satisfy completion. The agent does not apply a confidence limit or ask for confirmation. Pair it with prompt_mode: extract_only for a value the agent should never ask for.
agents/support-router-intake.agent.abl
Turn inference off for one agent
Setconversation_history_window: 0 in EXECUTION. Fields with infer: true are then asked normally.
Verification
- Run the validator. Expect no errors and no warnings.
- In the first turn, say “I need a trip to Lisbon for 3 people”. Expect the agent not to ask for the destination or the party size.
- Repeat and say only “I need a trip”. Expect the agent to ask for both.
- Say a vague first message, such as “somewhere warm”. Expect the agent to ask for the destination, because the confidence is below the limit.
- In the trace, open the
dsl_collectevent with the modeprior_turn_inference.appliedFieldslists the inferred fields.pendingFieldslists fields that wait for confirmation.
Production readiness checklist
- Each inferred field has a
prompt, because the step asks it when inference fails. - Each field sets
infer_confirmon purpose. - Each
infer_confidenceis a number from 0 to 1. - The window covers the turns where customers state the value.
- Tests cover a clear statement, a vague statement, and no statement.
- Inferred values that can cause a financial or legal effect use
infer_confirm: true.
Common mistakes
Troubleshooting
Related articles: