On a drizzly August morning, Caroline Kennedy waded into the turquoise waters between two deserted islands in the South Pacific, trying not to scratch her feet on sprouts of coral.

“Look how beautiful this is,” she said.

“Your father did this swim,” said her son, Jack Schlossberg.

Together they stood in the Western Province of the Solomon Islands, facing a mile-long jaunt to an islet called Olasana — a place John F. Kennedy, Caroline’s father, landed almost exactly 80 years earlier as a junior Navy officer. He crossed the same waters to save himself and 10 members of his crew after a Japanese destroyer split their torpedo boat, PT-109, in the predawn darkness of Aug. 2, 1943.

Ms. Kennedy knew her swim offered just a glimpse of that ordeal. She was there on a short official visit as the U.S. ambassador to Australia. J.F.K. had survived for nearly a week, swimming many miles between three islands with the enemy all around, dragging an injured comrade to land and, eventually, being rescued thanks to a message he carved on a coconut and the bravery of Solomon Islanders and Australians who helped them reach an allied base.

She also knew the popular lessons of that experience. Courage, leadership, responsibility for others: these were the building blocks of the J.F.K. story that elevated him to the presidency, and that she has dedicated decades to promoting..

But the swim was her idea, and it fit a more recent pattern. She didn’t want to simply speak from behind a podium. She wanted to feel and touch the place, to commune with the struggles made distant by time. She wanted, as she put it, to make history “more active.”

Half a world away from the United States — where another Kennedy, her cousin Robert, is running for president, tying that famous name to a long-shot campaign fueled by conspiracies about Covid-19 — Ms. Kennedy has been trying to activate her family’s legacy for diplomacy.

When she got started as the U.S. ambassador to Japan in 2013, she had neither special expertise nor diplomatic experience. And at times, her instincts have been questioned. Japan was not happy when she condemned its annual dolphin hunt with a tweet in 2014; she admits she still struggles to connect with certain crowds.

But in Tokyo and now as ambassador to Australia, she has pursued what her father’s assassination cut short, from grappling with the aftermath of nuclear weapons to supporting space innovation to expanding the Peace Corps’ presence. And she has done it with a playful touch — joining a Japanese “Koi Dance” in a Santa suit, climbing wind turbines in Australia, and splashing around the Solomons.

Along the way, at 65, she has become one of America’s most effective advocates in a region that for most of her life she barely knew. After a rocky flirtation with and then rejection of elected politics, friends and colleagues say, she has found her place in the ambassadorial arena. There, in an important corner of the globe, she can wear white sneakers to meetings, public service requires more curiosity than polling, and the China challenge bears a striking resemblance to the crisis-driven years of the Cold War, when J.F.K. managed brinkmanship with another set of confident Communists.

“I feel like it’s a great opportunity for me to talk about and advance values that I grew up with, that I believe in,” Ms. Kennedy said in an interview before her swim, sitting at an eco-resort with intermittent electricity.

She looked up, toward the water. A U.S. Navy admiral stood nearby. A swirling wind blew across the islands — including one now called Kennedy.

“And really,” she added, “it does make me feel connected to my family and to my father.”

Her turning point came at the 11th hour — or, in political terms, just before midnight. Less than a month after asking New York’s governor to appoint her to Hillary Clinton’s Senate seat in late 2008, and with a gusher of hope and change still surging from a victory by Barack Obama that her own early endorsement helped bring to fruition, Ms. Kennedy withdrew her name.

Her advisers were shocked. She had seemed destined to get the job.

At the time, she issued a statement saying she was stepping aside “for personal reasons.” Looking back while in the Solomons, she explained that her son, Jack, was still in high school, while her uncle, Senator Edward M. Kennedy, who had been a guiding force for her, was growing weaker with a brain tumor.

“I knew he wasn’t going to be in the Senate,” she said.

Beyond that, she wondered whether elected office was right for her. She’d never longed to be a candidate. Critics said she lacked passion and was being considered only because she was a Kennedy.

“It was just a lot of people saying all kinds of things,” she said.

Four years later, with Jack in college, a new opportunity emerged: an ambassadorship. “Asia seemed like the place where everything was happening,” she said, “and I would be better able to be judged on my own.”

