AnnaSophia Robb cast as young Carrie Bradshaw

Actress takes lead role in CW's 'Carrie Diaries'

The CW has its Carrie Bradshaw.

AnnaSophia Robb has been cast as the lead in the pilot “The Carrie Diaries,” the prequel to the wildly successful HBO comedy “Sex and the City.”

Project, from Warner Bros. Television, is based upon the novel “The Carrie Diaries” by Candace Bushnell. Amy B. Harris, Josh Schwartz, Stephanie Savage, Len Goldstein, Candace Bushnell will exec produce.

Pilot was written by Amy B. Harris and will directed by Miguel Arteta, who will serve as an exec producer on the pilot as well.

Logline centers on a young Bradshaw, who comes of age in the 1980s and is asking her first questions about love, sex, friendship and family while exploring the worlds of high school and Manhattan.

Stefania Owen has previously been cast as Dorrit, Carrie’s younger rebellious sister.

Robb, whose first acting credits date back to 2004, has mostly worked in film. Some of her most well-known titles are “Charlie and the Chocolate Factory,” “Bridge to Terabithia” and “Race to Witch Mountain.”

Robb is repped by CAA and Untitled Entertainment.