Seven West European allies agreed today to pursue a coordinated response to President Reagan's Strategic Defense Initiative in an effort to maximize their influence on the project.

In a declaration following a two-day meeting of the Western European Union, the seven member countries said they would first consult individually with the United States to determine the extent of research opportunities in the "Star Wars" program before broaching a common position. The declaration reflected the reservations of the British, who have questioned Europe's ability to reach a consensus.

Foreign and defense ministers at the session admitted the exploratory talks with Washington would take months and that a joint reply would be impossible before their next meeting in Italy in November.

The seven-member union was reactivated last year after three decades of dormancy in an attempt to strengthen Europe's role in security matters within the alliance. Its members include Britain, France, West Germany, Italy, Belgium, Luxembourg and the Netherlands.

France and West Germany have advocated a common European response to U.S. offers to join in the $26-billion SDI research program over the next five years. Paris and Bonn believe that by acting together the European countries can demand a fair share in research findings and reap greater benefits from any industrial spinoffs.

The West German government also feels that only by becoming involved early in the research phase can the European countries hope to influence future deployment decisions regarding any new weapons or defense systems that emerge from the program.

But today's statement, reflecting London's reservations, said the seven countries agreed "to achieve as far as possible" a coordinated reaction among their governments to American invitations to participate in the "Star Wars" research.

"We are at the very beginning of a dialogue with the United States on SDI," said British Defense Secretary Michael Heseltine. "Once we have explored bilateral opportunities, the countries here will want to see how far European coordination will be possible."

The ministers also declared their intention to consider ways to bolster advanced research on a European level for the development of a "technological community" that could compete more effectively with the United States and Japan.

France has proposed that European countries should combine their resources in areas such as optics, high-power lasers and microelectronics that would constitute important sectors of SDI research. The French plan, dubbed the Eureka project, was promoted here by Foreign Minister Roland Dumas, but only Italy and Luxembourg endorsed it, French officials said.

West German Foreign Minister Hans-Dietrich Genscher, who chaired the meeting, said that as part of the drive to revive the Western European Union three new agencies would be established to study arms control, security and cooperation in weapons production.

Bonn's defense minister, Manfred Woerner, said European governments wanted faster progress in coordinating their armaments industries. The new agency on arms cooperation is supposed to produce a report by the November meeting showing how the seven members can pool their investments and skills in producing expensive new weapons systems.

"We know that in the long run we have to find a better way of using our resources," Woerner said.

European governments want to pool their arms programs so that they can sell more big-ticket military items to Washington. The United States currently enjoys a 7-to-1 advantage in the transatlantic arms trade.

Britain, however, believes that any coordination of European weapons programs should be carried out through the Independent European Program Group that includes other European allies within NATO.