THOUGH COMEDIAN Andy Kaufman was considered a solo performer, he was really part of a duo. From Kaufman's beginnings on the New York comedy club circuit in the early 1970s to his death in 1984, Bob Zmuda was by his side -- as a writer, producer, and performer. When Kaufman was Elvis, Zmuda was "Memphis Mafia" bodyguard, Red West. When Kaufman challenged women to wrestling matches, Zmuda refereed. And when Kaufman wanted to appear live with his alter ego, vulgar lounge singer Tony Clifton, Zmuda was roped into the role, allowing Kaufman to pull off the ultimate double act -- supporting "himself" on the same stage.

Pranks and put-ons were part and parcel of Andy Kaufman's life. "He did pranks every day," says Zmuda, "from when he stepped out of bed, until he went to sleep at night. And he put as much energy and thought behind them whether they were for one or two strangers in a restaurant or an entire audience at Carnegie Hall." Few people realized the extent of Kaufman's stunts during his lifetime, but the secrets are finally spilled in Zmuda's memoir about the anarchic comic genius, Andy Kaufman Revealed!. Tony Clifton fired as a guest star on Taxi and thrown off the studio lot? A complete setup. The Memphis wrestling match in which Kaufman supposedly broke his neck? Meti- culously planned to the last detail. Kaufman even picketed his own shows at Carnegie Hall, disguised as a bum, ranting to would-be ticket buyers that Andy Kaufman was the Antichrist.

Zmuda's book sets the stage for the upcoming release of the Kaufman film bio, Man on the Moon . "I've always wanted to do a film about Andy," he says. "Even Andy on his death bed said to me, 'We should do a film.' And about a year after his death I started typing some things. I didn't get very far. It was a little too painful." But R.E.M.'s 1992 song "Man on the Moon" rekindled interest in Kaufman, and a subsequent 1995 TV special prompted director Milos Forman (The People vs. Larry Flynt) to get the film going, taking on Zmuda as co-executive producer. "And right around that time, it became quite obvious that a book about Andy was possible," Zmuda says. "And from my standpoint, as his writer and friend, I had a kind of dual life with Andy."

Andy Kaufman Revealed! is an engaging and frequently hysterical chronicle of the riotous times Zmuda and Kaufman shared. Whether bamboozling airplane passengers with unnerving "flight anxiety" scenes or staging mock fights on live TV, the duo's reach as practical jokers knew no bounds. But Zmuda also explores Kaufman's paradoxes: the man of wealth devoted to asceticism ("Andy's spare lifestyle could have made Gandhi look like Aristotle Onassis"), a star who supplemented his Taxi income by cheerfully working as a busboy.

But the biggest surprise is learning about the extensive maneuverings behind Kaufman's supposed "spontaneous" stunts. Zmuda admits he might not have spilled the beans if the film wasn't about to do the same thing. "I figured, I am the guy who dreamt this stuff up with Andy; why should they do it and I shouldn't?" he says. "It didn't seem fair to me. In a way, this is like my last good-bye to Andy. And I wanted to be totally honest, and felt that if you knew how Andy did these things, if you looked behind the screen to see how the strings were being pulled, there [would be] a greater appreciation of him."

There's also an undercurrent of poignancy, since Kaufman's antics were destined to be suddenly cut short. "It was the greatest time of my life, and then it became the most tragic time of my life," Zmuda says. "So some chapters were a total delight to write. And then I knew I had to get to the death. That was highly traumatic for me. I think what the book does is that it's funny and wonderful, and then it takes a little twist towards the end there. A little reality check."

Providing a final haunting note, Zmuda's first and last words in his book touch on the possibility that Kaufman dared to fake his own death. When asked, Zmuda says he believes Kaufman is dead, but can't help adding, "If he showed up at the premiere, I'd be surprised, but I wouldn't be shocked." And this is one stunt Zmuda swears he'd never reveal. "If Andy had faked his death and I knew about it and told people, he'd kill me," he says, only half joking. "I'd be dead!"