Love this! I’m an fp-ts and xstate fan and am happy to see them in this usecase.
My intuition tells me that state machines with llm directed function calling is going to be a huge unlock.
One thing I’m curious about is narrowing the scope of accessible functions based on a state machine that is designed to match the business domain. This might involve machine to machine communication which I know XState supports