THE REPORT last Tuesday by the Department of Justice is the next to last chapter in the official story of Billy Carter's adventures in Libya. All that remains is for the Reagan administration's lawyers to decide whether to prosecute Mr. Carter for lying to a federal investigator. The odds are their decision will be to drop the matter (few people are ever prosecuted for this particular offense), and that will close the book.

The Billy Carter saga, however, deserves a different kind of concluding chapter. There are warnings in it for this and all future administrations, warnings that should be heeded because the real costs -- political and other -- of the Libyan adventures were borne by a president and an attorney general.

The first warning, obviously, is that although presidents shouldn't have relatives like Billy Carter, they have no control over such matters, and so they need to take protective steps. They need to insulate themselves from the possibility that some outsider or some foreign government will try to prey on a relative's avaricious instincts. President Carter recognized this belatedly.

The more important warning involves the relationships between presidents and their top advisers. In its zeal to prevent any possibility that justice would be mixed with politics, the Carter administration built too high the walls between the White House and the Department of Justice and between the attorney general and his subordinates. These walls succeeded so well they insulated the president from information he needed about his brother's affairs, and some other criminal investigations, in order to protect the integrity of his own administration.

President Carter never knew things that various people in his government knew about Billy Carter until it was too late for him to disassociate himself from what his brother was doing or to shield himself from the inevitable charges of favoritism and of helping Billy Carter sell political influence. Similarly, Attorney General Benjamin Civiletti didn't know enough of what was going on in his criminal division to act promptly on secret intelligence information when he received it.

There are other admonitions in the Libyan adventures -- attorneys general should not lie, White House staffers should not try to cover up for a president's relatives. But the key one is that the integrity of a system of justice depends on the integrity of those who operate it, not on policies and devices designed to isolate key points in the system from political pressure. The Carter administration arrangements, which provided that kind of insulation, just like the special prosecutor system created by Congress, have demonstrated their own internal weaknesses.