President Fidel Castro today announced the signing of an agreement authorizing the release of more than 3,000 Cuban political prisoners and presented an initial list of 400 prisoners he said would be freed this month.

The agreement, negotiated over the past several weeks with a group of Cuban exiles, also provides for the free exit from Cuba of both the current prisoners and at least 12,000 more former political prisoner and their families.

Following Castro's announcement in a post-midnight news conference, the more than 140 exiles who traveled here Thursday to complete the agreement -- some of them former prisoners or veterans of U.S.-sponsored campaigns to overthrow Castro's government -- stood to applaud and sing the Cuban national anthem.

The exile group joined Castro in describing as a "positive" step yesterday's Justice Department decision to quickly screen and admit the newly released prisoners to the United States in groups of up to 400 per month.

But both Castro and the exiles criticized U.S. reluctance to similarly expedite the admission of the ex-prisoners, some of whom have been free for years, who have expressed a desire to emigrate.

"The United States has differentiated between the two groups," Castro said. "Many of the ex-prisoners have friends and relatives in the United States" and it was "the United States that led them into counter-revolutionary activity here."

The United States, Castro told reporters while the exiles applauded, has "a moral obligation" to accept any current or former counter-revolutionary prisoners Cuba is willing to release.

"We don't understand why the United States is making it so difficult."

Castro described U.S. Cuban relations in general as "pretty bad." While he commended President Carter for being what he said was the first U.S. chief executive not to authorize attacks against his government, Castro repeated a litany of old and recent charges against the United States.

He criticized the 16-year-old U.S. trade embargo against Cuba as "indecent." He noted that following his denial last may of Cuban involvement in the Katangan invasion of Zaire, the United States "practically called me a liar."

Castro also referred to last month's U.S. flap over the presence of Soviet Mig23 jets in Cuba as a "fraud" because he said the United States had known of the planes for nearly a year.

The United States publicly charged Cuba with maintaining strategic aircraft sollowing what Castro said was the Nov. 12 overflight of a U.S. spy plane. Cuba, he said, "could have shot down" the plane, but did not want to "put Carter in an embarrassing situation."

While Castro said it would be "infantile" for him to invite Carter to Cuba to talk over bilateral relations, he said he would, in theory, "dare to talk with Carter anywhere, because I have some powerful arguments" to present to him.

But, Castro asked rhetorically, "can Carter afford to defy the pressure of all the reactionary elements in the United States" to talk to Cuba?

The prisoner release agreement appears not only to have embarrassed the Carter administration, but has gone a long way toward silencing one of the more militant anti-Castro groups in the United States -- the exiles.

Castro first announced his intention to release all but about 500 of Cuba's at least 3,500 political prisoners, some of whom have been in jail for more than 20 years, to the United States last August. He called the step a gesture toward improved relations with the exile community and, during the first week in September, a group of exile journalists traveled here to meet with him.

Initial lists of more than 700 names handed over to the United States by the Cubans in September were made up primarily of Ex-prisoners and their families who wanted to emigrate to the United States because they had family there of felt they suffered discrimination here.

By mid-October, however, only 46 of those had been cleared for admission because of what U.S. authorities said was a necessarily long process to screen out possible criminals or Cuban spies and terrorists.

The exile groups that had long pressured Castro on the prisoner issue then began to pressure the human right conscious U.s/. government.

On Nov. 20, a group of 75 exiles met here with Castro to negotiate details of a comprehensive agreement to provide not only for the release of prisoners but also for the emigration of prisoners and ex-prisoners and Cubans with families abroad, primarily in the United States. The agreement also provided for regular visits here by Cuban exiles living abroad and possible visas for Cubans here to visit their families in the United States.

At that meetin, Castro told the exiles that the success of the program depended "on the attitude the United States adopts" toward admitting masses of prisoners.

"I'm sorry that Premier Castro was displeased with my conduct" on the prisoner issue, Attorney General Griffin Bell said in a television interview last week.

"We want to be certain that they are political prisoners," Bell said. "We want to be certain that we're not getting some subversives mixed in, who are coming over here to subvert our system."

While some of the exile group feared Castro would scuttle the release plan and accuse Washington of intransigence, a tacit compromise of sorts appears to have been reached.

The United States has agreed to expedite the admittance of approximately 400 newly released prisoners per month -- exactly the number Castro originally outlined. At the same time, the Justrice Department said it could now speed up its processing of the ex-prisoners.

Castro said in this morning's news conference, however, that of the 400 eligible prisoners on the first release list, fewer than 120 have indicated a desire to leave Cuba, and that the rest would be "integrated" into Cuban society.

He again tossed the ex-prisoner ball into the U.S. court, however, by saying that he hoped that the United States would admit at least 400 a month anyway, making up the difference with the ex-prisoners.

Exile representatives said they would continue to pressure for an expedited program for all prisoners and Ex-prisoners as soon as they returned to the United States on a charter flight to Atlanta Sunday.

The first release of 400 prisoners is not expected until around Christmas. A flight of 176 current and former prisoners and their families, cleared by the United States over the past month, is expected to leave here for Miami next week.

Exiles also announced at the beginning of their six-hour meeting with Castro that began yesterday afternoon before the news conference, that the government of Venezuela has offered to send charter flights here to pick up as many as 1,500 ex-prisoners and their relatives for admission to that country.