President Reagan and Indian Prime Minister Indira Gandhi sought to improve the often strained relations between their countries yesterday with a visit the White House described as "friendly, relaxed, informative and constructive."

The Indian leader, making her first official visit to this country in 11 years, went out of her way to praise America and Americans, both at the White House and in meetings on Capitol Hill, and the response in both places was immediate and warm.

Reagan beamed at the welcoming ceremony on the sunny South Lawn of the White House when Gandhi praised the adventurous spirit, opportunity, freedom, ideals and power of the United States.

"Today, its role in world affairs is unmatched," said the visitor, who maintains a non-aligned policy between East and West, and who will visit Moscow in September.

Part of her message, in the welcoming ceremony and other talks, is that India will not join "power groupings" and that "one friendship does not come in the way of another." Through her remarks, a surprise from a figure with a reputation for contention and condescension, Gandhi seemed to be making a bid to bring warmth to an Indo-American relationship that has frequently been wary.

To the House Foreign Affairs Committee, Gandhi declared: "The American people are loved everywhere." And she added, "No matter what the differences, we have always loved you."

Chairman Clement J. Zablocki (D-Wis.), for her manner as much as her message, praised Gandhi as the most forthright foreign leader ever to come before the committee.

The background music for the love feast was enhanced by the White House announcement that the two nations have agreed to settle a longstanding and sometimes passionate dispute over the future U.S. supply of uranium fuel for India's Tarapur nuclear power reactor.

Assistant Secretary of State Nicholas A. Veliotes announced the agreement under which France will supply uranium to India's U.S.-supplied Tarapur nuclear power reactor, an arrangement that preserves safeguards against diversion of the atomic material.

U.S. law forbids a further American supply unless India places all its nuclear facilities under international inspection, which it has refused to do.

Veliotes said the agreement has "signficantly enhanced the friendly relations between the two countries" while serving non-proliferation interests and meeting India's requirement for atomic fuel.

A sour note was sounded by Rep. Edward J. Markey (D-Mass.), who said the agreement undercuts the 1978 Nuclear Non-Proliferation Act.

"Any way you look at it, India gets the uranium and U.S. non-proliferation policy gets the shaft," Markey said.

Not all the differences and problems between the world's two largest democratic nations yielded to the atmosphere of warmth.

A White House briefer reported that Gandhi expressed concern that U.S. weapons supplied to Pakistan under a new $3.2 billion agreement might be turned against India, its neighbor and antagonist in three wars since 1947. Reagan, according to the briefing, replied that the U.S. weapons--including tanks, howitzers and F16 jet fighters--will be used "for defensive purposes only."

The arms for Pakistan, in the U.S. view, are designed to respond to the threat arising from the presence of 100,000 Soviet troops in Afghanistan, on Pakistan's border opposite India.

The U.S. briefing officer conceded that Reagan's response did not reassure the Indian visitors.

Beyond Pakistan, Washington and New Delhi have differed from the first in their handling of the December, 1979, Soviet invasion of Afghanistan, with India being the only non-Soviet-bloc nation to abstain from voting on U.N. resolutions calling for Soviet withdrawal from Afghanistan.

Before the Foreign Affairs Committee, Gandhi said India is seeking through diplomatic means to bring about a Soviet withdrawal. She reportedly added that Moscow must be certain that the Afghan government will not be anti-Soviet, though in her view an overtly pro-Soviet government is not required.

India has expressed major concern about U.S. initial opposition to a $5.7 billion International Monetary Fund loan to India and about a slackening pace of U.S. contributions to such multinational institutions.

Gandhi was assured in the White House meeting, according to the U.S. briefer, that Washington will continue to support bilateral and multilateral aid for India. But no figures were disclosed, nor were specific commitments made beyond the friendly rhetoric.