“Marvel’s Agents of S.H.I.E.L.D.” star Clark Gregg looked around the massive Helicarrier set on a Culver City sound stage and seemed thrilled to be alive — or, more accurately, thrilled — that the intrepid Phil Coulson, the character he first played in 2008’s “Iron Man,” had been reborn.

In ABC’s new superhero-inspired series, which premieres Tuesday night, the resurrected Coulson returns after his rather tragic death at the hands of Tom Hiddleston’s Loki in the 2012 blockbuster “The Avengers.” He now leads a team of special operatives that includes Ming-Na Wen’s pilot Melinda May, lone wolf Grant Ward (Brett Dalton) and ace hacker Skye (Chloe Bennet) through mysterious, dangerous missions.

But it’s not all grit and peril for the group. The agents’ headquarters are rather posh: a richly appointed plane complete with sleeping accommodations and a high-tech lab where tech geniuses Fitz and Simmons (Iain De Caestecker and Elizabeth Henstridge) develop wondrous gadgetry.

During a recent visit to the series’ set, Gregg spoke to Hero Complex about the new show, created by “Avengers” mastermind Joss Whedon and his younger brother Jed Whedon and Maurissa Tancharoen, the same team behind “Dr. Horrible’s Sing-Along Blog” and the short-lived Fox series “Dollhouse.”

Hero Complex: Could you have imagined that after “The Avengers” you would find yourself back in this role starring in a television series?

Clark Gregg: It was inconceivable. Originally it was really a tiny little role in “Iron Man.” You just never think, Oh, they’re going to add more scenes. They never add more scenes. They take some scenes away usually because the scenes belong with the stars of the movie. They kept adding more stuff and there was something about it I really clicked with and enjoyed. From early on, they let him be a little snarky, even with the fabulous Tony Stark. He evolved, the character evolved. At first he was this bureaucrat who turned out to work for this super-secret organization and then he’s actually a quite powerful field agent who handles things when Thor comes to town. By the time “The Avengers” rolled around, he was the one who knew most of the superheroes so he was the one tasked with bringing them altogether. When I got the call explaining how he brought them altogether, I realized how much I had grown attached to the guy. I was a little heartbroken. Then I got another call [saying] you may be being reborn in a different medium.

HC: That’s the great thing about the world of comic books and Marvel, right? That that sort of thing can happen?

CG: It’s my new favorite thing about that world! I was really sad after “The Avengers” when I realized I was not going to have a part in “Thor 2” or “Captain America: The Winter Soldier.” But I’m not arguing with my fantastic plane and my really cool car.

HC: Are you playing Coulson differently this time around?

CG: It’s always been the case that it’s a little bit of a chain letter. Every director and writing team add more facets to Coulson. There’s an amazing Kurt Vonnegut story about a guy who’s only alive when he’s acting — Chris Walken and Susan Sarandon did a movie of it once for TV — and it’s called “Who Am I This Time?” I always think of that title. Every time it’s a different world, a different superhero in the movies. I always sit down and go, Who is this version of Phil Coulson? Certainly after dying in “The Avengers,” that’s a big discussion that has to be had. What’s clear is that he has an idea why he’s walking around, about the close call that he had, but he clearly has not been told the full truth. I think that’s such a compelling part of the show to me. I feel like the things that happen to us, no matter how much we block them out, a part of us knows, and that’s really interesting to play with. He’s had an experience that was near death, it might have been very near death — it may have even been death — I don’t know yet. Any one of those versions means he’s going to be different and have a different take on the world.

HC: With a role like this, how much do you need to know in advance about where the story is ultimately heading? Do you like to know the endgame to tailor your performance in a certain direction or is it better in terms of playing the character to be surprised by the scripts?

CG: There’s things I need to know in order to play what I have to play now, just kind of baseline existential truths I need to understand. At the same time, I’m playing someone who doesn’t know some of these things. There’s a great thrill in knowing only roughly where this is going and what the truth is. I also like that I’m not the only one who’s still piecing together exactly what that truth is in terms of the creative team of the show, it feels like something we’re evolving together. The fact that this character who wasn’t in the comics — he was the only character in “Iron Man” who wasn’t in the comics — he’s now in the comics, he has a kind of Bible and a story line to reference, is really cool to me. A lot of the fans are obsessed with finding out if we’re going to meet the cellist that he was having relationship issues with in “The Avengers” or if any of the Avengers are going to find out that he’s not really dead. The fact that that’s out there and people are interested is really thrilling to me. On the one hand, we get to unveil so much more about his history and his life and yet he still remains mysterious. That’s the fun part of the secret. There are some whoppers coming that are just going to blow some minds. I’m excited for people who are into the show.

HC: Would you say that you’ve been taking part in a number of action scenes?

CG: I would say that I have been, yes. It’s been fantastic. I was doing some pretty extreme action stuff yesterday, and I realized it was just being 9 years old again. Rolling on the floor like, “Oh, he got me!” “I’m OK, I’m OK. Let’s go, quick, we have to get out of here, the place is going down!” Sometimes you kind of can’t believe this is your job.

HC: How would you characterize your relationship with Joss Whedon?

CG: I love Joss. I feel so completely in a nerdy mind meld with Joss. I know what he’s talking about. We both love Shakespeare, we like some of the same kind of music. We both like to dance, only Joss likes to dance a lot more than me. I was a fan. He came up to me at Comic-Con and said, You’re going to be in the Avengers if that’s cool with you. I’d like to introduce you as part of the cast. I was like, Whoa, what just happened? I was backstage for the panel for Thor and he came over to me. I literally turned and there was a guy next to me. I realized it was Joss Whedon. He said, “Listen, I’m sorry. I meant to call you. The surprise at this panel is we’re introducing the cast of the ‘Avengers’ and I’ve written you a big part, will you be introduced?” I could have fallen down dead at that moment. I looked and there was Robert [Downey Jr.] and Scarlett [Johansson], and Mark Ruffalo about to be introduced as the new Bruce Banner, it was one of the greatest 90 minutes of my life.

HC: Have you had a lot of creative input in the direction of the series?

CG: I would say that it was like a suit that was designed to a certain extent around stuff that I’d been doing and that we’d been doing, that certainly Joss had really fleshed out in “The Avengers.” I’ve definitely been encouraged to weigh in on where we’re going. That said, I’ve been pretty thrilled with the scripts that come my way. I feel very involved in how the show is evolving but at the same time I don’t want to make it sound like I’m there writing the scripts. They’re bringing out these scripts that are so true to Coulson. To see this team of writers write their chapter of the chain letter and have it feel like that was there all along really speaks to what a rich character all these different writing teams and directing teams have come up with over these movies.