This package contains a simple interface for a finite-state machine in Go.
[A finite-state machine] is an abstract machine that can be in exactly one of a finite number of states at any given time. The FSM can change from one state to another in response to some external inputs; the change from one state to another is called a transition. An FSM is defined by a list of its states, its initial state, and the conditions for each transition.
Wikipedia
The FSM library was built as purely against the definition of a formal finite-state machine as possible, so the Wikipedia definition holds true for this library.
FSM was specifically made to build light-weight / generic conversational interfaces (think chatbots), so if that's what your trying to do you'll find this library quite nice.
Building a conversational interface as a finite-state machine will reduce a ton of cognitive overhead, as at any given point you only have to concern yourself with the current step in the conversation.
What is most attractive about FSM is the fact that you can build robust conversational interfaces that run on any platform with a single codebase.
If you're looking to build a chatbot, check out the getting started repository.
This README is more high-level and won't get into the details you'll want to start building.
Currently there is support for the following platforms:
We're soon planning to support the following platforms.
- Texting via Twilio
- Google Home
- Slack
- Cortana
- Web Deployments (think something like Product Hunt Ship landing pages)
These targets libraries are relatively easy to build, so when the next hot platform comes out, your conversational interface can be easily adapted to it!