Beauty has a price.

At the heart of Rajiv Joseph’s black comedy Guards at the Taj is that truth — and he tells it with such grim vigor, we almost look past the flaws of the two characters he chose as heralds.

Guards at the Taj opened Friday night at Woolly Mammoth Theater in Washington. From the same writer who penned the Pulitzer-nominated Bengal Tiger at the Baghdad Zoo, Taj is a reflection on friendship, loyalty and humanity.

It is a dichotomous affair, told by a Bert and Ernie-like duo named Humayun and Babur. The two are low-ranking imperial guards charged with safeguarding the Taj Mahal during its construction. Unfortunate enough to be the only suckers with their backs to the spectacular mausoleum, the two pass their time listening to birds and dreaming up mythical — and charmingly clairvoyant — inventions.

Babur, a bumbling, blabbering idealist, does most of the talking. Humayun, a handwringing conformist, mostly tells him to shut up.

Joseph imbues his “tragicomedy” with a sense of duty. It is there, hanging over the two best friends as they talk of harams and flying machines. Babur jests and dreams as Humayun groans over the various nauseating punishments the two might find for breaking their oath of silence. Though Humayun agonizes over it and Babur makes light of it, it is their sense of duty — or lack thereof — that divides them when things turn grisly.

Amid a blood-soaked stage, the two grapple — sometimes literally — over what qualifies as acceptable, as beautiful and as right. They invite us to do the same.

The laughs come easy, but through gritted teeth. Joseph’s lowly characters level lofty philosophical quandaries in situations that verge on both vaudevillian and uncomfortable.

Originally of New York’s Atlantic Theater Co., Woolly’s treatment is abstract — brilliant light represents the Taj, and bare incandescent bulbs the far-off stars — and at times, all too literal. Let’s just say you’ll get it when you see it.

Their minimalist setting focuses attention on the two characters, honoring a script that views palatial grandeur from the most menial perspective. Ethan Hova and Kenneth De Abrew handle their somewhat overdrawn charaters with significant subtlety. Hova equips Humayun with a perfectly registered whine. De Abrew’s Babur is a dutiful and convincing optimist.

At times transcendent and at others a tad obvious, Guards at the Taj approaches the understood, takes it and shakes it so hard, everything — even the Taj Mahal — seems to come crashing down.