For all the international concern generated by the presence of about 2,500 Cuban advisers, the gist of Fidel Castro's counsel to the Nicaraguan revolution so far is that it should take firm measures to avoid becoming another Cuba.

Castro, the hero of Latin American leftists for three decades, is considered to be one of the ruling Sandinista movement's most trusted advisers. But the advice he offers is so pragmatic, and often so divorced from expected Marxist ideology, that a friend of his recently declared; "In the old days, he probably wouldn't have taken it himself."

The thrust of his message is that Nicaragua should benefit from Cuba's mistakes.

A high Mexican official long interested in Cuba said recently, "For years, Castro wanted to show Moscow how youbuild a true socialist society, more humane and more just than the Soviets. But he bogged down. Like a doting father, he now wants for the Nicaraguan revolution everything he hasn't achieved in his own."

From interviews with Nicaraguan and Cuban officials and Western diplomats, it appears that Castro's private advice is a more biting version of his public statements and a harsh judgement of his own revolution. The Cubans reportedly are telling the Sandinistas not to turn Nicaragua into an isolated, bureaucratic, inefficient state and not to become a Soviet satellite.

On a more mundane level, the Cubans warn the Sandinistas to be leery of imports from the Soviet Bloc, necessarily the source of most Cuban capital goods. Early this year, the Cubans were shocked to learn that Nicaragua had contracted for 800 East German trucks.

Cuba had found that although the trucks were offered on favorable terms, their performance was low and spare parts hard to come by. When the Cuban advisers suggested canceling the deal, Nicaragua sent a mission to East Germany or that purpose.

"A deal is a deal," East German Communist Party chief Erich Honecker reportedly replied. Nicaragua spent $18 million for the trucks, so enraging one official that he called for braking relations with East Germany. The Nicaraguans made clear that they will consult the Cubans before any more such purchases.

Latin American analysts sympathetic with Cuba say they think its objective in seeking to make the Nicaraguan revolution viable is twofold: to establish a long-sought foothold on the mainand, but more important, to foster an alternative revolutionary model at a time when Cuba's is widely discredited by the spectacle of thousands of dissidents fleeing the island.

Castro's advice, some of it alluded to publicly, is for the Sandinistas to maintain close relations with the United States, the Vatican, private captial and international financial institutions that are a source credibility as well as credit.

With Cuba's growth limited in part by the U.S. boycott, Castro has underlined Nicaragua's needs for Western machinery, financing, medicines and markets.

Castro's long battle with the Roman Catholic Church in Cuba led to deep conflict within that society and lost him the support of Christian groups abroad that othewise might have been sympathetic.

But the Cuban's most reeated warnings are against creation of a stifling omnipresence of the state in daily life. At home, Castro is trying to cut back the role of the state and breathe new life in the stagnant economy by reviving some private enterprise.

The role of private enterprise in Nicaragua has been hotly disputed since the Sandinistas overthrew Anastasio Somoza in July 1979. Private business not only should exist within the Nicaraguan socialist revolution, said a high-ranking Cuban official, "it should be reactivated and stimulated."

Although much of Cuba's advice sounds reassuring to U.S. diplomats here, the diplomats' more serious concern is the Cuban advisers in the areas of intelligence, communications and the armed forces. A State Department official said he sensed that the Cubans were behind the "instances of misinformation and paranoia about us, which is disturbing and destructive."

U.S. diplomats thus were all the more surprised in July to hear Castro make a complete turnabout from that line in telling reporters at the first anniversary of the revolution that the U.S. role here was "intelligent and constructive."

Other Latin Americans and Europeans are in the majority among advisers in the radio and television fields but the Cubans are intended to be the main group in security and intelligence. Ruling junta member Sergio Ramirez said no Cuban military advisers were here now, "but we had some last year, and there will be some again under the new military agreement we signed with Cuba. But the agreement is one of strict technical assistance."

Most Nicaraguans seem to share their revolutionary enthusiasm more easily with the Cubans than with the melange of Latin American, European and U.S. technicians offering assistance. However, several months ago the government had to use force to put down anti-Cuban -- and anti-sandinista -- riots in Bluefields on the Atlantic coast, where there was even talk of secession among the largely isolated black community.

Some of the "don'ts" that the Cubans pass along to Nicaragua are particularly revealing of how the islanders perceive their home situation. For example, Cuban advisers say a state distribution system is more costly and less efficient than a market system, while adding to unemployment because it eliminates jobs in the vast network o small producers, sellers and shopowners.

The planning sector, ever the favorite of socialist economies, must be kept small, say the Cubans. One of the Castro's planners told Nicaraguans that Cuba's big mistake was "that we put all out good people in planning jobs behind desks. They should have been kept in production."

This moderation and warning from the Cubans has gained them the ear, if not the confidence, of the non-Marxists in the Nicaraguan government. They contrast the Cuban approach to what one described as the "boastful or arrogant advice" they often get from other friendly Latin American countries.

While the Sandinistas insist they are deeply grateful for help from Venezuela and Mexico, a non-Marxist government economist said it "often is not what we need."