After three initial features that were uneven but shared a rather literary kind of seriousness, Rebecca Miller moved toward romantic comedy with 2009’s “The Private Lives of Pippa Lee.” Her new “Maggie’s Plan” inhabits that terrain even more assertively, albeit retaining enough offbeat qualities to avoid genre conventionality. This pleasing triangle embroils Greta Gerwig, Ethan Hawke and Julianne Moore in two overlapping relationships involving three children over three-plus years. Premiered at Toronto without a U.S. distribution deal yet in place, it nonetheless looks likely to log a B.O. personal best for the writer-helmer, with modest but solid niche prospects in all formats.

Miller’s screenplay (based on an unpublished novel by editor-publisher Karen Rinaldi) wastes no time establishing the setup, as fully blurted out by Maggie (Gerwig) in the first lines of dialogue. Speaking to old friend Tony (Bill Hader), who’s already got a spouse, Felicia (Maya Rudolph), and child, she bemoans her inability to sustain any romantic relationship longer than six months. Having decided that’s unlikely to change, but ready for motherhood right now, she’s decided on a plan: imminent pregnancy via sperm donation culled from another college pal like Bill. The lucky man chosen is Guy (Travis Fimmel of cable skein “Vikings”), a mathematics major turned “pickle entrepreneur,” though she politely rebuffs his offer to do it the old-fashioned way rather than via sterilized jar and turkey baster.

This meticulously plotted transaction nonetheless runs up against unpredictable fate; it happens just as Maggie succumbs to a powerful attraction to John (Ethan Hawke), a new adjunct professor at The New College, where she also works. She’s a sort of career advisor to art and design students; he teaches anthropology, but is working on a novel, and agonizing over his marriage to more successful colleague Georgette (Moore), a Dane who’s great in the sense of “imposing.” With Moore’s hair tilted skyward in a rigid bun and an accent more grimly Teutonic than Danish, Georgette is an overbearing personality — at least, John can bear it no more, despite their two children (Mina Sundwall and Jackson Frazer as the roughly 13-year-old Justine and 8-year-old Paul). The same night Maggie is cozying up with some Guyness in a turkey baster, John shows up on her studio-apartment doorstep, thrown out by his wife and proclaiming his love.

Three years later, the new program has Georgette and John splitting custody of their kids, while he’s got 3-year-old Lily (Ida Rohatyn) with Maggie. Motherhood is indeed all Maggie had hoped. Still, she’s getting more of it than she asked for: Free at last to be the self-absorbed artiste in his second marriage, John (who still hasn’t finished his ballooning novel) lets Maggie do the moneymaking for them both, and the parenting for all three adults in this somewhat strained arrangement. When his obliviousness grows to the point where she’s actually falling out of love with him, Maggie concocts a new master plan to reunite the divorced couple. An anthropology conference in snowy rural Quebec provides a convenient excuse for the exes to “accidentally” spend several days together.

Wooing John back after he’s given a well-received lecture, Georgette husks, “No one unpacks commodity fetishism like you do” — one of many bright lines here that are expertly played by a highly agreeable cast. Miller’s consistently interesting films have always mixed sharp observation with a resistance to narrative formula that can sometimes feel like quirky mannerism, and that element is present here as well. But the general lightness of “Maggie’s Plan” (even “Pippa Lee” had some bleaker backstory aspects) lets it get away with content more clever and ingratiating than fully depthed.

Miller is greatly helped by all her major collaborators here. Gerwig’s dithering soft edges keep Maggie likable, even when her actions seem ill judged or just not very smart. Hawke likewise renders sympathetic another hapless, roguish man boy — this actor’s speciality — who keeps requiring women to “save” him, then comes to resent the intervention. Moore makes humorlessness very funny as a character who, one imagines, probably spent much of the 1980s somewhere in the realm of deconstructionist European feminist performance art. Hader provides supporting spark as a straight version of the gay-best-friend role, forever taking the heroine’s confessions and reading her the riot act.

One New York-set romantic comedy about educated people that doesn’t seem especially Woody Allen-esque (or even make a big deal about its location), “Maggie’s Plan” is nicely crafted on all levels, from Sabine Hoffman’s brisk editorial pace and Sam Levy’s warm lensing palate to just-right design contributions. Canny soundtrack elements encompass input from composer Michael Rohatyn and music supervisor Adam Horovitz.