Web Server

The web server is a Django / Daphne ASGI application. It serves the participant-facing UI over HTTP(S) and brokers real-time communication between participants and the runner over two WebSocket channels:

  • Queue WebSocket (/runner/connection) — polled by the runner to receive pending session assignments.

  • Experiment WebSocket (/experiment/<link>/run/<room>) — carries observations, actions and rewards for the duration of a session.

The application is composed of five Django apps:

App

Purpose

home

Landing page; no models.

accounts

User authentication, consent forms and participant records.

experiment

Core configuration models: environments, policies, agents and experiments.

data

Per-session logging: sessions, episodes and step-level records.

runner

Runner registration and status tracking.

sharpie.webserver

Serves the UI and handles communication between agents