setEnd
Mark this step as terminal for the step flow. After the step executes, step
mode exits entirely — the steps list, current step index, valid steps, and
valid contexts are all cleared. The agent keeps running under the base system
prompt and context-level prompt, with no more step instructions injected and
no next_step tool offered.
setEnd(true) does not end the conversation or hang up the call. To
actually end the call, call a hangup tool from a SWAIG handler or define a
hangup hook.
Parameters
end
true to exit step mode after this step executes.
Returns
Step — Self for method chaining.