@apsal/cohortlens-agent
flwr new @apsal/cohortlens-agentCohortLens Agent
CohortLens Agent is a bounded Flower AgentApp that interprets released aggregate evidence from the CohortLens GDSC2 workflow. It uses Flower Endeavor 1.0 (flower-endeavor) and never receives raw cell-line records, design matrices, or node-local dataset paths.
The companion FederatedApp studies whether BRAF p.V600E is associated with GDSC2 PLX-4720 response (LN_IC50) across three deployment SuperNodes.
Agent roles
- investigator is permitted only after a deterministic gate detects substantial cross-node disagreement and adequate support. It can propose only the predeclared STRATIFY_GDSC_LINEAGE follow-up: analyse SKCM and non-SKCM lineages separately.
- reporter summarizes a validated terminal primary result.
- followup_reporter summarizes a validated terminal follow-up result.
The investigator receives only schema-validated aggregate evidence, including site estimates, uncertainty, participation state, and heterogeneity metrics. Its output is parsed into a strict schema and checked against the parent study, analysis, and result hash. Model output cannot authorize an analysis or invent computed result fields. An operator must validate the proposal and approve a new hash-bound analytics contract before a second run.
Flower Runtime supplies the model endpoint and task token, so provider credentials are not stored in the app bundle.
Build and run
Preparation and orchestration are provided by the full CohortLens repository. Build from its root:
uv run python scripts/stage_apps.py uv run flwr build --app apps/cohort-agent
Run with an aggregate-only investigator or reporter configuration generated by the CohortLens command-line workflow:
uv run flwr run apps/cohort-agent supergrid \ --federation @ACCOUNT/FEDERATION --run-config RUN_CONFIG.toml --stream
The federated calculation itself is implemented by the separate apsal/cohortlens-analytics Flower app. The AgentApp explains released evidence and proposes a tightly constrained follow-up; it does not train the analytics model, access local data, or decide that a scientific claim is true.
Scope and limitations
This is a research demonstration over public, in-vitro cancer cell-line data, not a patient study or clinical trial. Agent explanations are constrained but still require human review. The workflow does not establish clinical benefit, causality, or a validated treatment biomarker.