Agent skill
digital-twin-clinical-agent
Install this agent skill to your Project
npx add-skill https://github.com/FreedomIntelligence/OpenClaw-Medical-Skills/tree/main/skills/digital-twin-clinical-agent
SKILL.md
name: 'digital-twin-clinical-agent' description: 'AI-powered patient digital twin creation for clinical trial simulation, treatment outcome prediction, and personalized medicine using real-world data and multi-omics integration.' measurable_outcome: Execute skill workflow successfully with valid output within 15 minutes. allowed-tools:
- read_file
- run_shell_command
Digital Twin Clinical Agent
The Digital Twin Clinical Agent creates AI-powered virtual replicas of individual patients by integrating genomics, imaging, wearable data, and clinical records. These digital twins enable clinical trial simulation, treatment response prediction, and personalized therapeutic optimization, qualified by EMA and aligned with FDA guidance.
When to Use This Skill
- When simulating clinical trial outcomes for drug development.
- For creating patient-specific treatment response predictions.
- To optimize clinical trial design and reduce sample sizes.
- When predicting individual patient trajectories.
- For personalized dosing and treatment selection.
Core Capabilities
-
Patient Digital Twin Creation: Build comprehensive patient models.
-
Clinical Trial Simulation: Predict trial outcomes virtually.
-
Treatment Response Prediction: Individualized response modeling.
-
Counterfactual Generation: "What-if" treatment scenarios.
-
Longitudinal Prediction: Forecast disease trajectories.
-
Trial Design Optimization: Reduce sample sizes, improve power.
Digital Twin Components
| Component | Data Sources | Models |
|---|---|---|
| Genomic Twin | WES/WGS, RNA-seq | Mutation effects, expression |
| Phenotypic Twin | EHR, labs, vitals | Clinical trajectories |
| Imaging Twin | CT, MRI, pathology | Tumor dynamics |
| Behavioral Twin | Wearables, PROs | Activity, symptoms |
| Pharmacokinetic | Drug levels, metabolism | PK/PD models |
Clinical Applications
| Application | Use Case | Benefit |
|---|---|---|
| Trial Simulation | Virtual control arms | Reduce placebo patients |
| Dose Optimization | Individual PK/PD | Personalized dosing |
| Treatment Selection | Compare therapies | Optimal choice |
| Progression Prediction | Disease trajectory | Early intervention |
| Drop-off Prediction | Compliance forecasting | Retention improvement |
Workflow
-
Data Collection: Gather multi-modal patient data.
-
Twin Construction: Build integrated patient model.
-
Calibration: Fit twin to individual patient data.
-
Validation: Compare predictions to observations.
-
Simulation: Run treatment scenarios.
-
Prediction: Generate outcome forecasts.
-
Output: Digital twin model, predictions, uncertainties.
Example Usage
User: "Create a digital twin for this Alzheimer's patient to simulate their response to the investigational drug and compare to placebo trajectory."
Agent Action:
python3 Skills/Clinical/Digital_Twin_Clinical_Agent/create_twin.py \
--patient_data patient_ehr.json \
--genomics patient_wgs.vcf \
--imaging mri_series/ \
--cognitive_scores mmse_history.csv \
--biomarkers abeta_tau_nfl.csv \
--disease alzheimers \
--simulate_treatment drug_a \
--compare_to placebo \
--prediction_horizon 24_months \
--output digital_twin_results/
Input Requirements
| Data Type | Required | Purpose |
|---|---|---|
| Demographics | Yes | Base characteristics |
| Medical History | Yes | Disease context |
| Lab Values | Yes | Biomarker trajectories |
| Medications | Yes | Treatment history |
| Genomics | Recommended | Personalization |
| Imaging | Recommended | Disease state |
| Wearables | Optional | Real-time data |
| PROs | Optional | Symptom tracking |
Output Components
| Output | Description | Format |
|---|---|---|
| Digital Twin Model | Serialized patient model | .pt, .pkl |
| Trajectory Predictions | Future state estimates | .csv |
| Counterfactuals | Alternative outcomes | .csv |
| Uncertainty Bounds | Prediction intervals | .json |
| Comparison Report | Treatment vs control | |
| Visualization | Interactive dashboard | .html |
AI/ML Components
Twin Generation:
- Generative adversarial networks (ClinicalGAN)
- Variational autoencoders
- Large language models (DT-GPT)
Trajectory Modeling:
- Recurrent neural networks
- Temporal transformers
- Gaussian processes
Treatment Effect:
- Causal inference models
- Counterfactual prediction
- Potential outcomes framework
Clinical Trial Applications
| Trial Phase | Digital Twin Role | Benefit |
|---|---|---|
| Phase I | Safety prediction | De-risk dosing |
| Phase II | Efficacy simulation | Go/no-go decisions |
| Phase III | Virtual control arm | Smaller trials |
| Post-marketing | Real-world outcomes | Safety monitoring |
Regulatory Status
| Agency | Status | Application |
|---|---|---|
| FDA | Guidance supportive | Acceptable with validation |
| EMA | Qualified | Specific use cases approved |
| PMDA | Under evaluation | Pilot programs |
Validation Requirements
| Validation Type | Method | Metric |
|---|---|---|
| Temporal | Hold-out future data | RMSE, calibration |
| External | Independent cohort | Generalization |
| Subgroup | Demographic splits | Fairness |
| Extreme | Edge cases | Robustness |
Prerequisites
- Python 3.10+
- PyTorch, TensorFlow
- Survival analysis libraries
- EHR parsing tools
- OMOP CDM familiarity
Related Skills
- Virtual_Lab_Agent - AI research coordination
- Multimodal_Radpath_Fusion_Agent - Data integration
- Multi_Ancestry_PRS_Agent - Genetic risk
- ctDNA_Dynamics_MRD_Agent - Disease monitoring
Disease-Specific Models
| Disease | Key Endpoints | Model Maturity |
|---|---|---|
| Alzheimer's | ADAS-Cog, CDR | Advanced |
| Oncology | PFS, OS, ORR | Advanced |
| Cardiovascular | MACE, ejection fraction | Moderate |
| Diabetes | HbA1c, complications | Moderate |
| Multiple Sclerosis | EDSS, relapse rate | Emerging |
Limitations
| Limitation | Impact | Mitigation |
|---|---|---|
| Data Quality | Prediction accuracy | Data cleaning, imputation |
| Rare Events | Underrepresentation | Transfer learning |
| Novel Treatments | No historical data | Mechanism-based models |
| Individual Variation | Uncertainty | Probabilistic models |
Special Considerations
- Privacy: Ensure de-identification and consent
- Bias: Validate across demographic groups
- Interpretability: Explain predictions to clinicians
- Updating: Continuously refine with new data
- Uncertainty: Always quantify prediction confidence
Future Directions
| Direction | Timeline | Impact |
|---|---|---|
| Real-time Twins | 3-5 years | Continuous monitoring |
| Federated Twins | 2-3 years | Multi-site collaboration |
| Causal Twins | Ongoing | True treatment effects |
| Regulatory Integration | 5-7 years | Standard practice |
Author
AI Group - Biomedical AI Platform
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
vcf-annotator
Annotate VCF variants with VEP, ClinVar, gnomAD frequencies, and ancestry-aware context. Generates prioritised variant reports.
chemist-analyst
Analyzes events through chemistry lens using molecular structure, reaction mechanisms, thermodynamics, kinetics, and analytical techniques (spectroscopy, chromatography, mass spectrometry). Provides insights on chemical processes, material properties, reaction pathways, synthesis, and analytical methods. Use when: Chemical reactions, material analysis, synthesis planning, process optimization, environmental chemistry. Evaluates: Molecular structure, reaction mechanisms, yield, selectivity, safety, environmental impact.
bio-alignment-io
Read, write, and convert multiple sequence alignment files using Biopython Bio.AlignIO. Supports Clustal, PHYLIP, Stockholm, FASTA, Nexus, and other alignment formats for phylogenetics and conservation analysis. Use when reading, writing, or converting alignment file formats.
sleep-analyzer
分析睡眠数据、识别睡眠模式、评估睡眠质量,并提供个性化睡眠改善建议。支持与其他健康数据的关联分析。
metabolomics-workbench-database
Access NIH Metabolomics Workbench via REST API (4,200+ studies). Query metabolites, RefMet nomenclature, MS/NMR data, m/z searches, study metadata, for metabolomics and biomarker discovery.
bio-hi-c-analysis-matrix-operations
Balance, normalize, and transform Hi-C contact matrices using cooler and cooltools. Apply iterative correction (ICE), compute expected values, and generate observed/expected matrices. Use when normalizing or transforming Hi-C matrices.
Didn't find tool you were looking for?