XState is a state management and orchestration solution for JavaScript and TypeScript apps.
Restate and XState can be used together to create resilient and durable state machines that can be run in a distributed environment.
Have a look at the restatedev/xstate repo for information and examples.