The casting will keep the "How I Met Your Mother" actress in the CBS -- and 20th Century Fox TV -- family following her nine-season run as Lily.

How I Met Your Mother star Alyson Hannigan has already lined up her follow-up job -- and she's staying in the family.

The actress, currently filming the ninth and final season of the CBS hit, will star in the network's Ben Affleck-Matt Damon-produced half-hour More Time With Family pilot, The Hollywood Reporter has learned.

STORY: TV Pilots 2014: The Complete Guide

Hannigan will co-star opposite Tom Papa in the multicamera comedy about a husband and father (Papa) who makes a career change in order to spend more time with his family. The actress will play Cindy Rizzo, Tom's wife, who is described as an amazing mother who runs the house like a drill sergeant and has endless energy. She's tasked with trying to teach Tom how to handle the family.

Affleck and Damon will executive produce the 20th Century Fox Television entry through their Pearl Street Films, with 3 Arts' Dave Becky and Josh Lieberman also on board to EP. Josh Goldsmith and Cathy Yuspa will pen the script and serve as EPs alongside Papa, who previously worked with Damon on The Informant and HBO's Behind the Candelabra.

PHOTOS: On the Set of 'How I Met Your Mother'

The casting keeps Buffy the Vampire Slayer alum Hannigan in the 20th-CBS family following her nine-season run as Lily on the network and studio's How I Met Your Mother.

In addition to HIMYM, Hannigan's credits include her breakout role in Buffy the Vampire Slayer as well as the American Pie franchise. She's repped by APA, Brian Dow and McKuin Frankel.

Hannigan joins fellow HIMYM co-star Cristin Milioti as having booked follow-up pilots. Milioti, who plays the titular mother in the final season, will star in NBC's Rashida Jones comedy A to Z.

Meanwhile, HIMYM creators Carter Bays and Craig Thomas are already prepping spinoff How I Met Your Dad starring Greta Gerwig.

Email: Lesley.Goldberg@THR.com

Twitter: @Snoodit