A novel artifact-based agent framework enhances adaptability and reproducibility in medical imaging.