NBC has greenlit “A.P. Bio” to series, marking the first comedy order for the network’s 2017-2018 slate, Variety has learned.

Starring “It’s Always Sunny in Philadelphia’s” Glenn Howerton, the series hails from writer Mike O’Brien and executive producers Seth Meyers and Lorne Michaels.

“A.P. Bio” is about a philosophy scholar (Howerton) who loses out on his dream job and goes to work as a high school Advanced Placement biology teacher, but he makes it clear he will not be teaching any biology. Realizing he has a room full of honor roll students at his disposal, he decides instead to use the kids to his own benefit.

Along with Howerton, Patton Oswalt, Lyric Lewis, Mary Sohn, Aparna Brielle, Jacob McCarthy and Nick Peine star. “Saturday Night Live’s” Vanessa Bayer guest stars in the pilot.

O’Brien wrote the pilot and will executive produce with Michaels, Meyers, Andrew Singer and Michael Shoemaker. Oz Rodriguez directed the pilot. The series hails from Universal Television and Michaels’ Broadway Video.

“A.P. Bio” marks the third official series order from NBC, following “Rise” from Jason Katims and military drama “For God and Country.” On the other side, the network has cancelled freshman series “Emerald City” and yanked “Powerless” off the air, though the cancellation has not been made official.