iterations

The running iteration counter of the agent's execution.

The value is seeded from the AIAgentState constructor parameter and is incremented by the framework as nodes are executed. Each call to AIAgentStateManager.withStateLock closes the current AIAgentState snapshot and creates a new one carrying the latest counter value; accessing iterations on a closed snapshot results in an IllegalStateException.