In Japan, Ms. Kennedy, a trained lawyer and mother of three, became a popular role model who also wielded influence behind the scenes.

When Prime Minister Shinzo Abe showed her a draft of his speech marking the 70th anniversary of the war’s end, she suggested that he be more forthright about the fraught history between Japan and South Korea. His comments reflected her input, including a line about the so-called comfort women forced into sexual slavery by the Japanese military.

Ms. Kennedy also lobbied Mr. Obama to make what would be the first visit by a sitting U.S. president to Hiroshima. And with her nudging, Mr. Obama did not just speak: He hugged a Japanese survivor who had lost his family to the attack; he left an offering at a memorial to a 12-year-old victim who became famous for folding paper cranes as she slowly died.

“She really pushed for him to bring an origami crane, and she was insistent: ‘No, no, you’ve got to fold the thing yourself,’” said Ben Rhodes, an Obama adviser who was in Hiroshima with Ms. Kennedy and the president for the 2016 visit.

Japanese scholars and officials said it made quite an impression. Kurt Campbell, coordinator for Indo-Pacific affairs in the National Security Council, said Ms. Kennedy had strengthened alliances with “a relentlessness that defines American purpose during these contested times.”

In a lecture at Harvard after leaving Japan, Ms. Kennedy said she was simply continuing the work of her father, noting that he had planned to visit Japan in his second term, and had even developed a friendship with Kohei Hanami, commander of the destroyer that rammed PT-109.

“One of the most profound experiences I had in Japan was meeting his widow,” she said.

In a photo from that moment, Ms. Kennedy can be seen smiling widely behind an older Japanese woman in a golden robe, who had carried in a photo of President Kennedy. It had a special inscription: “To Captain Hanami, late enemy — present friend.”

Ferguson Passage, where the fates of Captain Hanami and Lieutenant Kennedy first collided, sits between a handful of deep-green islands, about 8,500 miles from Washington and 1,800 miles from Sydney, Australia.

To get there, Ms. Kennedy flew commercial to Honiara, the capital of the Solomon Islands, before taking a U.S. military six-seater to an airstrip built during the war on an island without much else.

Single-engine speedboats are the area’s taxis, and her first stop was a small patch of land named Naru. She would swim from there two days later, but the visit began with a welcome dinner in a wooden hut, the island’s only structure.

Ms. Kennedy walked to the hut slowly, her voice soft, her bare feet in the sand — a contrast to many of the men in her family who fill a space the moment they enter. At public events, she often loiters and lets people come to her, which in this case, they did.

John Koloni, 60, whose father was one of two Solomon Islanders who carried J.F.K.’s coconut to an Australian ally, quickly shook the ambassador’s hand. For newcomers, including her son, Ms. Kennedy tried to put what happened 80 years ago into context.

“They rescued like 500 people,” she said.

The next day on Kennedy Island, where her father first swam, Ms. Kennedy told a crowd that “without their help, the Allies could not have won.”

Mr. Koloni simply thanked her for following through on a pledge from her father.

“He made a promise to come back and visit,” he said. “It never happened, but now his daughter is here. The promise has been fulfilled.”

The ambassador’s itinerary in the Solomons, a nation of 900 islands and 710,000 people, included stops at a school, a church, an aid project. She met with Prime Minister Manasseh Sogavare, who has avoided American officials for years while courting China. She pushed for a return of the Peace Corps. He agreed to accelerate the process.

But the water — the physical experience of family history — was what she seemed to crave most. On the morning of the swim, she urged the boat’s driver to move quickly. She had just been talking about the power of optimism — the idea, she said, “that this is going to work out, I’m not just going to sit on the beach.”

It was what her father needed to survive and, maybe, she said, what America needed too.

In the shallows, she and Mr. Schlossberg, 30, a recent Harvard Law graduate, joked about her tendency to swim in not quite a straight line. She untwisted her goggles, preparing to dive in, when a boat full of young Solomon Islanders suddenly appeared.

“Are you swimming with us?” Ms. Kennedy shouted.

Nodding and yelling, they sloshed their way toward her. She gave a few of them high-fives.

“Thank you for coming,” she said. “Let’s go.”