The agreement, ahead of an expected ice-breaking chat between Japanese Prime Minister Shinzo Abe and Chinese President Xi Jinping at the gathering in Beijing, signals a thaw in ties between the world's second- and third-biggest economies.
Relations have been soured over the past two years by the territorial row, regional rivalry and the bitter legacy of Japan's wartime occupation of China.
Abe said the two sides were making final arrangements for one-on-one talks, although neither he nor China's foreign ministry confirmed that the talks were set.
"Both Japan and China are coming to the view that it would benefit not just the two countries but regional stability if a summit is held," he told a TV programme.
But in signs that fundamental problems would not easily be resolved, Abe also said there had been no change in Japan's stance on the isles at the heart of the territorial dispute, while China's top diplomat, Yang Jiechi, urged Japan to properly handle sensitive issues like history and the islands.
"The two sides have agreed to gradually resume political, diplomatic and security dialogue through various multilateral and bilateral channels and to make efforts to build political mutual trust," the two countries said in statements released simultaneously. The communiques followed a meeting between Yang and Abe's national security adviser, Shotaro Yachi.
The statements said China and Japan also "acknowledged that different positions exist between them" regarding tensions over the islands in the East China Sea and agreed to set up a crisis management mechanism to prevent "contingencies".
Abe, who has not met Xi except to shake hands since taking office in December 2012, has been calling for a one-on-one meeting at the Nov. 10-11 Asia-Pacific Economic Cooperation (APEC) summit, while insisting no conditions be set for talks.
China has sought assurances that Abe would not repeat his December 2013 visit to Tokyo's Yasukuni Shrine for the war dead, seen in Beijing as a symbol of Japan's past militarism.
Such a promise would be hard for the conservative Abe to make, however, and the Japanese leader told the TV show that the agreement did not cover specific issues such as his shrine visits.
Beijing has also demanded that Japan acknowledge the existence of a formal territorial dispute over the tiny islands, which are controlled by Japan but also claimed by Beijing.
The uninhabited isles are known as the Diaoyu in China and the Senkaku in Japan.
In an English-language commentary, China's official Xinhua news agency called the agreement "an encouraging icebreaker that has been painfully overdue."
"It has brought the relationship between the world's second and third largest economies back to temperatures above the freezing point. Should it be properly implemented, it will mark a turning point in the trajectory of China-Japan relations."
Analysts said the two sides appeared to have found a diplomatic formula that would allow both to save face and set aside the row over the islands that had threatened to spark an unintended military clash and was hurting vital economic ties.
"It's already a significant step toward thawing the exceptionally chilly relations that have prevailed since 2012, when Japan nationalised the islands," said Jeffrey Kingston, director of Asian studies at Temple University's Japan campus.
"The diplomats made it seem like a win-win situation and helped both sides climb down," he said, adding that the agreement fell short of China's demand that Japan recognise the existence of a formal territorial dispute.
Wang Xinsheng, a Japan expert at Peking University, said it was clear the two countries had agreed to talks at APEC but added he did not expect any substantive breakthroughs.
"Questions of history and of the islands will need time to resolve. However, even a meeting and a chat is in itself a success," Wang said.

Latest News from World News Desk