Cuban President Fidel Castro believes recent diplomatic contacts between Washington and Havana have been "constructive and positive" and says that confidence-building agreements in several other areas of mutual interest could contribute to a possible improvement of U.S.-Cuban relations during President Reagan's second term.

In an interview here, Castro listed coast guard activities, fishing rights, radio signal interference and air hijacking as areas in which negotiations could constitute "an expression of good will on both sides" that would build on a U.S.-Cuban agreement on immigration signed in December.

That agreement, which grew out of the first extended diplomatic contact between Cuba and the Reagan administration, provides for the emigration of up to 20,000 Cubans to the United States each year, the return to Cuba of nearly 2,800 previous emigrants found undesirable or ineligible for U.S. residency and the admission to the United States of former Cuban political prisoners.

Castro said that in general he had detected within the administration "a possible tendency to be more realistic during this second term." He cited "some positive signs internationally," including last month's U.S.-Soviet arms control talks, and signs "vis-a-vis Cuba itself," such as the immigration agreement.

For its part, the administration has emphasized the narrow and limited nature of the immigration accord and its belief that relations will not improve until Cuba's close ties to the Soviet Union are altered and Havana ends its support for the leftist Nicaraguan government and insurgencies elsewhere in Central America.

In recent public speeches and conversations with other American visitors, Castro has taken a conciliatory tone that largely has been rejected by the administration as a public relations ploy lacking substance. Following a similar message sent late last month through visiting U.S. congressmen, a State Department official said that the administration had "checked out" Castro's efforts and found them "not serious."

During six hours of conversations Wednesday with three Washington Post editors, Castro said "we are not impatient, nor . . . are we anxious" for an improvement in relations. But he repeated what he said was his willingness to "exchange views with the United States on any topic" and to cooperate in achieving an international settlement of armed conflicts in Central America and the withdrawal of Cuban troops from Angola.

Expanding on these and other subjects, Castro noted:

* The Reagan administration has been "one of the most hostile" ever toward Cuba in terms of economic sanctions and military pressure, and he sees "no special signs" of basic policy change. In response, he said, Cuba has "revolutionized" and expanded its domestic defenses to the point where "any military adventure against Cuba would be doomed to failure" and would be "very costly" to the United States.

At the same time, however, Castro credited the administration with being the first since he took power in 1959 definitively to stop anti-Castro exile attacks launched from the United States against the island, to take substantive legal action against exiles who have committed anti-Cuban crimes on U.S. territory, and to discourage illegal emigration from Cuba to the United States. He referred with approval to what he said were second-term Reagan statements indicating a trend away from "war-mongering" and toward "the goal of finding solutions to international problems through dialogue."

* Castro said it was "inconceivable for the United States to try to sort out the problem of Nicaragua through [direct] intervention" and insisted a solution could be found within the framework of the Contadora group negotiations. He said the ruling Sandinistas could withstand indirect U.S. military and economic pressure indefinitely.

He said that he had conveyed to the foreign ministers of Colombia, Mexico and Panama, which along with Venezuela constitute the so-called Contadora countries seeking negotiated settlements in Central America, Cuba's willingness to withdraw any or all personnel in Nicaragua under any agreement signed by the Sandinistas.

* Castro said Cuba supports negotiations between the U.S.-backed government and Cuban-backed guerrillas in El Salvador, and he insisted that the guerrillas seriously are interested in a political settlement. While he said neither side will be able to achieve a military victory in the short term, and noted that logistics had become "highly difficult" for the guerrillas, he said the rebels could "resist indefinitely" in the absence of a negotiated agreement.

* Castro also indicated that he may be prepared to scale down Cuba's military efforts in Africa, a major point of conflict between Washington and Havana. He confirmed that Cuba has reduced significantly the number of troops it has in Ethiopia, and he offered qualified praise for a U.S.-sponsored mediation effort between Angola and South Africa that eventually could lead to Cuban withdrawals from Angola.

Castro would give no specific figures on the Cuban military presence in Africa. U.S. estimates put the current force in Ethiopia at about 5,000, down from a peak of 17,000. It is estimated that there are 25,000 Cuban combat soldiers in Angola.

Since the early 1970s, Castro regularly has used visits to Cuba by U.S. congressmen, other officials and journalists as a means of sending messages to Washington across the wide political breach separating the two countries. Such contacts have lessened, both in frequency and impact, under the Reagan administration, which consistently has blamed Cuba as the "source" of conflict in Central America. In its early days the administration contemplated imposing measures ranging from a naval quarantine to direct military action against the island.

But since the immigration agreement was concluded Dec. 14, Castro has played host to a delegation of U.S. Catholic bishops and has been visited by three U.S. congressmen accompanied by several scientists and businessmen.

