The 32-year-old is set to have a testimonial next summer after spending 10 years at the club but his current deal runs out at the end of the season.
Kompany is no longer first choice, while his history of injury problems is well documented, but, asked if he would like the Belgian still to be a City player next August, Guardiola replied: "Yes. That is my wish."
Kompany made his first City start for a month in the midweek Carabao Cup victory over Oxford, and Guardiola said: "It's incredible. He played the Carabao Cup like it's the final of the Champions League. That means a lot to me.
"If he plays five minutes then they are going to be the best five minutes in his life. He is a good example for Phil Foden and the rest of our squad. Unfortunately in the past it was the injuries but I think in the last few months he's feeling better."
City have only dropped two points in the Premier League heading into Saturday's clash with Brighton and bounced back from a shock home Champions League loss to Lyon by defeating Cardiff 5-0 last weekend.
Two of the goals were scored by second-half substitute Riyad Mahrez, his first in the Premier League since a big-money move from Leicester in the summer.
The Algerian has only started two league games but Guardiola denied Mahrez is taking time to adapt to his methods, saying: "Not at all.
"He wasn't in the line-up because I decided other players but every time (he has played) he's been so good. The goals were good for his confidence. He's not just here for a few months. We have never had any doubts about his quality of commitment. He will adapt quickly because of that mentality."
Guardiola also praised the performances of Raheem Sterling, claiming the winger is playing even better than last season.
"I think his performances are higher," said the City boss. "My feeling is that he's more mature than last season. I like it. Sometimes it's about the statistics but also how he produces it.
"Maybe I'm wrong but my feeling is that he believes in himself more, he is taking on more responsibility. That's good. Our target is to make them feel better than the previous season."