A web toolkit, built by CornellNLP, for authoring and running mediated multi-party conversation simulations. Researchers use it to design LLM agents, mediators, and assistants as reusable YAML templates, pair them into experiments, and run those experiments on the external ConvoArena platform. Completed experiments can be exported as ConvoKit corpora for analysis via the companion convokit-service.
The app is organized as a set of authoring toolkits that share one Next.js codebase:
- Simulation (
/simulation) — pair agents, mediators, and assistants into an experiment, then run and export it. - Mediator (
/mediator) — author mediator prompts that referee a discussion. - Agent Participant (
/agent-participant) — author LLM personas that take part in a conversation. - Assistant (
/assistant,/assistant-reddit,/assistant-wp) — author assistants that privately help one human participant, including domain-specific variants for Reddit (ChangeMyView-style) and Wikipedia talk-page discussions.
- A researcher authors agent/mediator/assistant templates in the relevant toolkit and saves them to their personal library (Firestore).
- In the Simulation toolkit, templates are paired together into an experiment definition.
app/api/create-experiment(generator.ts+parsers/*) assembles a full experiment payload and sends it to the external ConvoArena backend (Firebase Cloud Functions), authenticated withDL_API_KEY. TrAuSt is the engine that actually runs the conversation (human-human, human-agent, or agent-agent) — it lives in a separate repository, not this one.- The toolkit polls experiment progress (
app/api/simulation-status) and exports results (app/api/export-experiment). - Exported results can optionally be converted into a ConvoKit corpus by the standalone Python
convokit-servicemicroservice — seeconvokit-service/README.mdfor details on that service.
Firebase (Firestore + Auth) is used throughout for sign-in and for storing each user's library of saved agents, mediators, assistants, and templates.
- Next.js 16 (App Router), React 19, TypeScript, Tailwind CSS 4
- Firebase (client SDK + Admin SDK) for Auth and Firestore
js-yamlfor template parsing,driver.jsfor onboarding tours- Deployed via Vercel or Docker/Cloud Run
- Node.js 22+
- A Firebase project (or the local emulators described below)
- An API key for the TrAuSt / ConvoArena backend (
DL_API_KEY) - Optionally, a running instance of
convokit-serviceif you want to exercise corpus export locally
- Install dependencies:
npm install
- Copy the example environment file and fill in your values:
See Environment variables below for what each one does.
cp .env.example .env
- If you have a sibling checkout of the
TrAuStrepo,npm run devwill automatically syncDL_API_KEYfrom../TrAuSt/.envinto this project's.envviascripts/sync-dl-key.mjs(override the source path withDL_ENV_PATH). This is purely a convenience — if you setDL_API_KEYmanually in.env, you can ignore it; the sync step warns but does not fail if the sibling repo isn't present. - Optionally, run the Firebase emulators for local development instead of a live Firebase project (configured in
firebase.json: Firestore on port 8080, Auth on port 9099). Which backend URLs the app calls is controlled byNODE_ENVinapp/api/create-experiment/config.ts.
npm run dev # start the dev server at http://localhost:3000
npm run build # production build
npm run start # run the production build
npm run lint # eslintTo run the web app together with convokit-service (e.g. to test export end-to-end), use Docker Compose from the repo root instead:
docker compose upThis builds and starts both the web service (port 3000) and the convokit service (port 8080), and points the web app at the local convokit container automatically.
| Path | Contents |
|---|---|
app/ |
Next.js App Router pages and components for each toolkit |
app/api/ |
Server-side route handlers — experiment creation (create-experiment/), status polling, export, ConvoKit proxy, template/agent CRUD, quota, auth |
app/lib/ |
Shared domain logic: Firebase clients, agents/mediators/assistants/templates models, drafts/autosave |
app/components/ |
Shared UI components (pairings editor, prompt editor, nav, etc.) |
convokit-service/ |
Standalone Python/FastAPI microservice that exports experiments to ConvoKit corpora |
scripts/ |
Dev helper scripts (e.g. sync-dl-key.mjs) |
public/templates/ |
Default and topic-specific YAML templates for experiments, agents, mediators, and assistants |
| Variable | Purpose |
|---|---|
DL_API_KEY |
Authenticates requests to the external TrAuSt / ConvoArena backend. Required to create or run experiments. |
CONVOKIT_SERVICE_URL |
Base URL of the convokit-service instance used for corpus export. Defaults to http://127.0.0.1:8080 if unset. |
FIREBASE_SERVICE_ACCOUNT |
Firebase service account JSON (single line) used by the Admin SDK for server-side Firestore/Auth access. |
DL_ENV_PATH |
Optional. Overrides the path scripts/sync-dl-key.mjs reads DL_API_KEY from (defaults to ../TrAuSt/.env). |
- Vercel (
vercel.json) is the primary deployment target for the Next.js app. - Docker / Cloud Run: the root
Dockerfilebuilds a standalone Next.js image;docker-compose.ymlruns it alongsideconvokit-servicefor local or self-hosted deployment.
There is currently no automated test suite or CI pipeline in this repository.