Concept
ABL sets the execution style per step insideFLOW. Every step declares REASONING: true or REASONING: false. There is no default.
REASONING: truehands the step to the model. The stepGOALis the model’s objective for that step.REASONING: falseruns the step as scripted. The step runs the actions it declares:GATHER,SET,CALL,RESPOND,ON_INPUT,ON_RESULT, andTHEN.
MODE: line is removed. A MODE: line causes error E560. Declare REASONING on each step instead.
Validation rules for step modes
Minimal working example
How it works
The first step is deterministic. The platform collectspolicy_id and claim_type before it does anything else.
The second step is a reasoning step because urgency is not a clean list of values. The user may describe an accident, water damage, loss, injury, or uncertainty in their own words.
The third step is deterministic. It builds claim_summary from known values.
The last step is a reasoning step. It turns the known state into a user-facing explanation.
When a reasoning step ends
A reasoning step runs as soon as the flow reaches it, when the step has aGOAL. The model speaks first.
In the minimal example,
assess_urgency has THEN only. The model asks its clarification question, if it asks one, and the flow moves on without waiting for the answer. Use EXIT_WHEN when the step must wait. See Hold a reasoning step until a decision is recorded.
Reasoning step settings
The structure makes the flow easier to test. You can check that required fields exist before
assess_urgency, that claim_summary exists before explain_next_steps, and that completion follows the explanation step.
Common variations
Hold a reasoning step until a decision is recorded
UseEXIT_WHEN when the model must reach a result before the flow continues. The model records the result in a session variable. The EXIT_WHEN condition reads that variable.
urgency is a session variable that the model writes. The default_urgency step sets it when the model cannot decide in three turns. The fallback keeps the flow from stalling.
The runtime refuses model writes to fields declared READONLY: true. Do not use a READONLY field as an EXIT_WHEN fact that the model must write.
Reason first, then collect
Start with a reasoning step when users open with broad language, such as “I need help with something that happened yesterday.” The reasoning step decides what to ask next. Then the flow moves to deterministic collection. AddEXIT_WHEN so the reasoning step waits for the user.
Collect first, then reason
Start with deterministic collection when compliance, eligibility, identity, or required intake fields must exist before any judgment is useful.Reason after a tool result
Use a deterministicCALL with ON_SUCCESS and ON_FAIL to fetch known data. Then use a reasoning step to explain the result. This keeps tool execution predictable and lets the final response adapt to the user.
The get_claim_status tool in this example is a project-local assumption. Bind it to your own claim system in the project.
Verification
- Validate the project. Confirm every
FLOWstep declaresREASONING: trueorREASONING: false, and noE200,E201,W200, orW201appears. - Test a routine claim, an urgent claim, and an unclear claim.
- Confirm
collect_claimgathers both fields beforeassess_urgency. - Confirm
prepare_summarysetsclaim_summarybeforeexplain_next_steps. - For the
EXIT_WHENvariation, answer the clarification question and confirm the flow moves toexplain_next_steps. Then give no usable answer three times and confirm the flow goes todefault_urgency. - Inspect the trace. Look for
flow_step_enter,flow_step_exit, andflow_transitionevents to see the step order. Look forreasoning_zone_enterandreasoning_zone_exitevents to see where the model ran and why the step exited.
Production readiness checklist
- Keep deterministic steps free of goals and available-tool lists.
- Keep each reasoning goal narrow, so the model knows the decision or explanation it owns.
- Set
EXIT_WHENon every reasoning step that must wait for the user. - Add
MAX_ATTEMPTSandON_EXHAUSTEDto everyEXIT_WHENstep. - Add fallback paths for unclear input, failed tool calls, and exhausted attempts.
- Use deterministic steps for required data, compliance checks, and actions with side effects.
- Monitor traces for loops, skipped steps, and repeated clarification turns.