Aguero struck twice in the first half to put City in control and although Bojan Krkic pulled one back for Stoke with a penalty, substitutes Kelechi Iheanacho and Nolito combined late on to secure the three points.
"It was tough," Guardiola told Sky Sports. "But we were compact, we defended high balls well and we played well with the ball in the first half."
Aguero, who missed two penalties in City's 5-0 Champions League playoff victory at Steaua Bucharest on Tuesday, opened the scoring from the spot in the 27th minute after Ryan Shawcross had impeded Nicolas Otamendi.
News that makes sense
Your trusted source for staying up-to-date with the world around you. Get free daily news updates and analysis, straight to your inbox.
A Football Association directive before the season instructed referees to be stricter with infringements in the box and City benefited.
"I heard the new rule," Guardiola added. "We have to adjust as referees are so curious about what happens in the box."
Stoke manager Mark Hughes was surprised.
"The decision shocked us, it stopped us in our tracks," he said.
Aguero doubled his tally nine minutes later, nipping ahead of Glenn Whelan to meet a sumptuous Kevin De Bruyne free kick and send a fine header across Shay Given and into the far corner of the goal.
City allowed Stoke back into the match when Shawcross was awarded a penalty after being fouled by Raheem Sterling in the 49th minute and Bojan converted from the spot.
The visitors, not at their best despite dominating possession in the second half, scored again four minutes from time, Iheanacho rounding Given before crossing for Nolito to tap home his first Premier League goal.
Iheanacho was also influential in City's fourth, distracting the Stoke defence with a dummy before Sterling crossed for Nolito to add his second.
(Reporting by Ed Dove, editing by Ed Osmond)
