An internal state in Windmill is a way to store a transient state, which can be represented as a small JSON, and persists across distinct executions of the same script. It is used by scripts to keep data persistent between runs of the same script by the same trigger (schedule or user). You can use to retrieve the internal state and to set the new internal state.