MAGMA: From Clinical Questions to Executable Machine Learning Workflows
Abstract
Clinical researchers can formulate important prediction questions and often have access to relevant data, yet implementing a complete machine-learning workflow still requires substantial programming and modeling expertise. We present MAGMA (Multimodal AGentic Medical AI), a working agentic system that translates natural-language clinical prediction requests into executable and auditable machine-learning workflows. MAGMA supports structured electronic health records, clinical text, chest X-rays, ECG signals, and multimodal combinations through specialized data and modeling workers coordinated by an orchestrator and an independent judge. A clinician-facing web interface allows users to select curated datasets, specify prediction tasks, respond to targeted clarification when required, monitor execution, and inspect the resulting analysis, while a command-line interface exposes the underlying technical artifacts. We demonstrate MAGMA through an end-to-end 30-day readmission workflow using EHR and clinical text and provide additional evidence of functionality on multimodal CXR and ECG data. The demonstration illustrates how a clinical research question can be translated into an executed model-development workflow while preserving generated code, predictions, metrics, methodological handoffs, and audit outputs for inspection. The supplementary artifacts demonstrate MAGMA’s interfaces and execution workflow and include representative generated artifacts.