The deal came as countries were investigating the cause of leaks in Russia's Nord Stream gas pipelines to Europe, and as Europe heads into an energy-scarce winter after Russia slashed gas deliveries in the wake of its invasion of Ukraine.
Moscow blames the supply cuts to EU countries on Western sanctions.
EU energy ministers immediately launched talks on Friday on their next move to contain the energy crunch, which many countries have said should be a bloc-wide cap on gas prices.
But for now, here are the energy measures EU countries approved on Friday.
WINDFALL LEVY ON NON-GAS POWER PLANTS
The EU agreed to claw back revenue from electricity generators with low running costs to raise cash for governments to spend on cushioning consumers and industry from soaring energy bills.
In the EU system, gas plants often set the price of electricity. Wind, solar and nuclear power plants can still sell their electricity at the resulting high prices even though they have far lower running costs, and do not have to pay huge bills for fuel.
EU countries will skim off excess revenue made by these generators, and also by electricity traders, from December to June 2023.
The measure would apply a price limit of 180 euros per megawatt hour (MWh) until March on the revenue these generators get for their power in the market.
The limit would be applied after power transactions are settled, so it would not directly affect prices in Europe's exchange-traded electricity market.
Countries could opt to also impose an even tougher national cap on revenues, or only recoup 90% of firms' excess revenues if they choose. They can also set a separate cap to skim off coal plants' revenues.
National governments would be responsible for recouping the cash and spending it to mitigate soaring energy prices. That could include giving consumers financial incentives to use less power, lowering consumers' electricity bills, or helping them invest in energy-saving measures such as home insulation.
The Commission said the proposal would raise 117 billion euros ($117 billion), although that cash would not be evenly shared, and countries such as Estonia have said they expect to gain little revenue from the measure.
The levy would not be mandatory for Malta and Cyprus, island countries not fully connected to the EU electricity system.
PROFIT SHARING FOR FOSSIL FUEL FIRMS
EU countries will also skim off excess cash from companies that have made bumper profits from selling fossil fuels at record prices.
They also agreed on Friday to introduce a temporary windfall profit levy for oil, gas, coal and refining companies.
This would apply to 33% of firms' taxable surplus profits from 2022, 2023, or both, with surplus profits defined as those 20% above a company's average taxable profits in the last four years.
States including Italy and Greece already have a windfall profit tax on energy firms, and countries agreed that governments can keep such national measures, instead of replacing them with the EU scheme.
The levy would be collected by the EU country where the company's windfall profits are generated.
ELECTRICITY DEMAND CUT
EU countries also agreed to a mandatory target to cut their electricity consumption from December to March, to ensure Europe has enough fuel to last the colder months.
During the 10% of hours of highest electricity demand each month, EU countries would be required to curb their power use by 5%. National governments would be responsible for designing measures to lower demand.
EU gas storage is now 88% full, exceeding the EU's pre-winter filling target. But analysts say Europe will still need to slash gas use over winter to avoid storage facilities running dry.
NO GAS PRICE CAP
EU countries will now assess possible extra measures they could use to curb surging prices, including a gas price cap.
France, Italy, Poland and 12 other countries this week asked the European Commission to propose an EU-wide price cap on wholesale gas transactions.
Other countries are opposed - among them Germany, Europe's biggest gas buyer, and the Netherlands - warning it could leave countries struggling to attract supplies in price-competitive global markets this winter.
The European Commission has also raised doubts, and suggested the EU instead apply a more limited price cap on Russian gas, or gas specifically used for power generation.
EU energy ministers will discuss their next steps on Friday. The Commission, which drafts EU policies, will then share details next month on the extra measures it is looking into.
That could also include help for energy companies facing soaring collateral needs and an alternative benchmark price for liquefied natural gas, ideas Brussels has said it is working on.
(Reporting by Kate Abnett, Jan Lopatka; Additional reporting by Susanna Twidale; Editing by Philip Blenkinsop and Jan Harvey)
By Kate Abnett