A task state machine is a computational model that defines the discrete states a task can occupy during its lifecycle—such as Pending, Assigned, Executing, Completed, or Failed—and the specific events or conditions that trigger transitions between these states. It provides a deterministic framework for an orchestration engine to monitor progress, manage dependencies, and enforce business logic, ensuring reliable execution within multi-agent systems and complex workflows.