The congressional delegation, including Reps. Mickey Leland (D-Tex.) and Jim Leach (R-Iowa) and headed by Rep. Bill Alexander (D-Ark.), carried Castro's message to Washington. Alexander later said that in a meeting the day after their return Jan. 17 he told Defense Secretary Caspar W. Weinberger that "Castro wants to normalize relations with the United States, period."

"He's waiting for someone to talk to. He's standing there like a bridesmaid," said Alexander, who is chief deputy majority whip in the House and a vocal critic of the Reagan administration's policies in Central America.

After questioning whether Castro can be trusted, Weinberger "promised to bring it up with the president and with [Secretary of State George P.] Shultz," Alexander said in a telephone conversation in Washington.

At the end of the lengthy interview Wednesday in his office in the Palace of the Revolution, Castro emphasized that "nothing I have said here was intended to be hostile toward the United States." He had noted throughout that Cuba had observed favorably both the substance and the tone of the recent immigration negotiations, which he characterized as "excellent. Very serious and respectful."

The talks themselves were a long time starting and followed a diplomatic offer made by the Reagan administration last March and a June visit to Havana by then-presidential candidate Jesse Jackson, who helped persuade Castro to accept the offer.

Although discussions between the two governments began in New York in July, they were suspended without public explanation in August because of what Castro said in last week's interview was an "absolutely unnecessary" flight of a U.S. high-flying SR71 spy plane over Cuban territory. According to Castro and other Cuban officials, while the United States frequently flies such aircraft around the island, it rarely penetrates Cuban air space. The alleged August overflight was the first since late 1983, they said, and was viewed as "provocative" while the immigration talks were under way.

"Practically all the data the United States wants to get about Cuba they can get through the satellites -- even the slightest details -- and through the flights around Cuba," Castro said. "We didn't want to bring a scandal about this. We wrote a protest note about it." According to the Cubans, the United States provided a satisfactory answer indicating the flight was unrelated to the negotiations.

The Defense Department declined to respond last week to a Washington Post inquiry about the incident, noting that as a matter of policy it "does not comment on reconnaissance flights."

In general, Castro said, the Reagan administration had stepped up military maneuvers off its coast and at the U.S. naval base at Guantanamo on the eastern tip of Cuba and greatly increased aerial surveillance of the island nation. Other Cuban officials said that flights in international air space around Cuba by the SR71 planes had increased from eight during the Carter administration to 120 during the first four years of the Reagan presidency. Flights directly over Cuba, they said, had decreased from five during Carter's term to four since Reagan became president.

In a list of what he called "hostile" acts by the administration, Castro also included "intensified economic measures, the economic blockade," and the exertion of "great pressure to obstruct the rescheduling of Cuba's external debt" with the West.

"In the political field, it also has been very aggressive," he said, "and in the military field, it has constantly threatened us. All that is true. But nevertheless, we are grateful. I'm speaking seriously, we are very grateful.

"Why? Because it forced us to undertake two big revolutions." One, he said, amounted to a rethinking of Cuba's economic structure that has resulted in a continuing austerity drive, an emphasis on import substitution and the fulfillment of trade commitments with the Soviet Bloc.

More importantly, Castro said, "during the past four years, in view of the threat of the United States, we have totally changed our conceptions regarding defense. We have multiplied our forces by many times, to the point that we have become an unconquerable country. Invulnerable, unoccupiable."

Included among the new defense measures is what has amounted to the reestablishment of a nationwide militia that has trained and armed hundreds of thousands of Cubans along the lines of the force that existed following the Bay of Pigs invasion in 1961. "Every citizen in this country knows what to do," Castro said, "in the event of a blockade, a war of attrition, bombings, an invasion, even in case of an occupation of the national territory.

"It would be very costly for us, and it's not a test we would like to go through. But it would be very costly for the aggressors, and it would be a cost they could not bear . . . . We know this, and the U.S. experts in matters of war know this as well."

But in a lengthy monologue that chronicled rising debt, unemployment and social pressures in the Third World, particularly in Latin America, Castro indicated his belief that time is working toward dialogue and against what he characterized as an interventionist U.S. policy in the hemisphere. He said the Latin Americans, long separated by an "every man for himself" attitude, are starting to see joint efforts as the only solution.

"Latin America is a powder keg," he said. "It's an explosive situation. It's a serious thing, and how are they going to solve it? It's better that we start thinking about all of these problems.

"I believe that the United States has to think in the longer term, and elaborate concepts and ideas that will govern its relations with Latin America," Castro said.

In particular, he said, the United States needs to change some of its views about Cuba. "I think that many times in the United States, opinions are held on the basis of beliefs rather than ideas . . . sustained by solid arguments." Instead of hostility, he said, the international situation requires efforts to understand each other's point of view.

"I believe that when people talk to each other, they can better understand each other's point of view . . . . I believe any exchange of views would be useful."

