Flux Player attaches local data storage and state management to OpenAI's GPTs, Google's Bard, or other advanced LLMs that can run Python. Flux replaces complex and heavily curated prompts with runnable "cartridges" that keep track of mutating data and move from one individual prompt to another as architected by the cartridge author. Authors define state architecture and data processes in terms of how users respond to each state prompt. ![[IMG_0569.jpeg]] _Left: The linear, context-diluting behavior of an LLM without flux. Right: Using the finite state machine logic of flux, we can make our LLMs flow-controlled as in this example of a full course instructed by the AI._ ## Resources [GitHub, including instructions for getting started](https://github.com/adamjgrant/fluxplayer) [Rock Paper Scissors](https://chat.openai.com/g/g-op6SvMfI8-rock-paper-scissors) simple example. [Life Coach](https://chat.openai.com/g/g-6nQiT2DV7-life-coach) a more interesting example. [[Flux Player v1]] Acting as an "operating system" for the LLM allows the author consistent control over the overall experience. The coupling of an LLM's ability to process subjectively with machine logic to operate deterministically creates a unique symbiosis that bring the utility of LLMs into another level. The design thinking of Flux was similar to a gaming console that is designed to do little on its own but run the programming embedded on gaming cartridges which other vendors can create and market for the platform. ![[7190232737_0eb007d0a1_b.jpg]] _CC BY-SA 2.0 DEED Bryan Ochalla_ I think it is a brilliant idea to make a machine not that lets you play a game, but allows others to make games on significantly simpler and more lightweight physical components the console can run. # Why does an LLM need to run an "Operating System"? > [!tip] Traditional GPTs make the initial prompt the trajectory for the whole chat session. By managing state and data, each chat transition can present a new prompt to the LLM to guide it through. Symbiosis is why! 1. LLMs which work great with subjective inputs. 2. Traditional programming which work great at deterministic logic. This opens the door to new use cases allowing you to design GPTs that follow a prescribed flow of code while still working in the free form of a conversation. ## Local Data _This is in alpha. Not guaranteed to work well at all_ At the time of this writing, mainstream LLMs don't provide the ability to interface with a local data store. Flux works around this by passing a string containing the data between each prompt. At each pass, a state can have a prompt that directs manipulating of the data for the next path either directly by the LLM or by calling a separate code file. # Using Flux is Easy Flux is a matter of getting your hands on an LLM that can edit code, uploading the flux app and your cartridge, and copying the magic prompt. ## Creating a cartridge is easy Cartridges are either YAML or Python files. This approach makes it easy for non-coders to make a structured blueprint via the easy to learn YAML format and to enable more advanced use cases for those comfortable in Python. Here we'll review what a YAML cartridge looks like. To see the Python alternative or to learn more, visit the repo README.md. ```yaml state: "START" state: "LEFTPAD" state: "RIGHTPAD" ``` For this example you are a frog on a Lilly pad and this LLM asks if you where you want to jump. So we make our states (above) then we have to describe how the LLM will allow for movement to other Lilly pads. ```yaml state: "START" - target: "LEFTPAD" if_the_user: "says they want to go left" - target: "RIGHTPAD" if_the_user: "says they want to go right" state: "LEFTPAD" - target: "START" if_the_user: "says they want to go back to center" state: "RIGHTPAD" - target: "START" if_the_user: "says they want to go back to center" ``` # Can you give me a more compelling example? <video src="https://cdn.everything.io/adamgrant.info/Automatic.mp4" controls></video> I created an [interactive exploratory world](https://chat.openai.com/g/g-OhlsXw6X0-help-find-maura-murray) meant to help find the real life Maura Murray who went missing in 2004. This is still an open case to this day and my hope is this format will encourage people to engage with the evidence and help the ongoing investigations. The [cartridge is pretty complex](https://github.com/adamjgrant/fluxplayer/blob/main/examples/find_maura_murray/cartridge.yaml) and generated from a python file. As you explore the evidence, an interactive map builds out with new locations that you can move around to non-linearly visiting new locations and talking to new people or revisiting to keep pouring over evidence.