A unified hub to create, simulate, and evaluate methods for patient/client simulation.
- PatientHub: A Unified Framework for Patient Simulation → EMNLP 2026 Demo
- PatientAct: Theory-Grounded Mental Health Client Simulation → EMNLP 2026 Findings
Set up and activate the virtual environment (after installing uv)
uv sync
source .venv/bin/activateCreate a file named .env and fill it with your API credentials:
OPENAI_API_KEY=<your API key>
OPENAI_BASE_URL=<your API base URL> # OptionalRun the following script for simulation (with default configs):
patienthub simulateYou can also override any configuration via the command line:
patienthub simulate client=patientPsi therapist=basicCreate scaffolding for a new agent:
patienthub create agent_type=client agent_name=myClientEvaluate a recorded session:
patienthub evaluate evaluator=conv_judge evaluator.prompt_path=data/prompts/evaluator/client_conv.yaml input_dir=data/sessions/default/badtherapist.jsonGenerate a character profile:
patienthub generate generator=psycheAdapt a character profile from one client format to another:
patienthub adapt input_path=data/characters/patientPsi.json target_client=roleplayDohRun the web demo (requires dev dependencies):
uv sync --extra dev
uv run python -m chainlit run examples/chainlit.pyVisit the Documentation for more examples!
docs/ # Documentation site (Docusaurus)
data/
├── characters/ # Character profiles (JSON)
├── prompts/ # Prompt templates (YAML, per agent)
├── sessions/ # Saved session logs
└── resources/ # Source datasets and auxiliary files
patienthub/
├── clients/ # Client (patient) agent implementations
├── therapists/ # Therapist agent implementations
├── evaluators/ # Evaluation modules
├── generators/ # Character profile generators
├── events/ # Session orchestration (Burr-based)
├── npcs/ # Non-player character agents
├── configs/ # Hydra config utilities
├── cli/ # CLI entry points
└── utils/ # File I/O, model helpers
See LICENSE for details.
If you find our work useful for your research, please kindly cite our paper as follows:
@misc{sabour2026patienthub,
title={PatientHub: A Unified Framework for Patient Simulation},
author={Sahand Sabour and TszYam NG and Minlie Huang},
year={2026},
eprint={2602.11684},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2602.11684},
}@misc{sabour2026patientact,
title={PatientAct: Theory-Grounded Mental Health Client Simulation},
author={Sahand Sabour and TszYam NG and Yaqian Chen and Guanqun Bi and Jialu Zhao and Minlie Huang},
year={2026},
eprint={2608.12750},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2608.12750},
}