Hillary Clinton was the first member of the Obama administration to promote the sound idea of a “pivot to Asia.”

So why is she now so ambivalent about what would become the chief legacy item of her idea: the mega trade agreement known as the Trans-Pacific Partnership?

The TPP — a free-trade pact involving 12 major democracies in Asia and the Americas — will be a hot item this week, with Japanese Prime Minister Shinzo Abe here to meet with President Obama and to address Congress Wednesday.

Most Republicans are expected to back the deal. But Obama’s problem this time will be mostly with Democrats, who, under pressure from unions and environmentalists, resist creating the largest free-trade zone ever.

Those, of course, are the same constituencies that led the fight against the North American Free Trade Agreement, the trade pact signed when a Democratic president stood up to such critics — and Hillary resided at the White House.

As secretary of state during Obama’s first term, Hillary was the one who first came up with the idea of the “pivot,” and it formed the basis of her boss’ goal of “rebalancing to the Pacific.”

But the idea soon disappeared from the administration’s talking points, overtaken by other world events.

Yet one item, the TPP, remained on the agenda. Negotiators from the pact’s 12 countries continued their talks quietly.

Sources in DC and in Tokyo tell me that some issues remain between them: American automakers dislike Japanese competition, and Japan’s beef and other agricultural producers feel the same about their US rivals. But on both sides, it seems, negotiators believe they’re finally now close to inking a deal.

Its prospects could surely advance this week, with Abe in Washington. Negotiators believe once there’s an agreement between Japan and America, the largest economies in the envisioned bloc, the rest of the TPP partners will sign on.

Unless, of course, Congress kills the whole thing. Sen. Elizabeth Warren and her progressive crowd, joined by some on the right, are mounting a fight against the TPP.

Remember then-Speaker Nancy Pelosi’s instructions that “we have to pass ObamaCare to find out what’s in it”?

Now Democrats in Congress, including Pelosi, want the opposite: Sign the TPP first, then Congress will tweak and rewrite it to assure there’s nothing truly free-trade about this “free-trade” agreement.

A small number of Pat Buchanan-like Republican protectionists and those who oppose anything Obama are along for the ride.

“No negotiating country will compromise on sensitive issues unless they know that what the US says will be final, and that there will not be a ‘yes, but Congress wants more’ argument,” a Tokyo official told me. But some in Congress want exactly that. They could sink whatever progress there is in the negotiations.

The “fast track” bill to prevent that by giving Obama a free hand in the negotiations is still in some doubt. And even if it passes, lawmakers could still nix the final deal once it comes back for Congress’ OK.

The TPP can be Obama’s real legacy. It will last for decades and positively transform trade between America, Japan and some of the world’s fastest-growing economies, as well as countries like Taiwan, which will be associated with the pact.

It could boost economic growth and help, finally, take the US economy out of its maddeningly slow recovery from its blah years.

It’ll also give the Asian bully, China, a run for its money. Unlike Obama’s other legacy — a pact that would allow Iran to dominate the Mideast, with nukes no less — this one deserves full support from Americans and their representatives in Washington.

Which makes Hillary a key player. Support from her could push fence-sitting Democrats in favor of Obama’s deal. Unfortunately, in her presidential quest, Hillary now needs to shore up her own support from the party’s progressive wing.

So as of yet she’s playing it cool, first hinting she’s for it and then maybe against it.

True, the deep mutual hate-fest between the Obamas and Clintons is well-known, and Hillary might not want to help the president burnish his legacy. But this is a part of his record that she herself was involved with — and she’d share the credit.

So how about it, Hill? Yes, supporting Obama on this may be politically problematic in the short run.

But if you do become president, won’t you want the economy to be humming nicely again — you know, like it did back in the Clinton years?