Triode is a visual programming tool I designed and built for Hexagram, as an add-on for their in-house cloud platform Saga. The original goal was to allow for quick and easy authoring of branching conversations and event flows like the ones in my game Subtext. However, the system is flexible enough to have other applications beyond that.

Screenshot of Triode flow, showing a series of action and event boxes connected in a chain.
Here, the Wait block waits until either an SMS is received, or 20 seconds have passed.
If it's the former, the SMS event is available to future blocks as the variable "lastE".

A Triode flow consists of a series of Action, Wait, and Decision blocks. Action and Event types are user-defined in Saga, so an Action block can do anything that a JavaScript function can do, from sending an SMS or email message to triggering an IoT device in a physical installation. Wait blocks can wait for any number of different event types (with arbitrary filters applied), or for a timer specified by a JavaScript expression.

Importantly, flows can also be nested to allow the same logic to be reused in multiple places. For instance, a flow can be created to ask a user to pick between two options in a text conversation:

A Triode flow that asks a user to pick from two options.

This flow takes parameters that are passed in from the parent, which can be any JavaScript expression. So now the decision logic can be reused wherever it is needed.

Flows are authored through a web interface, built with native Web Components on the frontend and Node.js Express on the backend. Finished flows are saved to Hexagram's Saga platform, where they can be run for many users simultaneously.

Triode is now used in production to power experiences for Hexagram's clients. If you've got a project that it would be helpful for, feel free to reach out to them for a demo.