Sarah Shahi will star in NBC’s drama pilot “Reverie,” Variety has learned.

Reverie” is a grounded, dramatic thriller about a former detective specializing in human behavior who is brought in when the launch of an advanced virtual reality program has dangerous and unintended consequences.

Shahi will play Mara, a very intelligent college professor who is trained with the FBI in counter terrorism. Though she’s a natural leader, her own psyche is still deeply pained and troubled by an incident in her past, leaving her to privately self medicate away her sleepless nights. Mara is intrigued when her old boss, Charlie Ventanaana (yet to be cast), brings her onto a strange project called Reverie, a fully immersive, customizable virtual reality program that’s so effective that several of its users have refused to come back to reality, entering instead life-threatening comas. As Mara takes on the challenge of entering another person’s consciousness to negotiate their journey back to their own reality, she discovers that she may also have found a way to her own redemption.

“Reverie” hails from writer Mickey Fisher, the creator of Halle Berry’s former CBS series “Extant.” Fisher will serve as executive producer with Justin Falvey and Daryl Frank of Amblin TV, and Brooklyn Weaver. Universal Television is the studio.

Shahi has been in demand the past couple of pilot seasons and has courted a few offers this cycle. Last season, she was cast in the title role of the Nancy Drew pilot at CBS, which was intended to be a more diverse spin on the classic detective character — the pilot ultimately did not go to series, causing quite a stir when it was rumored to be “too female” to land the greenlit at the network.

Prior, Shahi starred on “Person of Interest” at CBS, USA’s “Fairly Legal,” Showtime’s “The L Word” and recurred on NBC’s “Chicago Fire.” She is repped by CAA, McKeon-Myones and attorney Neil Meyer.