Russian Foreign Minister Sergey Lavrov, right, and U.S. Secretary of State John Kerry shake hands during a joint press conference after their meeting in Moscow on May 8, 2013. (Misha Japaridze/AP)

Even as the chill in relations between the United States and Russia continues, the two countries are at least talking to each other more these days.

With Secretary of State John F. Kerry and FBI director Robert Mueller both having come here this week for substantive discussions, Russian officials seem to have borrowed a talking point from the Obama administration: Although no one is actually using the word “reset,” the Kremlin is nonetheless promoting the idea that Russia and the United States can pursue productive cooperation where their interests coincide and agree to disagree on other matters.

How far-reaching that cooperation might prove to be is an open question. A State Department official praised Russia’s help with “logistics” in arranging for FBI agents investigating the Boston bombings to make inquiries here. But when it comes to the substance of intelligence sharing, both sides remain wary.

On Syria, likewise, Kerry’s visit ended with a pledge by the United States and Russia to sponsor a new peace conference, within the month. Foreign Minister Sergei Lavrov said American and Russian intelligence agencies will coordinate their efforts in trying to determine whether chemical weapons have been used in Syria — and by whom.

But even as the countries seem to be trying to feel their way toward a resolution of the Syrian crisis — the U.S. ambassador to Syria, Robert Ford, took part in the Moscow talks — they still fundamentally disagree on the legitimacy of the Syrian government.

Still, Kerry’s visit here Tuesday and Wednesday, which included meetings with Lavrov and President Vladimir Putin, was well-received by his hosts. Russia and the United States have certain common interests on which the two countries can and should work together, Lavrov said afterwards — including not only anti-terrorism efforts, but initiatives against drug trafficking and organized crime.

“Secretary Kerry’s visit underscored that 2013 has the potential to produce a more productive trajectory in our bilateral relations,” U.S. Ambassador Michael McFaul wrote on his blog.

For the past 17 months, ever since Putin began his presidential election campaign, he has been casting the United States as a patron of disorder in Russia and a threat to Russian security. Relations with Washington steadily deteriorated, as each country banned a handful of officials from the other, American adoptions of Russian orphans were barred and American aid across a spectrum of causes was rejected. Russia repeatedly blocked efforts by the United States and other countries to commit the United Nations to resolving the conflict in Syria.

Both sides trace the marked change in tone to April 15, when Tom Donilon, President Obama’s security adviser, handed a letter from his boss to Putin, suggesting ways to put the relationship back on course. The Kremlin quickly promised to reply in kind.

On that same day, a few hours later, the two bombs went off in Boston. When the connection to the troubles in Russia’s North Caucasus became apparent, the security services of both countries had a compelling reason to open lines of communication, at the very least.

Yet all this is happening just as the Russian government itself appears to be going through a potentially serious transition, in a direction that is not at all clear.

Vladislav Surkov, a deputy prime minister and once Putin’s chief ideological adviser, was forced out of his job Wednesday in what is widely seen as the most serious move so far by Putin against his onetime protege, Prime Minister Dmitry Medvedev.

Putin, who has steadily betrayed a lack of respect for Medvedev since early this year, castigated Medvedev’s cabinet the day before Surkov’s resignation for its inability to get things done.

Surkov, back when he was in favor, coined the idea of “sovereign democracy” as a description of Putin’s system of control from the top down. But his standing fell during last year’s political protests, and he has most recently been in a public dispute with the country’s chief criminal investigator over allegations of corruption at a new high-tech center called Skolkovo — one of Medvedev’s pet projects.

Surkov’s exit illuminates public splits within the Russian ruling circle that until recently would never have been brought to light.

The government announced Thursday that he is being replaced by Sergei Prikhodko, who for 16 years was the chief foreign policy adviser in the Kremlin. Some opposition leaders, who in the past castigated Surkov as a propagandist, worried nevertheless that his ouster may be a sign that hard-liners — from the military, police and Federal Security Service — have won the upper hand.

At Thursday’s Victory Day parade in Red Square, Putin could be seen conferring and smiling with Defense Minister Sergei Shoigu, standing by the president’s right hand on the Kremlin reviewing stand, while Medvedev, to the left, stood slightly apart and in silence.

Mikhail Prokhorov, the oligarch and Brooklyn Nets owner who ran for president last year, blogged that it was the “end of the era of sovereign democracy.”

Kerry, who was here to discuss areas where the two countries can work together, was careful to strike a balance. He met on Tuesday with World War II veterans preparing for the 68th anniversary of the end of the war in Europe, and he laid a wreath by the eternal flame that burns just outside the Kremlin wall. But he also met Wednesday with representatives of civil society organizations at Spaso House, the U.S. ambassador’s residence.

American financial support for these groups has effectively been brought to a halt by Putin’s government, and the groups themselves have come under pressure, with regular inspections by police and prosecutors.

Kerry offered his support for the work of the nonprofit groups in the face of government hostility, and he told them that he spoke in their defense during his meeting with Lavrov. Yet with the Boston investigation still underway, the United States is also hoping for the continued cooperation of Russian law enforcement agencies.

On Thursday morning, police in the city of Kirov raided the office of Alexei Navalny, an opposition leader and anti-corruption blogger who is on trial there on charges of embezzlement, which he vigorously denies. They said they were looking for extremist leaflets. Kremlin supporters have accused Navalny — who spent a semester at Yale University — of being an agent for an American plot to foment revolution in Russia.

Kathy Lally contributed to this report.