Anatomía y flujo
before_reasoning y after_reasoning
Lógica garantizada antes y después del bucle de razonamiento.
Fuente: reference/ascript-ref-before-after-reasoning.md
after_reasoning se ejecuta al salir del bucle de razonamiento, en cada petición. Puede contener lógica, acciones, transiciones u otras directivas, pero no puede contener el comando | (pipe).
after_reasoning:-> if @variables.urgency_level == "urgent": set @variables.estimated_duration = 15 if @variables.urgency_level == "routine": set @variables.estimated_duration = 30
Transiciones en after_reasoning
Si un subagente transiciona a otro a mitad de ejecución, su bloque after_reasoning no llega a ejecutarse. Dentro de after_reasoning usa transition to, no @utils.transition to.
after_reasoning: if @variables.case_type != "": transition to @subagent.case_creation
Temas relacionados