Repository navigation
v0.2.0 — Workplace Wellness Workflow
AgentCare v0.2.0 introduces wellness_checkin as a first-class workflow alongside the three healthcare workflows, plus a reproducible experiments layer for benchmarking the burnout signal pipeline.
Highlights
- New
wellness_checkinworkflow. Weekly conversational check-in scored against the three Maslach Burnout Inventory (MBI) dimensions: emotional exhaustion, depersonalisation, reduced personal accomplishment. - MBI-aligned signal extraction. Regex taxonomy fused with a Pydantic-validated LLM extractor (Mistral, temperature 0.0). Verbatim quote evidence on every non-zero score.
- Longitudinal trend detection. Mann–Kendall test (with tie correction) plus OLS slope and a tail-run detector. Triage trigger fires on three consecutive worsening sessions, on a composite crossing 7.0, or on a deteriorating trend with latest composite ≥ 5.0.
- Wellness routing policy. Crisis cues (suicidal ideation, self-harm references, breakdown language) override the policy and route to confidential human follow-up regardless of dimension scores.
- Dashboard wellness API. Four read-only endpoints surface cohort summaries, flagged employees, per-employee histories, and trajectory series.
- Reproducible experiments layer. Top-level
experiments/directory with a deterministic synthetic corpus generator and four reproducible experiments. Single command to run everything:bash scripts/run_all_experiments.sh.
Architecture
The workflow plugs into the existing AgentCare pipeline through standard ports and adapters:
analysis/burnout.py— MBI regex taxonomy, saturating sub-scores, weighted composite (0.45·EE + 0.35·DP + 0.20·rPA), risk band classificationanalysis/trend.py— Mann–Kendall with tie correction, OLS slope, consecutive-deterioration counterextraction/burnout.py— Pydantic-validated LLM extractor (0–10 dimension scores, primary stressor, crisis flag, quote evidence)policies/wellness.py— auto-close · manager check-in · confidential human follow-upusecases/wellness.py—WellnessDepsorchestrator mirroring the frontdesk shapeports/wellness.py+wellness/store.py—WellnessHistoryStorePortinterface with JSON adapter (Postgres swappable)usecases/execution_router.py— single router serving webhook, sync, dashboard, and CLI
Reproducible numbers
From the regex-only run on the default seeded corpus (180 employees × 8 sessions, seed 42):
| Experiment | Metric | Value |
|---|---|---|
| Trend detection at window=8 | Accuracy | 0.972 |
| Predictive model (LogReg) | Test F1 | 0.952 |
| Predictive model (LogReg) | Test ROC-AUC | 0.997 |
| Adversarial robustness | Band accuracy | 0.833 |
| Adversarial robustness | False positives | 0 |
These validate the pipeline mechanics on synthetic data and are not external claims about real-world burnout detection. Full discussion in experiments/README.md.
CI fix
Pinned mistralai>=1.0.0,<2.0.0 in both pyproject.toml and requirements.txt. The v2 SDK released in April 2026 moved Mistral out of the top-level package, breaking from mistralai import Mistral. Pin holds us at v1.x until the codebase adapts to the v2 API.
Tests
24 unit tests pass, including new coverage for burnout analysis, trend detection, the wellness use-case, and the execution router. No regressions on the existing frontdesk suite.
Install
bash pip install agentcare==0.2.0
To run the experiments layer:
bash pip install -r experiments/requirements.txt bash scripts/run_all_experiments.sh
Documentation
README.md— quickstart, configuration, architecture overviewCHANGELOG.md— full v0.2.0 changelog entryexperiments/README.md— experiment reproduction guidedocs/assets/screenshots/— five unified visual assets (framework, architecture, workflows, data model, dashboard)
Project context
The wellness_checkin workflow and experiments/ layer were developed as the deliverable for the M.Sc. Data Science & AI individual project at IISER Tirupati (May 2026). The healthcare workflows and underlying framework predate this work and continue as the project's primary open-source contribution.
Full Changelog: v0.1.2...v0.2.0