Prosecutors and defense attorneys agreed yesterday that John W. Hinckley Jr., the man accused of attempting to assassinate President Reagan, remains competent to stand trial Jan. 4 despite his attempt three weeks ago to hang himself in his cell in the Army stockade at Fort Meade.

Judge Barrington D. Parker had asked psychiatrists on both sides to examine Hinckley, following his second attempt to kill himself. On the first occasion, Hinckley reportedly took an overdose of an aspirin substitute.

Yesterday, after receiving the results of those psychiatric examinations, Parker canceled a hearing scheduled for next Monday to determine whether Hinckley is mentally competent to understand the charges against him and to assist in the preparation of his defense.

Hinckley's attorneys, Vincent J. Fuller and Gregory B. Craig, filed a memorandum in U.S. District Court yesterday saying that "at this time, we believe he is competent to stand trial . . . and that no evidentiary hearing on that issue is presently required."

Government prosecutors also filed a memorandum arguing that "neither a suicide attempt nor suicidal thinking creates an absolute bar to a finding of competence."

In an appendix, the prosecution included the findings of a team of forensic psychiatrists -- Jonas Rappeport of Baltimore, Park Dietz of Harvard Medical School and James Cavanaugh of Chicago -- assisted by psychologist John Monahan of the University of Virginia and several other experts, who had examined Hinckley on numerous occasions after the suicide attempt, most recently as last Friday.

The government psychiatrists' conclusions were not made public. But one Justice Department source confirmed that their conclusions parallel those made by the defense psychiatrists: that Hinckley is competent to stand trial.

At Hinckley's arraignment last August, five months after the attempt to kill Reagan outside the Washington Hilton Hotel, lawyers on both sides told Parker they agreed that Hinckley was able to stand trial. But Parker indicated that he wanted to review the issue again in light of Hinckley's second suicide attempt.

Parker will hold a hearing Monday to review a request by prosecutors to modify an order he issued on Nov. 17 prohibiting the prosecution from using in the trial statements Hinckley made to police after the shooting, including a detailed account of his activities prior to March 30.

Parker ruled that FBI agents violated a fundamental rule of criminal interrogation when they continued to question Hinckley despite his repeated requests to speak to a lawyer.

In addition, Parker concluded that federal prison officials violated Hinckley's right to privacy last summer when they seized personal notes and a diary from his cell at the federal correctional institution at Butner, N.C.

As a result those documents, which included a fictional conspiracy plot contrived by Hinckley, also are banned from use at the trial.

Prosecutors are asking Parker to reconsider and clarify his ruling.