Skip to main content
Back to how-to guides Use this pattern when the customer already said a value earlier in the conversation, and a later step must reuse it instead of asking again.

Concept

Inference reads what the customer already said. When a FLOW 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 FLOW step, 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: true only changes which fields the extractor considers. infer_confidence and infer_confirm have no effect there.
To capture a value the customer states during the current step, use silent extraction.

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
Variable sources:
  • purpose is asked in the first step.
  • destination and party_size are inferred from earlier customer messages. If the runtime cannot infer one, the step asks its prompt.

How it works

  1. The first step collects purpose. The customer answers “A trip to Lisbon for 3 people”.
  2. The next step starts. The runtime scans the recent customer messages, newest first. It skips messages with no letter or digit.
  3. It runs the normal extraction on those messages for the active fields that set infer: true and have no value yet. It handles at most 3 fields in one pass, in declaration order.
  4. 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.
  5. It stops scanning older messages once every opted-in field has a value.
  6. It validates the accepted values like any other extracted value.
  7. The step asks its normal prompt for every field that is still empty.
Settings that change the behavior:
  • EXECUTION conversation_history_window sets 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

Leave infer_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-level GATHER 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

Set conversation_history_window: 0 in EXECUTION. Fields with infer: true are then asked normally.

Verification

  1. Run the validator. Expect no errors and no warnings.
  2. 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.
  3. Repeat and say only “I need a trip”. Expect the agent to ask for both.
  4. Say a vague first message, such as “somewhere warm”. Expect the agent to ask for the destination, because the confidence is below the limit.
  5. In the trace, open the dsl_collect event with the mode prior_turn_inference. appliedFields lists the inferred fields. pendingFields lists 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_confirm on purpose.
  • Each infer_confidence is 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: