Flow

What is Flow?

Flow (currently in development) is a tool that helps researchers in psychology and behavorial sciences build web experiments using AI. It is built under the jsPsych ecosystem11jsPsych is a JavaScript framework for creating behavioral experiments that run in a web browser. It was built by Josh de Leeuw (he is a faculty member in the cognitive science department at Vassar). You can learn more about jsPsych here (link). It is not released for public use yet.

The main idea behind flow is that researchers can input the methods section that they will write in their research paper into this tool, and it will help them build the experiment using jsPsych. It is designed as a terminal application.

Flow main menu Flow session interface
Left: The Flow home screen, where users can start a new session or reopen an existing one.
Right: A session view with a methods editor (left) and an AI responses panel (right).

How does it work?

Using it is very simple. You can watch this video to learn see how it works and read the steps outlined below:

Flow demo (2× speed)
  • The first thing you will do is open up a session. Inside of which, you will get a text editor where you can write a markdown version of your methods section of your research paper. This will serve as an input to all the following agents that will work on building this project.

  • Under the hood, an agent will read this methods section, and it will validate to make sure that the methods section has sufficient information for a standalone coding agent to implement the experiment. If not, it will guide you to add the things that are relevant that are missing. It will also guide the users to place in any custom assets that might be needed in the experiment in the right place. 22This step provides two benefits: a) the user will write a better methods section (one that has enough information that replication is possible and easy) b) the user doesn’t have to constanly prompt so the user experience of using this platform improves.

  • After that, a planning agent will try and write a comprehensive plan on how to implement and test this experiment. This will be an important artifact for downstream agents.

  • The work will then be passed to a coding agent. This is where most of the work happens. This agent has access to multiple tools, can call multiple subagents based on the need of the task, and is designed to build this experiment in full.

  • After the experiment has been built, a testing agent will take a look at the codebase and validate that all the experimental specifications are correct. Important things like trial count, randomization, and other important things like that will be deterministically tested with simulating the experiment.

This is still being actively worked on, so when a stable version releases, I will make sure to update this to a more longer version with more detail on the finer implementation detail.

Notes

1 jsPsych is a JavaScript framework for creating behavioral experiments that run in a web browser. It was built by Josh de Leeuw (he is a faculty member in the cognitive science department at Vassar). You can learn more about jsPsych here (link) back
2 This step provides two benefits: a) the user will write a better methods section (one that has enough information that replication is possible and easy) b) the user doesn’t have to constanly prompt so the user experience of using this platform improves. back