WASHINGTON (AP) _ A federal judge ordered a 26-year-old courier held without bail pending a grand jury proceeding after noting the government had ''just barely'' shown probable cause to charge the defendant with espionage.

U.S. Magistrate Jean F. Dwyer said Tuesday she did not believe the government's case ''gained very much weight overnight'' as she held Randy Miles Jeffries, a messenger for Acme Reporting Co.

Jeffries' attorney, G. Allen Dale, immediately appealed the magistrate's decision to U.S. District Judge Joyce Hens Green, but the appeal was denied.

At a hearing Monday, Mrs. Dwyer said the sworn statement of the FBI supporting the charges was ''as thin an affidavit as it has been my misfortune to see in many years,'' and told the government to return Tuesday with more ''meat'' to its charges.

Mrs. Dwyer said Tuesday, however, that the government had produced a statement from a Jeffries co-worker, Keven Collins, who said he saw Jeffries ''with the documents a few hours before a person resembling him arrived at the (Soviet) embassy.''

She added: ''That, in itself, gets us past probable cause, but just barely.''

At Tuesday's hearing, FBI agent Michael Giglia acknowledged the government did not find any classified documents on Jeffries when he was arrested last Friday night or any in his apartment Saturday.

Giglia said Monday that Collins saw Jeffries go to the garage of their office building and retrieve documents which, Collins said, were supposed to have been destroyed.

A short while later, the Soviet Military Office in Washington received a telephone call from someone identified as ''Dano'' who offered to sell one ''top secret'' and two ''secret'' documents, the agent said in a court document.

The agent said ''Dano'' was identified as Jeffries, and the document later was identified as a transcript of testimony by high-level defense department officials, which had been transcribed by Acme.

Giglia said a black male resembling Jeffries entered the Soviet Military Office and remained there for half an hour. He said an FBI undercover agent, who spoke with a Russian accent, later telephoned Jeffries at his home and set up a meeting with him for the sale of documents.

During the meeting, Giglia said, Jeffries said he had met with Soviet officials twice previously and had given them 13 pages of each of three documents he had and 15 pages of them at the second session. He described one document as being in excess of 200 pages.

''He also described one of the documents as top secret, had good information in it and that if caught with it, 'I'm in a lot of trouble,''' the agent said. ''He stated that the last time he met with the Soviets they said that the documents were good and that they were interested.''

Jeffries told the undercover agent he wanted $5,000 for the documents.

Jeffries did not receive any money and was arrested as he left the meeting, he said.

In an effort to prove that Jeffries just made ''idle boasts,'' Dale asked Giglia if the agent had asked Jeffries to bring the documents with him to the meeting in the downtown Washington hotel

''Yes, he did,'' the agent replied, and Dale pointed out that Jeffries had no documents when he was arrested.