Memo to jazz producers and promoters across the world: If you want your jazz festival to be festive, have Anat Cohen open it.

The Tel Aviv-born, New York-based clarinetist played a set of contemporary jazz at the Hamilton on Friday night — the opening night of 2019’s D.C. Jazz Festival — that exploded with intensity. Her creative energy was relentless and infectious, prodding the other members of her quartet (keyboardist Gary Versace, bassist Tal Mashiach and drummer Anthony Pinciotti) to stunning heights.

It wasn’t without somber or quiet moments. It started, in fact, with a long, quiet moment. Cohen simply took the stage and stood smiling silently. The audience laughed uncertainly. But then came a long, unaccompanied clarinet line, so cartoonishly bouncy that it could have been a Looney Tunes cue. Instead it became her “Happy Song,” which ironically tempered her bounce with a moody, enigmatic flow from the rhythm section. Cohen maintained her brio anyway, throwing out swooping, joyful lines and dancing in place on Versace’s blues-flavored piano solo.

She was only getting warmed up. Next came the even more energetic and contagious “Putty Boy Strut,” opening on a syncopated duet by Cohen and Pinciotti, beating the rims of his snare. The tune became somewhat more serious in tone, at least for a few minutes. Then, as Cohen and Versace entered into improvised dialogue, they became increasingly playful, with Mashiach and Pinciotti following suit and building to a reprise of the giddy duet, this time with piano and bass backing.

The downtempo pieces couldn’t dampen that energy. “Waltz for Alice,” with its gingerly articulated piano strains and tender clarinet solo, also contained a delicate, impeccably fingered solo by Mashiach that showed he had caught the evening’s inspiration. The Brazilian “Tudo Que Voce Podia Ser” began at a doleful medium tempo, but quickly evolved into a hard groove, Mashiach and Pinciotti stomping while Versace played piano with his left hand, Fender Rhodes electric piano with his right, and Cohen played driving, passionate funk. (She grunted and yelled her way through a clap-along solo by Mashiach, too.) The fragile “Ima” — dedicated to a passel of Cohen’s distant cousins in the audience — was sweet and wistful, but also loaded with the same passion Cohen brought to “Tudo Que Voce”: lump-in-the-throat stuff.

She couldn’t end it that way. The closing “Jimmy” was as close to rock-and-roll as acoustic jazz gets: Versace bringing all his blues licks to bear on the Rhodes, Pinciotti doing his best John Bonham impression, Mashiach vamping along in deadly earnest. Cohen’s clarinet riffed, tumbled, screamed, divebombed. When it was over, several spectators hollered for an encore — but what could follow that?