Difficult people become a staple of modern comedic television, with shows like "Seinfeld," "Curb Your Enthusiasm" and "It's Always Sunny in Philadelphia."

That tradition continues with the new Hulu series "Difficult People," created by Julie Klausner, who was responsible for the critically acclaimed podcast "How Was Your Week?" The show stars Klausner and Billy Eichner ("Billy on the Street" and "Parks and Recreation") as self-obsessed, opinionated besties living in New York City, and it is one of the best new shows of the year.

amNewYork spoke with Klausner about the show, which debuts Aug. 5.

What is the genesis of "Difficult People"?

I wanted to write a spec for the show the show I wanted to make, not the show I thought I could sell ... It was one of those things, where it was like, if you could make any show in the world, what would it be? And I wrote this pilot that later became our first episode.

How did you know Billy was the right guy to play your best friend?

I had met Billy, and an ex of mine had shown me some of this early "Billy on the Street" videos before he had partnered with Funny or Die and made what he had done into a game show, Billy was making these YouTube videos and they were so, so [expletive] brilliant. And I remember reaching out to him and saying, "Holy [expletive], you are a genius, we need to work together." Billy, I guess, had already been following me and the two of us got together and we talked about possibly hosting a talk show together that we would pitch, or writing something for a friend of ours. That sort of fell aside, as many projects do. Then a little while later, Billy got a TV show and he called me -- he says right away, but I don't know if that's true or not -- and he asked me to be one of his writers and I signed on. We really got to know each other working together ... . We're both people that take a lot of pride in what we do and we think about. ... we think about our work a lot. When the two of us were working together on Billy's show, we had a very similar sensibility and so it seemed logical to cast him in that role when it came time to write this script.

You're all really funny. Is there a lot of ad-libbing?

It's fully scripted and I'm a real [expletive] about getting everything on the page on the screen, but that is with the knowledge that Billy and I are going to have a couple of takes where we get loose, or I will indicate in the script, "Billy and Julie riff on pop culture topics." There's a scene where we're being interviewed for an atheist podcast later in the season and that was very loosely scripted and that was a good example of something that we would use our chemistry to fall back on. But in general, there is not a lot of improvising, there are a couple of ad-libs and obviously we would be so rock-bottom stupid if we didn't let Andrea Martin, [who plays my mother], improvise. There are a couple of endings to her scenes where she came up with something on the spot. She is just so [expletive] brilliant. So Billy is allowed to improvised, Andrea is allowed to improvise, I'm allowed to improvise. No one, including the dogs, especially the dogs, is allowed to improvise. Those [expletive] dogs. I know you didn't ask, but I'm telling you anyway. One of them was very professional. The other, I have to say, I was a little skeptical about how well he was trained because he ruined a couple takes by eating whipped cream out of a bowl in the pilot. And then we took the whipped cream away and then the director said action and you know what he did? He pushed over a lamp because it was near where the bowl was and the bowl wasn't there anymore. He ruined the shot. He ruined the scene! At no point in the script was "dog knocks the lamp over." He was improvising and that is not OK.

You use Julie and Billy as the names of the characters. Is this a glimpse into the real you?

Very much so. These are absolutely characters based on ourselves. It was a conversation of whether or not our characters would have the same last name or if we were to do a variation. And I think when I gave Billy and Julie different last names, it was actually quite helpful because the differences have to do with the vagueness of everything. ... So many of these stories came from real life events that we just tweak. Or we make a little bigger or, invariably I will give my character something to say that I wish I could have said in the moment. She's definitely braver. She's definitely more strident, more confident than I am. And her hair is better because she has somebody working on it when she's on set.

I saw that this was inspired by "Curb Your Enthusiasm." Why do you think people enjoy watching difficult people?

Because they have the courage to do something that the viewer wouldn't necessarily do for fear of being alienated or anti-social. ... I think that if someone's funny, you want to spend time with them. And that makes them likable. So I don't buy the argument that Larry David is an unlikable character. He a goddamn delight.

This was originally set to air on USA. Did the show change at all with the move to Hulu?

It didn't. What happened was USA got rid of their scripted comedy department, and "Difficult People" is a scripted comedy. And they went in a different direction internally, so it really wasn't personal. The process of doing this show has always been we do the show we want to do. ... We really haven't gotten any feedback from Hulu which has given us pause. They in no way want to weigh us to make the show any different from the show that we set out to make. And that includes obscure cultural references and swear words and really stupid things ... and having two leads that don't look like Will and Grace and aren't as congenial and don't have that "Friends" leading actor's good looks or sitcom traditional appearances that people bring to it. And it's a very nice to have had that freedom the whole time.

Your character Julie writes TV recaps. What do you think she would write about "Difficult People?"

I think she would be so jealous that there's somebody who looks like her that has a TV show and she doesn't that she would go into spirals of rage. And then one day the magazine would call her and ask her to do recaps of it, and it would ruin her day. It would literally ruin her day. It wouldn't be enough for her to just say no. She would like, "Why would they even ask me? It's like they set out to hurt me. This is clearly a conspiracy." She would definitely take it personally. It would not end well.

What are some of the benefits of filming the show in New York?

Well I don't believe that there is another city besides New York. I've heard that there are other cities. And I've seen a couple of things that resemble cities. People say, "Oh, New Yorkers are always so superior, and New Yorkers are always saying that there's no other place than New York." ... I've been to Europe. So what? I don't know. I love New York so much, and I don't take lightly the privilege that I've had to shoot here where I live. And I do think that has afforded us opportunities to use more actors that come from theater. I think that affords us the benefit of writing to the reality of the situation as opposed to approximating the reality of the situation, which is to say people are walking into each other and it's [expletive] freezing and it's filthy and it's loud, but just as with our characters on the show, they couldn't imagine being anywhere else.

What other projects do you have coming up?

I don't know. This interview? Hopefully we'll get to do more of this show because it's my favorite thing to do, and I love it so much. And I have a one-woman burlesque show that I'm workshopping in my bad idea room, which I don't have. But if I had more room in the apartment, I'd have a bad idea room and I would do that.

Streaming: "Difficult People" begins streaming on Hulu.com on Aug. 5.