Barack Obama was a writer before he became a politician, and he saw his Presidency as a struggle over narrative. “We’re telling a story about who we are,” he instructed his aide Ben Rhodes early in the first year of his first term. He said it again in his last months in office, on a trip to Asia—“I mean, that’s our job. To tell a really good story about who we are”—adding that the book he happened to be reading argued for storytelling as the trait that distinguishes us from other primates. Obama’s audience was both the American public and the rest of the world. His characteristic rhetorical mode was to describe and understand both sides of a divide—black and white, liberal and conservative, Muslim and non-Muslim—before synthesizing them into a unifying story that seemed to originate in and affirm his own.

At the heart of Obama’s narrative was a belief that progress, in the larger scheme of things, was inevitable, and this belief underscored his position on every issue from marriage equality to climate change. His idea of progress was neither the rigid millennial faith of Woodrow Wilson nor Bush’s shallow God-blessed optimism. It was human-scale and incremental. Temperamentally the opposite of zealous, he always acknowledged our human imperfection—his Nobel Peace Prize lecture was a Niebuhrian meditation on the tragic necessity of force in affairs of state. But, whatever the setbacks of the moment, he had faith that the future belonged to his expansive vision and not to the narrow, backward-pointing lens of his opponents.

This progressive story emerged in Obama’s account of his own life, in his policies, and in his speeches. Many of them were written by Rhodes, who joined the campaign as a foreign-policy speechwriter in mid-2007, when he was twenty-nine; rose to become a deputy national-security adviser; accompanied Obama on every trip overseas but one; stayed to the last day of the Presidency; and even joined the Obamas on the flight to their first post-Presidential vacation, in Palm Springs, wanting to ease the loneliness of their sudden return to private life. Today, Rhodes still works alongside Obama.

The journalistic cliché of a “mind meld” doesn’t capture the totality of Rhodes’s identification with the President. He came to Obama with an M.F.A. in fiction writing from New York University and a few years on the staff of a Washington think tank. He became so adept at anticipating Obama’s thoughts and finding Obamaesque words for them that the President made him a top foreign-policy adviser, with a say on every major issue. Rhodes’s advice mostly took the form of a continuous effort to understand and apply the President’s thinking. His decade with Obama blurred his own identity to the vanishing point, and he was sensitive enough—unusually so for a political operative—to fear losing himself entirely in the larger story. Meeting Obama was a fantastic career opportunity and an existential threat.

In “The World as It Is: A Memoir of the Obama White House” (Random House), Rhodes shows no trace of the disillusionment that gave George Stephanopoulos’s tale of Bill Clinton its bitter, gossipy flavor, or of the light irony that came to inflect Peggy Noonan’s adoration of Ronald Reagan. More than any other White House memoirist, Rhodes is a creature of the man he served. When Arthur Schlesinger, Jr., went to work as a special assistant to John F. Kennedy, in 1961, he was a middle-aged Harvard professor, the author of eight books, and a Democratic Party intellectual. Schlesinger was a worshipful convert with serious blind spots about Kennedy, but he did warn the new President not to go ahead with the Bay of Pigs, persistently enough that Robert Kennedy told him to back off. It’s impossible to imagine Rhodes giving Obama that kind of advice, or writing a book like “A Thousand Days,” which isn’t so much a White House memoir as a history of the New Frontier.

What Rhodes lacks in critical distance he gains in unobtrusive proximity. He spent thousands of hours with Obama in the Oval Office, on board Air Force One, and inside “the Beast,” the bulletproof Presidential limousine. “My role in these conversations, and perhaps within his presidency,” Rhodes writes, “was to respond to what he said, to talk and fill quiet space—to test out the logic of his own ideas, or to offer a distraction.” Although Rhodes took on important projects like normalizing relations with Cuba and building support for the Iran nuclear deal, his essential role was to be the President’s mirror and echo. When Obama mused that Ray Charles’s version of “America the Beautiful” should be the national anthem, Rhodes added, “They should play it before every game.” Obama seems to have wanted his right-hand man to be smart, loyal, and unlikely to offer a serious challenge. Reserved and watchful himself, Rhodes provided just the level of low-key, efficient companionship that his boss needed. It’s not surprising that the aide whose company Obama tolerated best was another writer.

This is the closest view of Obama we’re likely to get until he publishes his own memoir. Rhodes’s Obama is curious, self-contained, irritable, and witty, and Rhodes—sixteen years younger and six inches shorter—is his straight man. On a Presidential trip to Latin America in 2011, at the start of the NATO air campaign in Libya, Rhodes found himself cast as spokesman for a country at war. The stress—he’s appealingly candid about the anxiety and self-doubt, as well as the arrogance, that went with his job—caused him to lose track of his razor. Obama noticed. “What, you can’t even bother to shave?” the President chided him. “Pull yourself together. We have to be professional here.” Rhodes wanted to plead that he was overtasked and underslept, but instead he used the rebuke to understand Obama better: “I realized that these little flashes were how he relieved some of the stress that he had to be feeling, and that being composed and professional—doing the job—was how he managed to take everything in stride. I hadn’t just failed to shave; I’d deviated from his ethos of unflappability.”

With a fine writer’s sense, Rhodes includes, along with the important speeches and decisions of state, a quiet moment in which Obama, standing on a beach in Hawaii, points to a hill and says, “My mom used to come here every day and sit there looking out at the bay when she was pregnant with me. I’ve always thought that’s one of the reasons why I have a certain calm.” This ability to stand back from the passing frenzy and survey it at a distance was an intellectual strength and a political liability. More than any modern President, Obama had a keen sense of the limits of American power—and of his own. But it’s hard to build a narrative around actions not taken, disasters possibly averted, hard realities accommodated. The story of what didn’t happen isn’t an easy one to tell.

What Rhodes conveys forcefully is the disdain that he and Obama shared for the reflexive hawkishness of the foreign-policy flock, the clichés of the establishment media, the usual Washington games. Even in the White House, they saw themselves as perpetual outsiders. This aversion to normal politics gave Obama’s story its cleanness and inspiration, while leaving the progress he achieved fragile and vulnerable to rougher practitioners with fewer qualms about the business they were all in.