> For the complete documentation index, see [llms.txt](https://docs.anthriq.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.anthriq.com/bxi-studio/experiments/experiment-builder.md).

# Experiment Builder

This is where you design what actually happens in an experiment — the sequence a participant goes through, what they see or hear at each moment, and what responses or data get captured. It's the screen you land on after creating an experiment or opening a draft.

## Layout overview

<figure><img src="https://2761951758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhtBZnSGOC4EMhU3nc5oM%2Fuploads%2FXGaPesnKkxSVax7r34pw%2Fexperiment-builder.png?alt=media&amp;token=04fed62f-a5bf-4bac-9c3e-7e5273ea4f07" alt=""><figcaption></figcaption></figure>

The builder has four main areas:

* Epoch Panel (left) — the structure of your experiment: epochs and trials, in order
* Canvas (center) — a live preview of whatever epoch is currently selected, showing exactly what the participant will see
* Properties / Layouts / Backend (right) — configure the selected epoch or trial, and add content or logic to it
* Timeline (bottom) — a time-based view of the whole experiment across epochs, stream, markers, and recording

Your experiment auto-saves as a draft as you work, and stays editable until you publish it.

## Epochs and trials

An epoch is a single moment or screen in the experiment — an instruction, an image, a rest period, a stimulus. A trial is a repeatable pair of epochs — a Stimulus and a Rest — that runs as one cycle, repeated as many times as you need.

To build out your structure:

1. Select + New Trial to add a trial
2. Select + Stimulus Epoch to add the stimulus portion, and + Rest Epoch to add the rest period that follows it
3. Select the trial itself to configure it under Properties: Name, No. of trials (how many times the stimulus/rest cycle repeats), Interval between repeats, and an Inter Trial Instruction shown to the participant between reps
4. Select an individual epoch (Stimulus or Rest) to configure it under Properties: Name, Duration (in seconds), and optionally a Marker — a tagged event at that point in time, useful later when analyzing recorded data

Epochs and trials can be renamed at any time from their menu in the Epoch Panel. Standalone epochs outside a trial (like a Welcome screen) work the same way for configuring content, but sit outside the trial structure since they only need to happen once.

Note that you can drag to rearrange epochs or trials, delete or duplicate them. This allows you to builder faster and with more flexibility

## Adding stimulus content

<figure><img src="https://2761951758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhtBZnSGOC4EMhU3nc5oM%2Fuploads%2FTTw9msdzDj5leheucHVx%2Fadding-epochs.png?alt=media&amp;token=26604703-6762-46f8-88e1-fd7bd4554e5e" alt=""><figcaption></figcaption></figure>

With a Stimulus (or any) epoch selected, switch to the Layouts tab to add what the participant sees or experiences during that epoch. The Library offers:

* Text — instructional or stimulus text shown on screen
* Image — upload an image file to display
* Audio — upload an audio file to play
* Flicker — a visual flicker stimulus, configurable by Phase (degrees) and Frequency (Hz)

Anything you add appears under Elements Added, where you can edit its details or remove it.

## Adding responses and backend logic

<figure><img src="https://2761951758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhtBZnSGOC4EMhU3nc5oM%2Fuploads%2FRZzQQPJymcb5GUAPuvYN%2Fpy-scripts.png?alt=media&amp;token=67ae725f-56c8-443f-85c4-f5f2c197c13f" alt=""><figcaption></figcaption></figure>

Switch to the Backend tab to configure how the experiment captures input or runs custom logic. The Library offers:

* Keyboard — bind a key to a marker (set its Marker Name and Keybind), so a participant's key press gets tagged in the recorded data; use Apply to to scope it to the whole experiment or just part of it
* Python Script — attach a custom script (Name, Script File), also scoped with Apply to

## The Timeline

As you build, the Timeline reflects your experiment structure in real time — tracks for Epochs, Stream, Markers, and Recording, plus tracks like Bandpass, Bandstop, or Keyboard once you've added those elements. Use the View dropdown to look at the whole experiment or zoom into a single trial.

## Previewing and publishing

<figure><img src="https://2761951758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhtBZnSGOC4EMhU3nc5oM%2Fuploads%2F1fFDZuklpHDnEHvMc5zG%2FPreview%20Experiment.png?alt=media&amp;token=1490d657-5fce-4058-981e-0c5ad516cf09" alt=""><figcaption></figcaption></figure>

Once your structure is in place:

1. Select Preview to run through the experiment as a participant would experience it
2. Select Publish to finalize it — a Review Information step shows a summary of key parameters per trial (number of trials, interval, inter-trial instruction) for a last check
3. Confirm and then publish the experiment

{% hint style="info" %}
Publishing locks the experiment — it can no longer be edited directly, though you can always duplicate it later to create an editable copy.
{% endhint %}

After publishing, you land on the experiment information page. You can start a new experiemnt run from here and manage data collected through this experiment. This experiment you built can be accessed from Your Custom Experiments.
