In his new memoir, former defense secretary Leon Panetta criticizes President Obama’s decisions and leadership style. (Susan Walsh/AP)

Leon Panetta has written what is being described as the latest kiss-and-tell memoir by a former member of President Obama’s Cabinet. But rather than an act of disloyalty, Panetta may be performing a public service for the president.

Panetta has used his new book, “Worthy Fights,” and a series of interviews accompanying its publication to paint an often unflattering picture of the president. He critiques presidential decisions — or non-decisions — and offers overall a damning portrait of Obama’s leadership style.

Over the past two years, Panetta told USA Today’s Susan Page, Obama has “sort of lost his way.” In his telling, the president is more law professor than political leader, a chief executive too willing to hang back, to wait as events move forward and sometimes past him.

He points to what he sees as a “frustrating reticence to engage his opponents” or to build support for his own policies. He sees a president, as he told Page, who “gets so discouraged by the process” that he almost disengages from the fight.

Panetta comes to this memoir with a perspective that is almost unmatched in public life. He was born in California, the son of Italian immigrants, and began his public service as an aide to Republican Sen. Thomas Kuchel of California during Lyndon Johnson’s administration. He later worked as an assistant to Secretary of Health, Education and Welfare Robert Finch in the Nixon administration.

He became a Democrat in the early 1970s and was elected to the House from California in 1976. He rose through the ranks to become chairman of the House Budget Committee. He then served as director of the Office of Management and Budget during the first two years of Bill Clinton’s presidency and was elevated to chief of staff in 1994 to bring order to the chaotic Clinton White House. He left government at the beginning of Clinton’s second term.

Obama recruited him to run the Central Intelligence Agency at the start of his presidency. It was in that role that Panetta recommended and oversaw the mission that killed Osama bin Laden, which Obama approved over the initial objection of then-Defense Secretary Robert Gates. When Gates left the Pentagon, Obama moved Panetta into that position.

Anyone who knows Panetta cannot be surprised that he has written a candid and incisive memoir. He has called things the way he’s seen them in Washington for decades, combining wit, laughter and a zeal for political rough-and-tumble with the tough-mindedness of someone who came to get things done.

Panetta’s book is not the first time he has expressed his frustration with the president’s leadership style. A year ago this month, at a session hosted by the Wall Street Journal, Panetta lamented the changes in the culture of Washington that he has seen during his long career. He said there was plenty of blame to go around.

That day, he praised the president as someone with the right instincts who asks the right questions. But he also said: “You have to engage in the process. This is a town where it’s not enough to feel you have the right answers. You’ve got to roll up your sleeves, and you’ve got to really engage.”

This was offered at a time when congressional Republicans had let brinkmanship get the better of them, leading to a partial shutdown of the government. Panetta was making a larger point about the arc of Obama’s leadership on budgetary and entitlement issues, lamenting that “this town has been governing by crisis after crisis after crisis.”

Now, a year later, in his book and interviews, Panetta is taking his frustrations a step further.

Like Gates and former secretary of state Hillary Rodham Clinton in her memoir, he cites disagreements with Obama over arming moderate Syrian rebels. He also adds to criticism of the president’s failure to secure an agreement with the Iraqi government to maintain a U.S. troop presence there after the scheduled withdrawal of U.S. forces. The absence of those forces created a vacuum that has been filled by Islamic State militants.

Panetta takes on critics on the right who see Obama as a left-wing ideologue. “I see him as a realist and a pragmatist,” he writes. He notes that, as the nation’s first black president, Obama has been subjected to unprecedented questions about his legitimacy “as a person and officeholder.” Those attacks from Obama’s most extreme critics “have encouraged the president’s caution and defensiveness, which in turn has emboldened further challenges.”

Obama, he writes, is “supremely intelligent, capable of absorbing and synthesizing complex information, and committed to a well-reasoned vision for the country. He does, however, sometimes lack fire. Too often, in my view, the president relies on the logic of a law professor rather than the passion of a leader.”

He continues: “But ‘playing it cool’ tends to take the edge off the rhetoric needed to stir people to action. And where I’ve seen presidents succeed most dramatically is when they’ve passionately convinced people — whether the public or members of Congress or foreign leaders — that a course of action is in their best interest. I saw President Obama do that, but on occasion he avoids the battle, complains, and misses opportunities.”

There are many ways to convey a message to a president. It can be done in the quiet of an Oval Office conversation. But sometimes a public bracing can be more effective. Panetta’s main message is that Obama will need to change. Reticence and reluctance to engage are no longer options, in his estimation. Frustration with congressional Republicans or the political process or the 24/7 media culture isn’t, either.

At this point, as Panetta said, “the jury is still out” on Obama’s legacy. Panetta’s frustrations with the president have drawn the indignation of administration officials. Instead, they and the president should take to heart the critique from someone who has served both this president and the country loyally for many years. How Obama responds will be telling.

For previous columns by Dan Balz, go to washingtonpost.com/politics.