ABC has given a straight to series order to a new drama from Terri Edda Miller and Andrew W. Marlow, the co-creators of the hit ABC series “Castle.”

The new series, titled “Take Two,” will star Rachel Bilson and Eddie Cibrian in the lead roles. Described as an upbeat procedural, the series will follow Ella (Bilson), the former star of a hit cop series who is fresh-out-of-rehab following a bender of epic proportion. Desperate to restart her career, she talks her way into shadowing private investigator Eddie (Cibrian) as research for a potential comeback role. Though Eddie resents the babysitting gig, Ella proves herself to be surprisingly valuable, drawing on her acting skills and 200 episodes of playing a detective. When the press touts Ella’s role in solving a high-profile case, Eddie finds his phone ringing off the hook with new clients looking to hire the pair.

“Andrew and Terri are wonderful storytellers and this is the perfect project for their return to ABC,” said Channing Dungey, president of ABC Entertainment. “We’re excited to see Rachel and Eddie bring these characters to life.”

The series will be co-produced by Tandem Productions, a Studiocanal Company, and ABC Studios The series will air on ABC in the US, RTL/VOX in Germany and France Television in France. Studiocanal will act as the lead studio. ABC Studios’ affiliate, Disney Media Distribution, will handle international sales.

Miller and Marlowe will executive produce under their MilMar Pictures banner, along with Studiocanal TV’s Rola Bauer and Tandem’s Tim Halkin.

The new series is essentially a gender-swapped version of “Castle,” which starred Nathan Fillion as a mystery writer who shadows an NYPD detective, played by Stana Katic. That series ran for eight seasons on the network and was nominated for four Emmy Awards during its run.

Bilson recently appeared on “Nashville” and previously starred in the CW series “Hart of Dixie.” She is also known for her starring role in the Fox drama “The O.C.”

Cibrian is best known for his roles on the shows “Third Watch” and “Sunset Beach.” He also had a regular role in the Fox series “Rosewood” and has appeared in shows like “Hot in Cleveland,” “Ugly Betty,” and “The Young and the Restless.”

Miller and Marlowe are repped by CAA, who helped broker the deal, Management 360 and Lichter, Grossman, Nichols, Adler & Feldman. Bilson is repped by CAA. Cibrian is repped by Gersh and Media Four. Tandem Productions and Studiocanal are repped by Loeb & Loeb and CAA.