Obama, in a Rose Garden news conference, said the agreement was progress - but he added that "I have to insist our work is not yet done."
Xi, for his part, agreed that the countries would not "knowingly support" cybertheft and promised to abide by "norms of behavior" in cyberspace.
"Confrontation and friction are not the right choice for both sides," Xi said.
Overall, Obama said, the two leaders' state visit had yielded "an extremely productive meeting," adding that their candid conversations on areas of disagreement "help us to understand each other better."
More From This Section
On the thorny issue of China's disputed territorial claims, which have unnerved some US partners in Asia, Xi said China has "the right to uphold our own sovereignty." But he promised respect for freedom of navigation and overflight.
On climate change, an area where the two countries have been cooperating, China said it will commit USD 3.1 billion to help developing countries reduce carbon emissions, one of a series of measures taken with the US to combat global warming.
The US earlier pledged USD 3 billion to a United Nations fund to aid developing nations reduce emissions.
Xi, speaking through a translator, called on the U.S. And China to be "broadminded about differences and disagreements." He made no specific mention of the controversial issues Obama raised.
The White House's concerns over China's cyberattacks in the U.S. Have caused particular strain ahead of Xi's visit.
Obama has faced calls from some Republican presidential candidates to scale back the grandeur of Xi's visit, which included an Oval Office meeting, a joint news conference in the Rose Garden and a glitzy black-tie dinner.