New droid K-2SO (Alan Tudyk) has his say with Rebel fighters Cassian Andor (Diego Luna) and Jyn Erso (Felicity Jones) in “Rogue One.” (Disney/Lucasfilm 2016)

LAST YEAR’s “The Force Awakens” rolled out the cutest, most licensing-friendly droid in the Star Wars universe with BB-8, but it’s the new “Rogue One” that provides the robot we’ve long been looking for.

K-2SO, a former Imperial security droid voiced by Alan Tudyk (“Firefly,” “Moana”) is an imposing, 7-foot-1 presence with killer capabilities and a blunt brusqueness sharpened by an air of British-accented authority. Armed with a quick, no-filter wit, K-2SO steals moments effortlessly, landing by far the most punchlines in a sometimes-bleak film that greatly leans on his comic relief.

Typically in Star Wars films, the nonhuman Rebel characters provide a good deal of the comedy. This was how George Lucas envisioned the dynamic when he created Threepio and Artoo (with a nod to Kurosawa’s peasant servants in “The Hidden Fortress”). Yet R2-D2 is as warmly childlike as a space-age SpongeBob SquarePants, and C-3PO frets with all the worry of Oz’s Cowardly Lion, so their humor often rings as rooted in vulnerability, not aggressive invincibility.

[‘Rogue One’ shows that saving the Star Wars universe hurts]

K-2SO, by contrast, is a droid for social-media times. Freed and reprogrammed by Rebel fighter Cassian Andor (Diego Luna), this “Rogue” robot is freshly armed with comedic snark. He’ll quote the percentage rate of a mission’s success or failure — as C-3PO does — but isn’t quite as easy to quiet down or shut down as Threepio was.

K-2SO, for instance, will chime, “That is a bad idea” amid squabbling humans, momentarily showing zero deference despite his loyalty to Cassian. He can deliver a deadly funny deadpan when telling heroine Jyn Erso (Felicity Jones): “The captain says you’re a friend. I will not kill you.” He waits an expert comic beat before saying, “The captain said I had to.” Yet when Jyn blasts an identical-looking droid, he can also reveal a raised inflection worthy of Threepio when he says: “Did you know that wasn’t me?”

K-2SO (voiced by Alan Tudyk) survives enemy attack in “Rogue One: A Star Wars Story.” (Disney/Lucasfilm 2016)

Thanks to his moments of seeming mental independence and verbal firepower, K-2SO (“K-2″ or “Kaytoo” for short, like the Himalayan peak) also comes across as the next wave in artificial intelligence — as if Ava in “Ex Machina” relied on attitudinal one-liners to negotiate her way around quirky humans. He’d be too loyal to join a “Westworld” host rebellion, but he’d get off a volley of wry wisecracks while watching the uprising go down.

And that’s why Kaytoo is just the droid for an increasingly heavy “war picture.” Whenever the allied forces are storming a Scarif beach, you need the character whose wit is as dry as a British martini — and whose high-proof verbal shots go down just as easy.

Read more: