This repository presents a configurable research platform for conducting Human-LLM agent collaboration experiments from the paper Through the Lens of Human-Human Collaboration: A Configurable Research Platform for Exploring Human-Agent Collaboration.
The system supports multiple experiment paradigms, including ShapeFactory, DayTrader, EssayRanking, and WordGuessing, along with an Experiment Configuration Language (ECL) for custom experiment design.
This repository includes:
backend/: Flask + Socket.IO backend (experiment logic, session management, database, MTurk APIs)frontend/: Vue 3 frontend (researcher dashboard, participant interface, annotation pages)docker-compose.yml: one-command local stack (Postgres + backend + frontend)docker-compose.rds.yml: deployment mode with external Postgres (e.g., AWS RDS)
- A Configurable Research Platform for Human-LLM Agent Collaboration
This path is for users who want to run the platform locally as quickly as possible.
- Docker Desktop installed and running
- A terminal (macOS Terminal, Linux shell, or PowerShell)
From the repository root:
cp .env.example .envThen edit .env and at least confirm:
FLASK_SECRET_KEY- LLM settings (
LLM_PROVIDER+ corresponding API key) - Database settings (local Postgres or external DB)
By default,
.env.exampleusesLLM_PROVIDER=mock, which is useful for local testing without model API calls.
docker compose up --buildAfter startup:
- Frontend: http://localhost:8080
- Backend API: http://localhost:5000
- Researcher Dashboard: http://localhost:8080/researcher
- Participant Login: http://localhost:8080/login
After setting DATABASE_URL or PGHOST/PGUSER/PGPASSWORD/PGDATABASE in .env:
docker compose -f docker-compose.rds.yml --env-file .env up --buildDetailed deployment guides:
- Local deployment with ngrok (development/sandbox friendly):
user_tutorial/run_locally.md - Cloud deployment (recommended for robust MTurk studies):
user_tutorial/run_on_cloud.md
The backend includes MTurk management APIs (associate HIT, list assignments, approve/reject assignments).
Required environment variables:
AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYAWS_REGION(typicallyus-east-1)MTURK_ENVIRONMENT(sandboxorproduction)
The backend automatically switches endpoint by environment:
- sandbox:
https://mturk-requester-sandbox.us-east-1.amazonaws.com - production:
https://mturk-requester.us-east-1.amazonaws.com
Before running real studies, deploy to a publicly reachable URL (cloud deployment or tunnel/proxy setup).
Use this path if you want to develop/debug backend and frontend directly.
cd backend
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
python -m scripts.init_db
python app.pyDefault backend URL: http://localhost:5000
cd frontend
corepack enable
yarn install
yarn devFrontend dev server is usually: http://localhost:5173 (check Vite output).
Supported providers:
- Azure OpenAI (recommended)
- OpenAI
- Anthropic Claude
- Mock (testing)
Configured via environment variables (see .env.example and backend/agent/README_LLM.md):
LLM_PROVIDER(azure/openai/claude/mock)OPENAI_API_KEYAZURE_OPENAI_ENDPOINTAZURE_OPENAI_API_KEYAZURE_OPENAI_DEPLOYMENTAZURE_OPENAI_API_VERSIONANTHROPIC_API_KEY
Two supported modes:
- Bundled Postgres (
docker-compose.yml) - External Postgres/RDS (
docker-compose.rds.yml)
Application tables are created under schema humanagent_collab by default (override with PGSCHEMA).
If you enable S3-based uploads (screenshots, annotation assets, etc.), configure:
S3_BUCKETAWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYAWS_REGION
- Multiple experiment paradigms managed through the researcher dashboard
- Human-AI mixed collaboration within the same session
- Real-time state updates via Socket.IO (participants, status, timers)
- Experiment config upload and backend validation
- Resource upload support (PDF/image/text files)
- In-session and post-session annotation workflows
- MTurk workflow support (HIT association, assignment retrieval, approval/rejection)
HumanAgentCollab2026/
├── backend/
│ ├── app.py
│ ├── routes/ # session / participant / mturk APIs
│ ├── agent/ # agent runner + LLM client + prompts
│ ├── services/ # db, logging, timer, annotation, storage
│ ├── scripts/ # init_db, etc.
│ ├── database/ # SQL init scripts
│ ├── ecl_example/ # ECL sample configurations
│ └── uploads/ # uploaded assets (maps / essays)
├── frontend/
│ ├── src/
│ │ ├── components/
│ │ ├── views/
│ │ ├── services/
│ │ └── router/
│ ├── nginx.conf
│ └── Dockerfile
├── docker-compose.yml
├── docker-compose.rds.yml
└── .env.example
- Containers fail to start
- Ensure Docker Desktop is running
- Check port conflicts on
5000,8080,5432
- Backend cannot connect to database
- Verify
DATABASE_URLorPG*values are complete - For RDS, verify security group/network accessibility
- Verify
- LLM does not respond
- Confirm
LLM_PROVIDERand provider keys match - Try
LLM_PROVIDER=mockfirst to validate pipeline
- Confirm
- MTurk API errors
- Verify
AWS_REGIONandMTURK_ENVIRONMENT - Verify IAM permissions and key validity
- Verify
@article{yao2025through,
title={Through the Lens of Human-Human Collaboration: A Configurable Research Platform for Exploring Human-Agent Collaboration},
author={Yao, Bingsheng and Chen, Jiaju and Chen, Chaoran and Wang, April and Li, Toby Jia-jun and Wang, Dakuo},
journal={arXiv preprint arXiv:2509.18008},
year={2025}
}