Russia and the EU have said they will try to avoid "misunderstandings" over energy policy in future.
The summit brought a change in atmosphere
The two sides discussed their energy partnership at a Black Sea summit, against a backdrop of threats to look for other suppliers and customers.
But Austrian Chancellor Wolfgang Schuessel said their interdependence was a "win-win situation".
For his part, Russian President Vladimir Putin said China was not an alternative customer to the EU.
Russia supplies a quarter of the EU's gas and the proportion could rise as imports grow in future.
The EU has been making plans to reduce its dependency on Russian gas, particularly since a row between Russia and Ukraine in January led to a brief disruption to supplies.
Russia responded to this - and to signals that it could face difficulties entering the EU's retail gas market - by saying it would seek other customers in Asia.
GAZPROM: RUSSIA'S GAS GIANT
Created in 1989 out of the old Soviet gas ministry
Now the world's third-biggest company, behind Exxon Mobil and General Electric but ahead of Microsoft
Russian state is majority shareholder with a 51% stake
Has a monopoly on Russian gas exports
Supplies a quarter of Europe's gas and controls 25% of world gas reserves
Employs more than 300,000 people
Owns the world's longest pipeline network, totalling nearly 150,000km
Other assets include a bank, an insurance company, a media group and St Petersburg's Zenit football team
The situation has been complicated by accusations from the US, echoed in Poland, that Russia is using its energy resources to bully its neighbours.
But European Commission President Jose Manuel Barroso said the talks in Sochi had been open and constructive.
"The customer needs its supplier. The supplier also needs the customer. That's the basic point. So interdependence. But also reciprocity and transparency in our relations. And these were precisely the points we have been debating," he said.
The two sides signed a deal making it easier to get visas to travel between Russia and EU member states, and simplifying the deportation of illegal immigrants.
Mr Schuessel of Austria, the current holder of the EU presidency, described these agreements as "real practical steps to build closer relationships between our citizens".
Mr Putin said he hoped the visa agreement would boost business, cultural and scientific ties, and youth exchanges.
An agreement was also reached on co-funding of a European Studies Institute in Moscow, and an EU aid programme for the North Caucasus.
The two sides also discussed Iran, the Middle East and human rights.