“Happy Endings” star Damon Wayans Jr. has been tapped as one of the leads in FX’s comedy pilot “Singularity,” Variety has confirmed.

“Singularity,” which hails from “Silicon Valley” and “The Real O’Neals” scribe Sonny Lee and executive producers Seth Rogen and Evan Goldberg, takes place in a world where artificial intelligence has been woven into daily life. In tech parlance, “the Singularity” will mark the point at which AI overtakes that of its human creators, leading to, essentially, the end of the era of homo sapiens on earth.

Wayans Jr. will play Doug, a guy who loves to be in the moment and is often dressed in YEEZY streetwear. Contrary to some, Doug is happily reliant on AI and seeks out all the pleasures technology has to offer.

Lee, who is also a co-exec producer on Netflix’s “Girlboss,” will serve as an exec producer as well as writer. Rogen and Goldberg are producing under their Point Grey shingle; the two also serve as exec producers on Hulu’s “Future Man,” starring Josh Hutcherson, Haley Joel Osment, and Wayans Jr.’s “Happy Endings” co-star Eliza Coupe; and AMC’s “Preacher,” which will bow a 13-episode second season this year.

Wayans Jr. is repped by WME and Rise Management.