RICHARD V. ALLEN, President Reagan's first national security adviser, ended up being cleared of the allegations of improper behavior that had swirled about him. In the highly politicized atmosphere in which those allegations arose, however, he became vulnerable to power struggles and personal rivalries inside the administration and to complaints that, essentially, he wasn't good enough at his job. Whether the complaints would have had so much force if the rivalries had not is unclear. In any event--and this much is clear--he became first a bother to some of the president's men and then an embarrassment to the president. Yesterday, reasonably gracefully under the circumstances, he was let go.

His replacement, Deputy Secretary of State William P. Clark, a former judge, has worked only a year in foreign affairs, against the 20-plus of his predecessor. Mr. Clark, however, enjoys an unusual measure of personal weightiness, based at once on his California connection to Mr. Reagan and on his calculated, no-nonsense, confidence-building service in the State Department. No hint of a policy change is detectable in the appointment.

But there is something else. The experience of a year has proven the inadequacy of the original Reagan national security system. Under that system, the post of national security adviser, which had previously been filled by influential figures, was downgraded. Typically, Mr. Allen had no direct access to the president and had to work through the "big three" of the White House staff, principally counselor Edwin Meese III. Mr. Clark takes up his new duties with assurances that the position will be restored to its earlier status and, specifically, that he will have his own access to the president.

It was a bad idea to have kept Mr. Allen at such a remove from the president. It was a bad idea to have Mr. Meese, who had no experience at all in foreign affairs and who has a great many other responsibilities, controlling the president's national security exposure. The new system would seem to correct those particular flaws. But whether it will result in a better assembled and executed policy has to await the test of further experience. Lines on a chart mean something. Personalities, egos, can mean more. No system by itself can assure that a president will put to good use all the information, insights and connections essential to a sound foreign policy. With the foreign policy machine retuned, the spotlight inevitably swings back to Mr. Reagan.