State based routing in Agent Networks
input
: The original input string passed to the networknetwork
: The current network run instance with statestack
: Array of pending agents to be executedcallCount
: Number of agent invocations madelastResult
: The most recent inference result from the last agent executionclassification
property, so that in the next network loop we can
determine which new agent to run for the classified request.
callCount
parameter allowing you to quit early.