The U.S. Court of Appeals, upholding a lower court ruling, said yesterday government agents violated John W. Hinckley Jr.'s constitutional rights when they questioned him after his arrest for attempting to assassinate President Reagan and when they later seized documents from his prison cell.

The court's decision blocks the government from introducing testimony from some FBI agents that prosecutors wanted to use to challenge Hinckley's claim that he was insane when he shot Reagan, White House Press Secretary James Brady, a U.S. Secret Service agent and a D.C. policeman last March 30.

U.S. Attorney Stanley S. Harris was expected to meet with assistant prosecutors yesterday to decide whether to ask the full court to review the decision by the three-judge appeals panel, a move that could delay Hinckley's trial for months.

The appeals court decision was reached yesterday by Chief Judge Spottswood W. Robinson Jr. and Judges J. Skelly Wright and Patricia M. Wald.

The three judges agreed with U.S. District Judge Barrington D. Parker's finding last November that FBI agents violated a well-established legal rule when they interrogated Hinckley for 25 minutes after he had repeatedly asked to speak to a lawyer.

Defense lawyers contended that the FBI's interrogation of Hinckley without a lawyer present violated his Fifth Amendment right against self-incrimination.

During the questioning, Hinckley provided basic information about his age, address, family and criminal record and also answered questions about his travels during the year before the shooting, his medical history and psychiatric treatment.

At one point, after Hinckley said he wanted to stop the interview and renewed his request to speak to a lawyer, Hinckley answered additional questions from an FBI agent, who asked if he had a "girlfriend."

Hinckley told the agent about what he described as a "one-sided" relationship with actress Jodie Foster, a student at Yale University. Law enforcement officials believe that Hinckley shot Reagan and three others outside the Washington Hilton Hotel in an attempt to impress Foster.

Government lawyers argued that the questions asked by FBI agents did not amount to interrogation--which the Supreme Court would prohibit unless a lawyer was present--but rather were intended to gather background information. The appeals court rejected the government's approach, however, saying that it would seriously undermine the protections against self-incrimination if it were to approve such far-ranging "background" interviews as the one conducted in the Hinckley case.

The appeals court also said that prison officials at Butner, N.C., violated Hinckley's rights to privacy when they confiscated a three-page document from him last July.

The government had contended that certain trigger words on the document--"prison," "life sentence" and "cooperation with the Justice Department"--justified seizure of the document for further investigation. The appeals court said however that the words on the documents failed to suggest either a threat of criminal activity or security problems that would justify the search and seizure.

Hinckley is currently being held at the Army stockade at Fort Meade, Md.