Hi, we wrote down some thoughts on how to use state machines as a mental model for building domain-specific LLM applications. We're a yc24 company focusing specifically on mental health, but I think the approach generalizes quite well to other vertical applications. Happy to brainstorm or chat about ways to build them!