Holders City, who had won this competition the previous four seasons, finally lost their grip on the trophy as they were beaten 5-3 on penalties by West Ham following a goalless draw at the London Stadium.
Phil Foden’s missed penalty proved decisive, with Said Benrahma converting the last of West Ham’s five successful spot-kicks.
Nevertheless, Guardiola said: “It’s been an incredible run so we finished in a good way in terms of performance, we played a really good game and created a lot of chances against a team who defend very deep.
“On penalties they were better, congratulations to West Ham and we’ll be back next year.
“Unfortunately Phil missed it but it’s experience and when you get this kind of experience next time he will be better.”
Tuesday marked five years to the day since City last lost in this competition, a 1-0 defeat at Manchester United.
The visitors, who made nine changes but still fielded the likes of Kevin De Bruyne, Raheem Sterling and Riyad Mahrez, had plenty of opportunities to win in normal time.
But West Ham goalkeeper Alphonse Areola made fine saves to deny John Stones and Ilkay Gundogan, Nathan Ake headed wide and 19-year-old Cole Palmer blazed a glorious chance over.
The Hammers also had their opportunities, notably when Tomas Soucek sidefooted wide and Arthur Masuaku fired over the top.
Guardiola was full of praise for West Ham, who lie one place behind them in the Premier League in fourth, and their manager David Moyes.
“One of our toughest games at home last season was against them,” he added.
“They are doing well in the Premier League, the Europa League and now they are in the quarter-finals of the Carabao Cup. A fantastic team, a fantastic manager.”
Hammers coach Stuart Pearce knows a thing or two about penalty shoot-outs from his England days.
He smiled: “You win some, you lose some. But the resilience of the team over 90 minutes – and we had some chances as well – but with the honesty and the resilience they showed, I think they deserved to get over the line in the shoot-out.
“Absolutely superb, and the players deserve all the credit, while the manager drives this club on in a daily basis. He’s done a wonderful job at this club.”
Pearce singled out club captain Mark Noble, who at 34 and in his farewell season put in a tireless 90 minutes and dispatched the first penalty in the shoot-out.
“He’s been a wonderful captain of this club, and a great role model,” added Pearce.
“He inspires from within the dressing room. Credit to him, he’s not had a lot of games this year but when he was asked to come in and lead the team tonight he was incredible.”
Register for free to continue reading
Registration is a free and easy way to support our truly independent journalism
By registering, you will also enjoy limited access to Premium articles, exclusive newsletters, commenting, and virtual events with our leading journalists
Already have an account? sign in