PROJECT SUMMARY In 2019, abuse of prescription and illicit opioids resulted in an estimated over 47,000 deaths in the United States. The transition from therapeutic use to destructive opioid use disorder occurs through the maladaptive activation of mesocorticolimbic circuits. Despite decades of research linking these pathways with opioids, surprisingly little is understood about how opioids modulate the brain in vivo in space and time in freely moving animals. This is, in part, driven by the inability to detect and monitor opioids at sub-second timescales. Together, these issues highlight the need for significant advancements for “in vivo precision pharmacology” as indicated specifically in this RFA-DA-20-019 NIDA program announcement. Recent developments using photoactivatable opioid compounds (optopharmacology) together with new optofluidic hardware devices show exciting promise for finally understanding the temporal characteristics of opioid signaling. However, further advances in opioid detection and activation are necessary for fully decoding how opioids modulate neural circuits in vivo. Here we address this challenge head on with a multi-disciplinary team of biochemists, neuroscientists and bioengineers. We will utilize a series of cutting-edge approaches to: 1) develop novel opioid sensors for in vivo, sub-second measures of fentanyl, morphine, and methadone, 2) demonstrate the utility of optopharmacological approaches for dissecting opioid action, and 3) apply the sensors and optopharmacological approaches to perform in vivo precision pharmacological experiments to modulate pain and reward circuits related to drug abuse.