BEFORE HE CAME to the presidency John F. Kennedy told a commencement audience at Harvard he wished "more politicians knew poetry, and more poets knew politics." Kennedy invited Robert Frost to read at his inauguration, just as President Jimmy Carter was to invite James Dickey to read at his, and last January the Carter administration sponsored a poetry read-in that took place in three connecting public rooms at the White House. Louise Gluck, one of the 21 active participants -- they read in shifts of three -- said it was like listening to several radio stations at the same time but added, "The whole effort was very sweet."

Walt Whitman had in mind more substantive and deliberate accommodations of poetry and power when he published Leaves of Grass 125 years ago this month. "I am large, I contain multitudes," he declared. "I do not say these things for a dollar or to fill up the time while I wait for a boat." America's greatest poet nominated himself a sort of roving superego to the president, addressing him directly "as some great emergency might demand." "How little you at Washington . . . know of us," he said, and he cited the people's hunger for "a great liberal thought or principal" uttered with "candor and power."

The future poet had electioneered for Martin Van Buren and addressed a Democratic mass meeting in City Hall Park in New York; for a while he was a regular at Tammany Hall, then a hotel as well as party headquarters. He was secretary of the Kings County Democratic organization, a delegate to the first presidential nominating convention of the Free Soil party, and a writer of vigorously partisan newspaper editorials. He "knew politics" at firsthand better than statecraft, but he had a shrewd, even inspired sense of the kind of leader it would take to bring the country through the impending crisis between North and South. Whitman was certain, for example, that neither of the candidates of the two major parties in 1856 was equal to the job. With a measure of verbal violence that doesn't bear out his later reputation for Quaker mildness he derided them as political corpses lifted out of putrid graves by "the lousy combings and born freedom sellers of the earth." As for the 13th and 14th presidents, Millard Fillmore and Franklin Pierce: "Never were publicly displayed more deformed, mediocre, snivelling, unreliable, falsehearted men!"

Two years before he was aware of the existence of Abraham Lincoln, Whitman called for a "Redeemer President of These States" to come from "the real West, the log-hut, the clearing, the woods, the prairie." The poet-hero he introduced in Leaves of Grass prefigured Lincoln; he was "the equable man," "the equalizer of his age and land," who in time of peace spoke "the spirit of peace" and in war was "the most deadly force of the war." A month or two before Lincoln took office Whitman made notes for an imaginary "Dialogue . . . between W.W. and 'President elect.'" But Whitman apparently never had any conversation with Lincoln, whose character he grasped so passionately and whom he was to salute in "When Lilacs Last in the Dooryard Bloom'd" as "the sweetest, wisest soul of all my days and lands."

"Democracy," Whitman wrote when the Civil War was over, "is a great word, whose history, I suppose, remains unwritten, because that history has yet to be enacted." So far from being a barker for America, however, he became perhaps the most savage commentator on that carnival of malfeasance and unloosed urge known as the Gilded Age. He pointed to the "deep disease" of American society and politics, its "hollowness of heart," "hypocrisy," and "rampant corruption," its abandonment of "genuine belief, and "underlying principles." "I say that our New World democracy . . . is, so far, an almost complete failure in its social aspects, and in really grand religious, moral, literary, and esthetic results." Other observers of the same scene -- Mark Twain and Henry Adams among them -- became ironic, nostalgic, or detached. But Whitman believed that America's symptoms were those of growing pains, not terminal illness, and that even its worst failures could be discoveries and sources of renewal. Given the success of recent crisis delegations of economic and military "wise men," Whitman's consultative arrangement between poet and president may not be such a wild idea after all.