This study aims to develop and evaluate dynamic treatment regimes (DTRs) to improve personalized care for individuals with opioid use disorder (OUD). Using machine learning methods and longitudinal data from a national behavioral health provider, we will identify optimal treatment sequences that minimize overdose risk and improve recovery outcomes. A pilot hybrid factorial SMART trial will be conducted to assess the feasibility and acceptability of implementing these personalized treatment decision rules in real-world clinical settings.