While he noted that he did not think "there are other pending issues" as important as the immigration accord, Castro said there "could be other" areas for "non-sensitive" talks between Washington and Havana. Among them, he listed "cooperation between the coast guards for rescue operations, rescuing people." He cited as an example of the potential utility of such an agreement a late November incident in which Cuban naval efforts to aid a U.S. oceanographic research vessel disabled in Cuban waters resulted in the American dispatch of the U.S. aircraft carrier Nimitz.

Secondly, Castro mentioned a U.S.-Cuban antihijacking agreement that Havana canceled after a Cuban airliner blew up after takeoff from Barbados in 1975, an incident for which Cuba blamed the U.S. Central Intelligence Agency. Although he said Cuba largely has solved the hijacking problem unilaterally through stiff prison sentences for perpetrators, he noted that "the possibility of formalizing an agreement could be analyzed to give this question a legal nature."

Castro also spoke of the possibility of developing bilateral or international discussions on the question of overlapping commercial and civil radio transmissions. Cuba threatened to jam internal U.S. broadcasts after the Reagan administration announced plans to begin operation of a new political broadcast into Cuba, to be called "Radio Marti," along the lines of Radio Free Europe and Radio Liberty. Although the program was scheduled to begin operations last spring, it has been delayed without explanation by the administration.

Lastly, he mentioned a negotiated agreement on fishing rights in overlapping territorial waters that he said previously had been "reached but never put into effect."

Castro acknowledged that the question of Central America was "very delicate" but insisted that the issue of Nicaragua could be resolved through negotiations. He reiterated his pledge to abide, with verification, by any agreement Nicaragua would sign calling for the withdrawal from Nicaragua of Cubans -- numbered by the Sandinistas at 4,000 and by the administration at 6,000.

But, he said, the decision is up to the United States, which has opposed as inadequate a pending Contadora accord that deals with the withdrawal of all foreign forces from Central America.

Ruling out the probability of direct U.S. intervention in Nicaragua, Castro said: "I think that the United States at the moment hopes to destroy the Nicaraguan revolution from within," by continuing to support the operation of anti-Sandinista rebels and "by compounding Nicaragua's economic difficulties. I am convinced that the U.S. hopes to end the revolution through this combination. As long as the United States has this hope, it will not seriously express the will to find a solution."

El Salvador, Castro said, presents a much more difficult problem, but one that he said still is soluble. "If both sides want to find peace," he said, "then peace can be found."

Talks between Salvadoran President Jose Napoleon Duarte and the guerrillas "are to be encouraged, and work has to proceed in this direction." Because of what he described as Salvadoran "right-wing opposition" to the talks and the uncertain position of the Salvadoran Army, Castro said, "Duarte is not now in a position to resume the dialogue" started in October but "has to wait for elections to be over" next month.

But, Castro said, "as long as there is the idea that military victory is possible, that they can eliminate [the guerrillas] down to the last revolutionary, as an example that there would never again be revolutionaries in Central America or anywhere else, then there will be no readiness on the part of the United States, on the part of Duarte or of the Army to negotiate. Unfortunately, one would have to wait until they were persuaded otherwise."

Castro seemed less certain than in previous statements that the guerrillas are capable of winning a military victory. "Under present conditions," he said, "it doesn't seem easy to score a military victory in the near future . . . . They cannot defeat the Army. But the Army cannot defeat them. Whose side will time be on? Who will be able to resist?"

He declined to comment on specific Cuban assistance to the guerrillas but said that guerrilla supply lines from the outside largely are non-existent because logistics are "almost impossible." He insisted that, like his own guerrilla forces in the fight against Cuban dictator Fulgencio Batista, the guerrillas get most of their weaponry from the enemy itself.

While he said that Cuba would never give up the "moral principles" that govern its support for the guerrillas, Castro said "there are other ways" of addressing the problem with the United States.

"I am speaking of a readiness to work, to strive in order to find solutions to the problem. That is the position we maintain. It's not a question of us giving up our principles or views, but rather to work in such a direction that there is no need for war, for weapons or for ammunition. It is not a question of us . . . solemnly pledging that we will abide by this or that, or to say that we are very happy to improve relations with the United States on the basis of promising that we will never send a bullet to a revolutionary. . . . If that is the price for improved relations with the United States, we cannot pay that price."

Castro addressed himself directly to one Cuban-assisted revolution that had failed -- that in Grenada. He insisted that slain Cuban-backed leader Maurice Bishop "was not building socialism in Grenada . . . he was inspired by a revolutionary idea . . . a political theory, but he was not building socialism."

The October 1983 U.S. invasion of the island nation after an extremist group in the government overthrew and killed Bishop, he said, was unnecessary because the extremists already "had committed political suicide." Cuban forces helping to build an airport on the island had been told only "to fight if they were attacked" by U.S. forces.

"Without the intervention, that government would have been liquidated. Our idea was to finish the airport and leave. Our cooperation with that government would have ceased. We were so angry" at the Grenadians. "Once we withdrew, no one else would have helped them."