Soviet Ambassador Anatoliy F. Dobrynin, ending his 24 years in Washington, spent his final day here yesterday with a few personal visits. Dobrynin, who is to return home to Moscow today to begin his new job with the Soviet Communist Party Central Committee, asked Sens. Edward Kennedy and Gary Hart to come to the Soviet Embassy for private visits. He extended the invitations Wednesday night when he talked to them in the receiving line at his goodbye party. There were other visitors there yesterday, but the embassy would not say who they were.

Kennedy, whose relationship with Dobrynin goes back to when his brother John F. Kennedy was president, met with the ambassador for about 40 minutes. Hart, who visited the outgoing dean of the diplomatic corps in the morning, brought gifts. Hart had read in the paper about Soviet leader Mikhail Gorbachev's new hard line against vodka consumption, so he presented Dobrynin with a bottle of Bailey's Irish Cream and one of Russian vodka. Hart said he told him, "The Bailey's is to remember me, and the vodka is in case you forget what it's like." The Man in 'Manhunt'

"Manhunt: The Incredible Pursuit of a CIA Agent Turned Terrorist" is the latest work of successful author Peter Maas that seems as likely to make it onto the big screen as his previous books -- "The Valachi Papers" and "Serpico" -- have. "Manhunt" is the behind-the-scenes world of Edwin P. Wilson, the CIA agent who amassed a fortune and lived at Mount Airy Farms, a Virginia hunt country estate, with neighbors such as Paul Mellon, Sen. John Warner and Jack Kent Cooke.

The central character and hero of "Manhunt" is Assistant U.S. Attorney for the District of Columbia E. Lawrence Barcella Jr., the man who became obsessed with bringing Wilson to justice. Maas said a friend of Barcella's described him as being like the sheriff in "Butch Cassidy and the Sundance Kid." Whenever the two movie outlaws would look back, they would find to their amazement and anger that the sheriff was there in the distance, still on their trail. Maas said Wilson must have felt that way about Barcella. End Notes

Jack Lemmon, who is presently starring in "Long Day's Journey Into Night" at the National Theatre, is to receive the Congressional Arts Caucus Award at a special ceremony Tuesday in the Capitol. The award is presented each year to an artist or organization who has made major contributions to the arts. A two-time Academy Award winner, Lemmon has worked in film, television, theater, composing and recording. The most recent winners of the Arts Caucus Award have been actress Jessica Lange and Live Aid concert organizer Bob Geldof . . .

Trespassing charges for a sit-in at a Providence, R.I., IBM office were dropped against Amy Carter and 13 other college students who were protesting the company's business dealings in South Africa. In asking the judge to dismiss the charges, IBM said in a statement, "We believe it would not serve this community or our business any useful purpose to seek criminal sanctions for a group of people with whom we share an opposition to apartheid or any form of racial discrimination, wherever it exists" . . .

Washington author Christopher Buckley learned yesterday that his book "The White House Mess" has made The New York Times' best-seller list to be published Sunday, April 20. In a rare occurrence, his father William F. Buckley Jr.'s book "High Jinx" has also made the list -- his father's book is 10th and his is 14th. While the younger Buckley said he was not competing with his father, he did add, "Now we just have to knock him off that Number 10 slot." He can, however, take heart that his book is No. 5 on this Sunday's Washington Post list and his father's book is nowhere to be seen . . .

A dispute between the Spanish government and a British businessman over Francisco Goya's "La Marquesa de Santa Cruz" has been settled and the painting will go back to Spain instead of to the auction block, officials at Christie's said yesterday in London. The portrait had been expected to fetch as much as $15 million at auction. Spain, which had filed suit in London's High Court over the work, paid its owner, Lord Wimborne, $6 million. The 6 1/2-foot-wide portrait is expected to be back in Spain within a week, Christie's spokesman William Hanham said.