The comedian, actor and writer B.J. Novak has sold two books to Knopf in a seven-figure deal. The first book, a work of fiction, is expected to be published in 2014, Nicholas Latimer, a spokesman for Knopf, said Thursday.

Richard Abate, Mr. Novak’s literary agent, said Mr. Novak, a writer for “The Office” and one of the show’s stars, wrote the book in the last year.

“The closest analogy for me is Woody Allen,” said Mr. Abate, who described the book as a collection of stories. “Underneath these stories is a real intellectual curiosity. I think their appeal is that they’re incredibly accessible and comic, but at the same time they’re exploring the modern condition.”

Mr. Abate previously represented Tina Fey in her deal for the best seller “Bossypants.” He also sold “I Am the New Black” by Tracy Morgan and a book by Judah Friedlander, the actor who played Frank on “30 Rock.”