State Machine
An execution model that represents a system through explicit states and transitions triggered by events or conditions. In an agent, it can expose stages such as waiting for context, executing a tool, requesting approval, resuming, and completed, with rules defining which moves are valid.
The model may propose an action or classify an event; the runtime should validate the transition when operational effects are involved. Keeping decisive state only in the prompt weakens auditability and makes recovery fragile. Large workflows also face state explosion, so states, invariants, and error paths should remain small and testable.